UM Java API  6.16.1
com.latencybusters.pdm.PDMFieldInfo Class Reference

Public Member Functions

PDMFieldType getType ()
 
String getStrName ()
 
int getIntName ()
 

Protected Member Functions

 PDMFieldInfo (int id, String name, PDMFieldType type, boolean required)
 
 PDMFieldInfo (int id, int name, PDMFieldType type, boolean required)
 
 PDMFieldInfo (int id, String name, PDMFieldType type, int fixedStrLen, boolean required)
 
 PDMFieldInfo (int id, int name, PDMFieldType type, int fixedStrLen, boolean required)
 
 PDMFieldInfo (int id, String strName, int intName, PDMFieldType type, int fixedStrLen, boolean required, int numElements)
 
int getId ()
 
boolean isRequired ()
 
boolean isFixed ()
 
int getLen ()
 
int getFixedStrLen ()
 
int getNumElements ()
 
boolean isArray ()
 
byte[] toBytes (PDMSerializer ser)
 
int toBytes (PDMSerializer ser, byte[] ba, int pos)
 
int parse (PDMDeserializer deser, byte[] ba)
 
int parse (PDMDeserializer deser, byte[] ba, int pos)
 

Static Protected Attributes

static final int INT_NAME_KNOWN_LEN = 28
 

Detailed Description

A handle to field information returned from a PDMDefinition that is used when adding a field value to a PDMMessage.

Author
jfugitt

Constructor & Destructor Documentation

com.latencybusters.pdm.PDMFieldInfo.PDMFieldInfo ( int  id,
String  name,
PDMFieldType  type,
boolean  required 
)
protected

Constructor used for single value fields with string names (except for fixed length strings)

Parameters
idthe internal id
namethe string name
typethe type
requiredwhether or not the field is required
com.latencybusters.pdm.PDMFieldInfo.PDMFieldInfo ( int  id,
int  name,
PDMFieldType  type,
boolean  required 
)
protected

Constructor used for single value fields with int names (except for fixed length strings)

Parameters
idthe internal id
namethe int name
typethe type
requiredwhether or not the field is required
com.latencybusters.pdm.PDMFieldInfo.PDMFieldInfo ( int  id,
String  name,
PDMFieldType  type,
int  fixedStrLen,
boolean  required 
)
protected

Constructor used for single value fixed-length string fields with String names

Parameters
idthe internal id
namethe string name
typethe type
fixedStrLenthe fixed string length for this field
requiredwhether or not the field is required
com.latencybusters.pdm.PDMFieldInfo.PDMFieldInfo ( int  id,
int  name,
PDMFieldType  type,
int  fixedStrLen,
boolean  required 
)
protected

Constructor used for single value fixed-length string fields with int names

Parameters
idthe internal id
namethe int name
typethe type
fixedStrLenthe fixed string length for this field
requiredwhether or not the field is required
com.latencybusters.pdm.PDMFieldInfo.PDMFieldInfo ( int  id,
String  strName,
int  intName,
PDMFieldType  type,
int  fixedStrLen,
boolean  required,
int  numElements 
)
protected

General constructor used for any single value or array field of fixed length or variable length with string or int names

Parameters
idthe internal id of the field info
strNamethe string name
intNamethe int name
typethe type
fixedStrLenthe fixed string length for this field
requiredwhether or not the field is required
numElementsthe number of array elements for fixed-size arrays or 0

Member Function Documentation

int com.latencybusters.pdm.PDMFieldInfo.parse ( PDMDeserializer  deser,
byte[]  ba 
)
protected

Parses the byte array into this object

Parameters
deser
ba
Returns
the updated position in the byte array after parsing this object

Referenced by com.latencybusters.pdm.PDMDefinition.parse().

int com.latencybusters.pdm.PDMFieldInfo.parse ( PDMDeserializer  deser,
byte[]  ba,
int  pos 
)
protected

Parses the byte array at position into this object

Parameters
deser
ba
pos
Returns
the updated position in the byte array after parsing this object

References com.latencybusters.pdm.PDMDeserializer.readBoolean(), com.latencybusters.pdm.PDMDeserializer.readInt(), com.latencybusters.pdm.PDMDeserializer.readShort(), and com.latencybusters.pdm.PDMDeserializer.readString().

byte [] com.latencybusters.pdm.PDMFieldInfo.toBytes ( PDMSerializer  ser)
protected

Serializes this object to a new byte array

Parameters
ser
Returns
the new byte array

Referenced by com.latencybusters.pdm.PDMDefinition.calcLen(), and com.latencybusters.pdm.PDMDefinition.toBytes().

int com.latencybusters.pdm.PDMFieldInfo.toBytes ( PDMSerializer  ser,
byte[]  ba,
int  pos 
)
protected

Serializes this object to an existing byte array at position

Parameters
ser
ba
pos
Returns
the updated position in the byte array after serializing this object

References com.latencybusters.pdm.PDMSerializer.writeBoolean(), com.latencybusters.pdm.PDMSerializer.writeInt(), com.latencybusters.pdm.PDMSerializer.writeShort(), and com.latencybusters.pdm.PDMSerializer.writeString().


The documentation for this class was generated from the following file: