ClassSample definition
|
Attributes
|
---|---|
StringFormat
(Format/unformat a data field which is in type of java.lang.String)
<fString dataName="name" encoding="cp937"/>
|
encoding:
the encoding of string. If not specified, uses default encoding of java system.
formatAs: optional values are: lowercase,uppercase and nocasecast. default value is nocasecast.
unformatAs: optional values are: lowercase,uppercase and nocasecast. default value is nocasecast.
|
IntegerFormat
(Format/unformat a data field which is in type of byte, short, int or long)
<fInteger dataName="dInt" size="int" byteOrdering="pc"/>
For example, if you format an integer value of -1024 with this format element, you will get the binary message: 00FCFFFF (hex value).
If you unformat a binary message 00FCFFFF with this format element, you will get an integer value of -1024.
|
size:
optional values are: 1(byte), 2(short), 4(int), 8(long). default value is 4.
byteOrdering:
optional values are: pc(little-endian) and host(big-endian). default value is pc.
signRule:
optional values are: yes, no. default value is yes.
|
FloatFormat
(Format/unformat a data field which is in type of float or double)
<fFloat dataName="dFloat" size="float" byteOrdering="host"/>
For example, if you format a float value of -1024.5, you will get the binary message: C4801000 (hex value). If you unformat a binary message C4801000 with this format element, you will get a float value of -1024.5
|
size:
optional values are: 4(float), 8(double) default value is 4.
byteOrdering:
optional values are: pc(little-endian) and host(big-endian). default value is pc.
|
PackedFormat
(Format/unformat a data field which is in type of float/double/integer/long, target message is byte representation of the data field)
<fPacked dataName="dDouble" decPlaces="2" type="double"/>
For example, if you format a double value of -1024.5 with this format element, you will get the binary message: 0102450D (hex value).
|
decPlaces:
an integer value which is >=0 default value is 0.
signed:
optional values are: yes, no default value is: yes
type:
optional values are: float, double, int, long default value is: int
|
PackedDateFormat
(Format/unformat a data field which is in type of Date)
<fPackedDate dataName="aDate" />
For example, if you format a Date value of Fri Apr 24 10:00:00 GMT+03:00 1998, you will get the binary message: 240498 (hex value).
|
N/A
|