public class SecsFormat99 extends java.lang.Object implements SecsFormat
Modifier and Type | Field and Description |
---|---|
ValueObjectInterface |
theData
Mimic of SecsFormat except that "theData" is a ValueObjectInterface.
|
Constructor and Description |
---|
SecsFormat99(ValueObjectInterface value) |
Modifier and Type | Method and Description |
---|---|
static SecsFormat00 |
convertToSecsFormat(ArrayValueObject array)
Returns a SecsFormat00 from an ArrayValueObject by calling
convertSecsFormat on each element. |
static SecsFormat |
convertToSecsFormat(ValueObjectInterface value)
This will return a SecsFormat for a given ValueObject.
|
boolean |
equals(java.lang.Object obj) |
SecsFormat[] |
getArray()
This allows for arrays of secsformats (not a list of secsformats).
|
boolean |
getBoolValue()
Returns the value of the format as a boolean.
|
byte |
getByteValue()
Returns the value of the format as a byte.
|
double |
getDoubleValue()
Returns the value of the format as a double.
|
float |
getFloatValue()
Returns the value of the format as a float.
|
byte[] |
getFormattedBytes()
Returns an array of bytes suitable for use in a SECS Message.
|
int |
getIntValue()
Returns the value of the format as a int.
|
int |
getLength()
Returns the length of the format.
|
long |
getLongValue()
Returns the value of the format as a long.
|
int |
getNumberOfLengthBytes()
Returns the number of length bytes.
|
short |
getShortValue()
Returns the value of the format as a short.
|
java.lang.String |
getStringValue()
Returns the value of the format as a string.
|
int |
hashCode() |
void |
setArray(SecsFormat[] newValues)
This allows for a standard way to set arrays of secsformats.
|
void |
setDataFromByteArray(byte[] temp,
int offset,
int length)
stores the incoming value in the format object.
|
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() |
java.lang.String |
toString(int indent)
Returns an SML string correctly indented.
|
boolean |
zeroLength()
Returns true if the format is zero length.
|
public ValueObjectInterface theData
public SecsFormat99(ValueObjectInterface value)
public static SecsFormat00 convertToSecsFormat(ArrayValueObject array)
convertSecsFormat
on each element.public static SecsFormat convertToSecsFormat(ValueObjectInterface value)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public SecsFormat[] getArray()
SecsFormat
getArray
in interface SecsFormat
public boolean getBoolValue()
SecsFormat
getBoolValue
in interface SecsFormat
public byte getByteValue()
SecsFormat
getByteValue
in interface SecsFormat
public double getDoubleValue()
SecsFormat
getDoubleValue
in interface SecsFormat
public float getFloatValue()
SecsFormat
getFloatValue
in interface SecsFormat
public byte[] getFormattedBytes() throws SecsException
SecsFormat
getFormattedBytes
in interface SecsFormat
SecsException
public int getIntValue()
SecsFormat
getIntValue
in interface SecsFormat
public int getLength()
SecsFormat
getLength
in interface SecsFormat
public long getLongValue()
SecsFormat
getLongValue
in interface SecsFormat
public int getNumberOfLengthBytes()
SecsFormat
getNumberOfLengthBytes
in interface SecsFormat
public short getShortValue()
SecsFormat
getShortValue
in interface SecsFormat
public java.lang.String getStringValue()
SecsFormat
getStringValue
in interface SecsFormat
public int hashCode()
hashCode
in class java.lang.Object
public void setArray(SecsFormat[] newValues) throws SecsException
SecsFormat
setArray
in interface SecsFormat
newValues
- SecsException
public void setDataFromByteArray(byte[] temp, int offset, int length) throws SecsException
SecsFormat
setDataFromByteArray
in interface SecsFormat
temp
- offset
- length
- SecsException
public void setLength(int newValue)
SecsFormat
setLength
in interface SecsFormat
newValue
- public void setNumberOfLengthBytes(int numberOfLengthBytes) throws java.lang.IllegalArgumentException
SecsFormat
setNumberOfLengthBytes
in interface SecsFormat
numberOfLengthBytes
- java.lang.IllegalArgumentException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int indent)
SecsFormat
toString
in interface SecsFormat
indent
- public boolean zeroLength()
SecsFormat
zeroLength
in interface SecsFormat
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.