public class SecsFormat10 extends java.lang.Object implements SecsFormat
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
cvsRev |
byte[] |
theData |
| Constructor and Description |
|---|
SecsFormat10()
Required empty constructor.
|
SecsFormat10(boolean b1)
Construct a SecsFormat10 that has a single byte representing the value of the binary data.
|
SecsFormat10(boolean b1,
boolean b2,
boolean b3,
boolean b4,
boolean b5,
boolean b6,
boolean b7,
boolean b8)
Construct a SecsFormat10 that has a single byte representing the bits passed.
|
SecsFormat10(byte newValue)
Construct a SecsFormat10 that has a single byte representing the byte passed.
|
SecsFormat10(byte[] newValue)
Construct a SecsFormat10 from the byte array passed.
|
SecsFormat10(int newValue)
Construct a SecsFormat10 that has a single byte representing the int passed.
|
SecsFormat10(java.lang.String theString)
This constructor will take either a unsigned byte (value between 0 - 255) or a
hex value (0xAA).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Returns the boolean representation of the object.
|
boolean |
equals(java.lang.Object secsFormat10)
This method will compare the arrays of two SecsFormat10 objects.
|
SecsFormat[] |
getArray()
This allows for arrays of secsformats (not a list of secsformats).
|
boolean |
getBoolValue()
Returns the boolean representation of the object.
|
byte |
getByteValue()
Returns the first element of array as a byte.
|
double |
getDoubleValue()
Returns the first element of array as a double.
|
float |
getFloatValue()
Returns the first element of array as a float.
|
byte[] |
getFormattedBytes()
Returns an array of bytes suitable for use in a SECS Message.
|
int |
getIntValue()
Returns the first element of array as an int.
|
int |
getLength()
Returns the length of the format.
|
long |
getLongValue()
Returns the first element of array as a long.
|
int |
getNumberOfLengthBytes()
Returns the number of length bytes.
|
short |
getShortValue()
Returns the first element of array as a short.
|
java.lang.String |
getStringValue()
Returns the string representation of the object.
|
void |
setArray(SecsFormat[] newValues)
This allows for a standard way to set arrays of secsformats.
|
void |
setDataFromByteArray(byte[] temp,
int offset,
int length)
Set the variable from an array of bytes.
|
void |
setLength(int newValue)
Sets the length of the format.
|
void |
setNumberOfLengthBytes(int numberOfLengthBytes)
Sets the number of length bytes to send when the format is encoded.
|
java.lang.String |
toString()
Returns the SML string representing this value
|
java.lang.String |
toString(int indentCount)
Returns the indented SML string representing this value.
|
boolean |
zeroLength()
Returns true if the format is zero length.
|
public static final java.lang.String cvsRev
public byte[] theData
public SecsFormat10()
public SecsFormat10(boolean b1)
public SecsFormat10(boolean b1,
boolean b2,
boolean b3,
boolean b4,
boolean b5,
boolean b6,
boolean b7,
boolean b8)
public SecsFormat10(byte newValue)
public SecsFormat10(byte[] newValue)
public SecsFormat10(int newValue)
public SecsFormat10(java.lang.String theString)
public boolean booleanValue()
public boolean equals(java.lang.Object secsFormat10)
equals in class java.lang.Objectpublic SecsFormat[] getArray()
getArray in interface SecsFormatpublic boolean getBoolValue()
getBoolValue in interface SecsFormatpublic byte getByteValue()
getByteValue in interface SecsFormatpublic double getDoubleValue()
getDoubleValue in interface SecsFormatpublic float getFloatValue()
getFloatValue in interface SecsFormatpublic byte[] getFormattedBytes()
throws SecsException
getFormattedBytes in interface SecsFormatSecsExceptionpublic int getIntValue()
getIntValue in interface SecsFormatpublic int getLength()
SecsFormatgetLength in interface SecsFormatpublic long getLongValue()
getLongValue in interface SecsFormatpublic int getNumberOfLengthBytes()
getNumberOfLengthBytes in interface SecsFormatpublic short getShortValue()
getShortValue in interface SecsFormatpublic java.lang.String getStringValue()
getStringValue in interface SecsFormatpublic void setArray(SecsFormat[] newValues) throws SecsException
setArray in interface SecsFormatSecsExceptionpublic void setDataFromByteArray(byte[] temp,
int offset,
int length)
throws SecsException
setDataFromByteArray in interface SecsFormatSecsException - thrown if the length of the data array is not sufficient to hold the data.
this will occur if the offset is greater that temp.length or if offset+length is greater than temp.length.
In the first case the data will be invalid. In the second case the data will be valid to the maximum extent
possible, that is temp.length-(length+offet) bytes will be valid.public void setLength(int newValue)
SecsFormatsetLength in interface SecsFormatnewValue - the new lengthpublic void setNumberOfLengthBytes(int numberOfLengthBytes)
throws java.lang.IllegalArgumentException
setNumberOfLengthBytes in interface SecsFormatnumberOfLengthBytes - the new number of length bytes. This should
be 1, 2,3 or -1 to indicate the defaultjava.lang.IllegalArgumentException - if the value is not 1, 2, 3 or -1public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(int indentCount)
toString in interface SecsFormatthe - indentationpublic boolean zeroLength()
SecsFormatzeroLength in interface SecsFormatCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.