Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
Reality Interface Classes: Class DDAMsg (JReal) (ddamsg.html)
|
Reality Interface Classes | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.northgateis.comms.dda.DDAMsg
RealityX DDA Message class
This class defines a DDA message and provides various constructors and methods for accessing the fields.
See the DDATcp
class for typical usage.
Field Summary | |
static int
|
MAX_FUNCTION_CODE
The maximimum value for a function code |
static int
|
MAX_QUALIFIER_LEN
The maximimum lenght of a qualfier array |
static int
|
MAX_REFERENCE
The maximimum calue for a reference |
Constructor Summary | |
DDAMsg() Construct an empty DDA message | |
DDAMsg(int func,
int ref) Construct a DDA message with empty data and qualifier | |
DDAMsg(int func,
int ref,
byte[] data) Construct a DDA message with empty qualifier | |
DDAMsg(int func,
int ref,
byte[] qualifier,
byte[] data) Construct a full DDA message |
Method Summary | |
void | build(java.io.InputStream is) Read a message from the given input stream and use it to overwrite the current message. |
byte[] | getBytes() Serialise the message into a byte array and return it |
byte[] | getData() Get the data block |
int | getDataLength() Get the data length |
int | getFunction() Get the function code |
byte[] | getQualifier() Get the qualifier |
int | getQualifierInt() Get the qualifier |
int | getQualifierLength() Get the qualifier length |
int | getReference() Get the reference |
void | setData(byte[] buf) Set the data block |
void | setData(java.lang.String s) Set the data block |
void | setFunction(int func) Set the function code |
void | setQualifier(byte[] buf) Set the qualifier |
void | setQualifier(java.lang.String s) Set the qualifier |
void | setReference(int ref) Set the reference |
java.lang.String | toString() Convert the message to a human readable format |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int MAX_FUNCTION_CODE
public static final int MAX_REFERENCE
public static final int MAX_QUALIFIER_LEN
Constructor Detail |
public DDAMsg()
public DDAMsg(int func, int ref, byte[] qualifier, byte[] data)
func
- Integer function code in range 0 to 65535ref
- Integer reference in range 0 to 255qualifier
- Byte array containing qualifier (Max 255 bytes long)data
- Byte array containing data (Max 4G bytes long)public DDAMsg(int func, int ref, byte[] data)
func
- Integer function code in range 0 to 65535ref
- Integer reference in range 0 to 255data
- Byte array containing data (Max 4G bytes long)public DDAMsg(int func, int ref)
func
- Integer function code in range 0 to 65535ref
- Integer reference in range 0 to 255Method Detail |
public void setFunction(int func)
func
- Integer function code in range 0 to 65535public void setReference(int ref)
ref
- Integer reference in range 0 to 255public void setQualifier(byte[] buf)
buf
- Byte array containing qualifier (Max 255 bytes long)public void setQualifier(java.lang.String s)
s
- String containing qualifier (Max 255 bytes long)public void setData(byte[] buf)
buf
- Byte array containing data (Max 4G bytes long)public void setData(java.lang.String s)
s
- String containing data (Max 4G bytes long)public int getFunction()
public int getReference()
public int getQualifierLength()
public int getDataLength()
public byte[] getQualifier()
public int getQualifierInt()
public byte[] getData()
public byte[] getBytes()
public void build(java.io.InputStream is) throws java.io.IOException
is
- an input streampublic java.lang.String toString()
| Reality Interface Classes | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |