ClassSample definition
|
Attributes
|
---|---|
HexDelimiter
(Add a delimiter after the binary message)
<fInteger dataName="dInt" size="int" byteOrdering="pc"/>
<hexDelim hexDelimCharStr="DDDD" /> For example, if you format an integer value of -1024 with this format element, you will get the binary message: 00FCFFFFDDDD (hex value).
|
hexDelimCharStr:
a String that represents an array of hex values.
|
FixedLength
(Adjusts a formatted binary message to a fixed length by either truncating it or by padding and justifying it)
<fString dataName="name" encoding="cp937"/>
<fixedLength length="10" alignment="right"/> For example, if you format a String “George” with this format element, you will get the binary message: 00000000C78596998785 (hex value). If you format a String “George. Wilhelm. T” with this format element, you will get the binary message: C785969987854B40E689 (hex value).
|
length:
an int value that indicates the length of the binary message.
default value is: 0.
padByte:
a byte in hex value representation. default value is: 00.
alignment:
optional values are: left, right.
default value is: left
|
MaximumLength
(Truncates the binary message if it is over the specified length. If the binary message is under the specified length, the decorator does not modify it)
<fString dataName="name" encoding="cp937"/>
<maxLength length="10"/> For example, if you format a String “George. Wilhelm. T” with this format element, you will get the binary message: C785969987854B40E689 (hex value).
|
length:
a int value that indicates the maximum length of the binary message. default value is: 0.
|
NullCheckDecorator
(Handles conversions between binary message and data field when either the binary message is empty or the data field is null)
<fString dataName="name" encoding="cp937"/>
<nullCheck/> For example, if you format a String which is null with this format element, you will get a binary message in 0 length. And if you unformat a binary message in 0 length, the format element will make no modification to the data field.
|
N/A
|
SelfLength
(Prefixes the length of the formatted binary message as an unsigned integer)
<fString dataName="name" encoding="cp937"/>
<selfLength/> For example, if you format a String “George. Wilhelm. T”, you will get the binary message: 12C785969987854B40E68993888593944B40E3 (hex value).
|
size:
the length of prefix. default value is 1.
byteOrdering:
the byte ordering of prefix. optional values are: host, pc.
default value is: pc.
lengthIncluded:
whether to include the length of prefix when calculating the length of binary message. Optional values are: yes, no Default value is: no.
|