|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fosstrak.llrp.commander.editors.BinaryMessageHelper
public class BinaryMessageHelper
This is a helper class for LLRP Binary Message, which transform the XML message to binary bit list by calling LTK Java APIs.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CHUNK_DELIMITER
the default separator between two chunks. |
static int |
DEFAULT_CHUNK_LENGTH
denotes the length of a chunk within a line. |
static int |
DEFAULT_LINE_LENGTH
denotes the number of characters used to split the parameters into several lines. |
| Constructor Summary | |
|---|---|
BinaryMessageHelper(java.lang.String aXMLContent)
Constructor, initialize the valid Message in binary format |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getArrParameters(int lineLength,
int chunkLength,
java.lang.String delimiter)
splits the parameters into an array of several strings with sub-chunks. |
java.lang.String |
getBinaryString()
Get the binary list. |
java.lang.String |
getLength()
Get the length value of the message, in binary format. |
java.lang.String |
getMessageID()
Get the message ID of the message, in binary format. |
java.lang.String |
getMessageType()
Get the message type value of the message, in binary format. |
java.lang.String |
getParameters()
Get the ALL parameter values of the message, in binary format. |
java.lang.String |
getReserved()
Get the reversed value of the message, in binary format. |
java.lang.String |
getVersion()
Get the version value of the message, in binary format. |
java.lang.String |
insert(java.lang.String orig,
java.lang.String ins,
int n)
create a new string that contains the delimiter ins every n characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_LINE_LENGTH
public static final int DEFAULT_CHUNK_LENGTH
public static final java.lang.String DEFAULT_CHUNK_DELIMITER
| Constructor Detail |
|---|
public BinaryMessageHelper(java.lang.String aXMLContent)
throws java.lang.Exception
aXMLContent - XML Message Format
java.lang.Exception - if message is not valid.| Method Detail |
|---|
public java.lang.String getBinaryString()
public java.lang.String getReserved()
public java.lang.String getVersion()
public java.lang.String getMessageType()
public java.lang.String getLength()
public java.lang.String getMessageID()
public java.lang.String getParameters()
public java.lang.String insert(java.lang.String orig,
java.lang.String ins,
int n)
orig - the original string.ins - the delimiter to insert.n - the number of characters to use between two delimiters.
public java.lang.String[] getArrParameters(int lineLength,
int chunkLength,
java.lang.String delimiter)
lineLength - the length of the resulting line.chunkLength - the length of one chunk within the line.delimiter - the delimiter between the chunks.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||