public class JausBitWriter extends Object
| Constructor and Description |
|---|
JausBitWriter() |
| Modifier and Type | Method and Description |
|---|---|
int |
getRequiredBytes(jaus.jaxb.JAUSMessageListType jaxbJaus)
Determines the nmber of bytes required to encode a JAUS message list
|
int |
getRequiredBytes(jaus.jaxb.JAUSMessageType msg)
Determines the number of bytes required to encode a single JAUS message
|
static int |
getSignedIntScaledInt(double min,
double max,
double real)
Utility function for generating the integer value of a JAUS scaled integer from a double
|
static int |
getSignedShortScaledInt(double min,
double max,
double real)
Utility function for generating the integer value of a JAUS scaled integer from a double
|
static long |
getUnsignedIntScaledInt(double min,
double max,
double real)
Utility function for generating the integer value of a JAUS scaled integer from a double
|
static int |
getUnsignedShortScaledInt(double min,
double max,
double real)
Utility function for generating the integer value of a JAUS scaled integer from a double
|
void |
writeAdditionalData(jaus.jaxb.JAUSMessageType msg,
int[] bytes,
int cmdCode)
Writes the additional data portion of a JAUS message to the int[] array
containing the binary JAUS message
|
void |
writeHeaderToBinary(jaus.jaxb.JAUSMessageType msg,
int[] bytes)
Writes to a int[] array for a single JAUS message
|
ArrayList |
writeToBinary(jaus.jaxb.JAUSMessageListType jaxbJaus)
Generates a int[] containing a series of binary JAUS messages
corresponding to a JAXB JAUSMessageSet object
|
void |
writeToBinary(jaus.jaxb.JAUSMessageType msg,
int[] bytes)
Writes to a int[] array for a single JAUS message
|
public ArrayList writeToBinary(jaus.jaxb.JAUSMessageListType jaxbJaus)
jaxbJaus - JAXB object containing the JAUS messagespublic void writeToBinary(jaus.jaxb.JAUSMessageType msg,
int[] bytes)
msg - JAXB object containing the JAUS messagebytes - int[] to which the JAUS binary encoding is to be writtenpublic void writeHeaderToBinary(jaus.jaxb.JAUSMessageType msg,
int[] bytes)
msg - JAXB object containing the JAUS messagebytes - int[] to which the JAUS binary encoding is to be writtenpublic int getRequiredBytes(jaus.jaxb.JAUSMessageListType jaxbJaus)
jaxbJaus - JAXB object containing the JAUS messagespublic int getRequiredBytes(jaus.jaxb.JAUSMessageType msg)
msg - JAXB object containing a single JAUS messagepublic void writeAdditionalData(jaus.jaxb.JAUSMessageType msg,
int[] bytes,
int cmdCode)
msg - JAXB object containing the JAUS messagebytes - int[] to which the JAUS binary encoding is to be writtencmdCode - enumeration for the type of message in the messagepublic static int getUnsignedShortScaledInt(double min,
double max,
double real)
min - minimum value of the rangemax - maximum value of the rangereal - real value being converted to a scaled integerpublic static int getSignedShortScaledInt(double min,
double max,
double real)
min - minimum value of the rangemax - maximum value of the rangereal - real value being converted to a scaled integerpublic static long getUnsignedIntScaledInt(double min,
double max,
double real)
min - minimum value of the rangemax - maximum value of the rangereal - real value being converted to a scaled integerpublic static int getSignedIntScaledInt(double min,
double max,
double real)
min - minimum value of the rangemax - maximum value of the rangereal - real value being converted to a scaled integer