|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient.PlayerDevice
javaclient.MComInterface
public class MComInterface
The mcom interface is designed for exchanging information between clients. A client
sends a message of a given "type" and "channel". This device stores adds the message
to that channel's stack. A second client can then request data of a given "type" and
"channel". Push, Pop, Read, and Clear operations are defined, but their semantics can
vary, based on the stack discipline of the underlying driver. For example, the
lifomcom driver enforces a last-in-first-out stack.
Field Summary | |
---|---|
static short |
MCOM_CHANNEL_LEN
size of channel name |
protected static short |
MCOM_COMMAND_BUFFER_SIZE
|
protected static short |
MCOM_DATA_BUFFER_SIZE
|
static short |
MCOM_DATA_LEN
size of the data field in messages |
static java.lang.String |
MCOM_EMPTY_STRING
returns this if empty |
static short |
MCOM_N_BUFS
number of buffers to keep per channel |
static short |
PLAYER_MCOM_CLEAR_REQ
|
static short |
PLAYER_MCOM_POP_REQ
|
static short |
PLAYER_MCOM_PUSH_REQ
|
static short |
PLAYER_MCOM_READ_REQ
|
static short |
PLAYER_MCOM_SET_CAPACITY_REQ
|
Fields inherited from class javaclient.PlayerDevice |
---|
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec |
Constructor Summary | |
---|---|
MComInterface(PlayerClient pc,
short indexOfDevice)
Constructor for MComInterface. |
Method Summary | |
---|---|
void |
Clear(int type,
java.lang.String channel)
Configuration request: Clear (PLAYER_MCOM_CLEAR_REQ) |
char[] |
getChannelName()
Returns the name of the channel after a sendConfigReq () call. |
char[] |
getData()
Returns the data. |
short |
getDataType()
Returns the type of data after a sendConfigReq () call. |
char |
getFlag()
Returns the flag. |
char[] |
getRData()
Returns the data after a sendConfigReq () call. |
char |
getRFlag()
Returns the flag after a sendConfigReq () call. |
void |
handleResponse(int size)
Handle acknowledgement response messages (threaded mode). |
boolean |
isDataReady()
Check if data is available. |
void |
Pop(int type,
java.lang.String channel)
Configuration request: Pop (PLAYER_MCOM_POP_REQ) |
void |
Push(int type,
java.lang.String channel,
char[] dataT)
Configuration request: Push (PLAYER_MCOM_PUSH_REQ) |
void |
Read(int type,
java.lang.String channel)
Configuration request: Read (PLAYER_MCOM_READ_REQ) |
void |
readData()
Read a piece of data. |
void |
sendConfigReq(int whichReq,
int type,
java.lang.String channel,
boolean fullT,
char[] dataT)
Configuration request: Config requests sent to server. |
void |
setCapacity(int type,
java.lang.String channel,
char capacity)
Configuration request: Set capacity (PLAYER_MCOM_SET_CAPACITY_REQ) |
Methods inherited from class javaclient.PlayerDevice |
---|
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, readHeader, sendHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short MCOM_DATA_LEN
public static final short MCOM_N_BUFS
public static final short MCOM_CHANNEL_LEN
public static final java.lang.String MCOM_EMPTY_STRING
protected static final short MCOM_COMMAND_BUFFER_SIZE
protected static final short MCOM_DATA_BUFFER_SIZE
public static final short PLAYER_MCOM_PUSH_REQ
public static final short PLAYER_MCOM_POP_REQ
public static final short PLAYER_MCOM_READ_REQ
public static final short PLAYER_MCOM_CLEAR_REQ
public static final short PLAYER_MCOM_SET_CAPACITY_REQ
Constructor Detail |
---|
public MComInterface(PlayerClient pc, short indexOfDevice)
pc
- a reference to the PlayerClient objectindexOfDevice
- the index of the deviceMethod Detail |
---|
public void readData()
readData
in class PlayerDevice
public char getFlag()
public char[] getData()
public void sendConfigReq(int whichReq, int type, java.lang.String channel, boolean fullT, char[] dataT)
whichReq
- which request (should be one of the defined request ids)type
- the "type" of the datapublic void Push(int type, java.lang.String channel, char[] dataT)
public void Pop(int type, java.lang.String channel)
public void Read(int type, java.lang.String channel)
public void Clear(int type, java.lang.String channel)
public void setCapacity(int type, java.lang.String channel, char capacity)
public boolean isDataReady()
public void handleResponse(int size)
handleResponse
in class PlayerDevice
size
- size of the payloadpublic char getRFlag()
public char[] getRData()
public short getDataType()
public char[] getChannelName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |