public abstract class ServerSpace extends Object
Implementing classes will largely forward calls to the gcspy C library.
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG |
protected static String |
DEFAULT_UNUSED_STRING
The "unused" string
|
protected Address |
driver
a pointer to the C driver,
gcspy_gc_drivert *driver |
protected int |
spaceId
the space's ID
|
Constructor and Description |
---|
ServerSpace() |
Modifier and Type | Method and Description |
---|---|
abstract Address |
addStream(int id)
Add a stream to the native driver
|
void |
endCommunication()
End the transmission (for this event)
|
(package private) Address |
getDriverAddress()
Get a pointer to the native driver
|
abstract void |
resize(int size)
Tell the C driver to resize
|
abstract void |
sendControls(AbstractDriver space,
int tileNum)
Send all the control info for the space
|
abstract void |
setTilename(int i,
Address start,
Address end)
Tell the native driver the tile name.
|
abstract void |
setTilename(int i,
Address format,
long value)
Tell the native driver the tile name.
|
abstract void |
setTilename(int i,
String format,
long value)
Tell the native driver the tile names.
|
abstract void |
spaceInfo(Address info)
Send info for this space
|
abstract void |
startCommunication()
Start a transmission
|
abstract void |
stream(int id,
int len)
Start transmitting a stream.
|
abstract void |
streamByteValue(byte value)
Send a byte
|
abstract void |
streamEnd()
End of this stream
|
abstract void |
streamIntValue(int value)
Send an int
|
abstract void |
streamShortValue(short value)
Send a short
|
abstract void |
summary(int id,
int len)
Start to send a summary
|
abstract void |
summaryEnd()
End the summary
|
abstract void |
summaryValue(int val)
Send a summary value
|
protected static final String DEFAULT_UNUSED_STRING
protected int spaceId
protected static final boolean DEBUG
public ServerSpace()
Address getDriverAddress()
gcspy_gc_drivert *
, used in all calls
to the C library.public abstract void setTilename(int i, Address start, Address end)
i
- the number of the tilestart
- the starting address of the tileend
- the end addresspublic abstract void setTilename(int i, Address format, long value)
i
- the number of the tileformat
- the name of the tile, a format stringvalue
- The value for the format stringpublic abstract void setTilename(int i, String format, long value)
i
- the number of the tileformat
- The name, including format tagsvalue
- The value for the format stringpublic abstract void resize(int size)
size
- the new driver sizepublic abstract void startCommunication()
public abstract Address addStream(int id)
id
- the stream's IDgcspy_gc_stream_t
public abstract void stream(int id, int len)
id
- The stream's IDlen
- The number of items in the streampublic abstract void streamByteValue(byte value)
value
- The bytepublic abstract void streamShortValue(short value)
value
- The shortpublic abstract void streamIntValue(int value)
value
- The intpublic abstract void streamEnd()
public abstract void summary(int id, int len)
id
- The stream's IDlen
- The number of items to be sentpublic abstract void summaryValue(int val)
val
- The valuepublic abstract void summaryEnd()
public abstract void sendControls(AbstractDriver space, int tileNum)
space
- The GCspy driver for this spacetileNum
- The number of tilespublic abstract void spaceInfo(Address info)
info
- A pointer to the information (held as C string)public void endCommunication()