UM .NET API  6.16.1
com.latencybusters.pdm.PDMDefinition Class Reference

The message definition class that needs to be populated and finalized before using in a PDMMessage. More...

Public Member Functions

 PDMDefinition (int numFields)
 Creates a new definition with the specified number of fields. More...
 
 PDMDefinition (int numFields, bool useIntsForNames)
 Creates a new definition with the specified number of fields and whether or not to use ints or strings as field names. More...
 
List< PDMFieldInfogetFieldInfoList ()
 The accessor method for the list of field info. More...
 
List< PDMFieldInfo >.Enumerator createFieldInfoIterator ()
 Creates an iterator of PDMFieldInfo to iterate through the field information. More...
 
virtual void finalizeDef ()
 Finalizes the definition to ready it for use in a message.
 
virtual PDMFieldInfo getFieldInfo (int name)
 Access the field information by integer name. More...
 
virtual PDMFieldInfo getFieldInfo (System.String name)
 Access the field information by String name. More...
 
virtual PDMFieldInfo addFieldInfo (System.String name, PDMFieldType type, bool required)
 Adds field information to the definition with a string field name. More...
 
virtual PDMFieldInfo addFieldInfo (int name, PDMFieldType type, bool required)
 Adds field information to the definition with an int field name. More...
 
virtual PDMFieldInfo addFieldInfo (System.String name, PDMFieldType type, int fixedStrLen, bool required)
 Adds field information to the definition for a fixed length string field with a string field name. More...
 
virtual PDMFieldInfo addFieldInfo (int name, PDMFieldType type, int fixedStrLen, bool required)
 Adds field information to the definition for a fixed length string field with an int field name. More...
 
virtual PDMFieldInfo addFieldInfo (System.String name, PDMFieldType type, bool required, int numElements)
 Adds field information to the definition for a fixed-size array field with a string field name. More...
 
virtual PDMFieldInfo addFieldInfo (int name, PDMFieldType type, bool required, int numElements)
 Adds field information to the definition for a fixed-size array field with an int field name. More...
 
virtual PDMFieldInfo addFieldInfo (System.String name, PDMFieldType type, int fixedStrLen, bool required, int numElements)
 Adds field information to the definition for a fixed-size array field of fixed length strings with a string field name. More...
 
virtual PDMFieldInfo addFieldInfo (int name, PDMFieldType type, int fixedStrLen, bool required, int numElements)
 Adds field information to the definition for a fixed-size array field of fixed length strings with an int field name. More...
 
virtual int compareToWithVersion (int otherDefnId, int otherMsgVersMajor, int otherMsgVersMinor)
 Used to compare this PDMDefinition to another's properties taking into account the definition id and the major and minor message version. More...
 
virtual int compareToWithVersion (PDMDefinition other)
 Used to compare this PDMDefinition to another taking into account the definition id and the major and minor message version. More...
 
virtual int compareTo (int otherDefnId)
 Used to compare this PDMDefinition to another's id taking into account only the the definition id. More...
 
virtual int compareTo (PDMDefinition other)
 Used to compare this PDMDefinition to another taking into account only the the definition id. More...
 
virtual byte[] toBytes (PDMSerializer ser)
 Serializes the PDMDefinition to a new byte array. More...
 
virtual int toBytes (PDMSerializer ser, byte[] ba, int pos)
 Serialize the PDMDefinition to an existing byte array. More...
 
virtual int parse (PDMDeserializer deser, byte[] ba)
 Parses an existing byte array into this object. More...
 
virtual int parse (PDMDeserializer deser, byte[] ba, int pos)
 Parses an existing byte array into this object. More...
 

Properties

virtual int NumFields [get]
 The NumFields property of the definition. More...
 
virtual bool Finalized [get]
 The finalized property of the definition. More...
 
virtual sbyte MsgVersMajor [get, set]
 The MsgVersMajor property of the definition. More...
 
virtual sbyte MsgVersMinor [get, set]
 The MsgVersMinor property of the definition. More...
 
virtual int Id [get, set]
 The Id property of the definition. More...
 
virtual bool IntsForNames [get]
 The IntsForNames property of the definition. More...
 

Detailed Description

The message definition class that needs to be populated and finalized before using in a PDMMessage.

Constructor & Destructor Documentation

com.latencybusters.pdm.PDMDefinition.PDMDefinition ( int  numFields)

Creates a new definition with the specified number of fields.

Parameters
numFieldsthe number of fields
com.latencybusters.pdm.PDMDefinition.PDMDefinition ( int  numFields,
bool  useIntsForNames 
)

Creates a new definition with the specified number of fields and whether or not to use ints or strings as field names.

Parameters
numFieldsthe number of fields
useIntsForNamestrue to use ints as field names or false to use string field names (the default)

Member Function Documentation

virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( System.String  name,
PDMFieldType  type,
bool  required 
)
virtual

Adds field information to the definition with a string field name.

Parameters
namethe string name of the field
typethe type of field
requiredwhether or not the field is required
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( int  name,
PDMFieldType  type,
bool  required 
)
virtual

Adds field information to the definition with an int field name.

Parameters
namethe int name of the field
typethe type of field
requiredwhether or not the field is required
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( System.String  name,
PDMFieldType  type,
int  fixedStrLen,
bool  required 
)
virtual

Adds field information to the definition for a fixed length string field with a string field name.

Parameters
namethe string name of the field
typethe type of field
fixedStrLenthe fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
requiredwhether or not the field is required
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( int  name,
PDMFieldType  type,
int  fixedStrLen,
bool  required 
)
virtual

Adds field information to the definition for a fixed length string field with an int field name.

Parameters
namethe int name of the field
typethe type of field
fixedStrLenthe fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
requiredwhether or not the field is required
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( System.String  name,
PDMFieldType  type,
bool  required,
int  numElements 
)
virtual

Adds field information to the definition for a fixed-size array field with a string field name.

Parameters
namethe string name of the field
typethe type of field
requiredwhether or not the field is required
numElementsa non-zero value is used to define a fixed-size array for array types
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( int  name,
PDMFieldType  type,
bool  required,
int  numElements 
)
virtual

Adds field information to the definition for a fixed-size array field with an int field name.

Parameters
namethe int name of the field
typethe type of field
requiredwhether or not the field is required
numElementsa non-zero value is used to define a fixed-size array for array types
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( System.String  name,
PDMFieldType  type,
int  fixedStrLen,
bool  required,
int  numElements 
)
virtual

Adds field information to the definition for a fixed-size array field of fixed length strings with a string field name.

Parameters
namethe string name of the field
typethe type of field
fixedStrLenthe fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
requiredwhether or not the field is required
numElementsa non-zero value is used to define a fixed-size array for array types
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.addFieldInfo ( int  name,
PDMFieldType  type,
int  fixedStrLen,
bool  required,
int  numElements 
)
virtual

Adds field information to the definition for a fixed-size array field of fixed length strings with an int field name.

Parameters
namethe int name of the field
typethe type of field
fixedStrLenthe fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
requiredwhether or not the field is required
numElementsa non-zero value is used to define a fixed-size array for array types
Returns
the PDMFieldInfo handle
virtual int com.latencybusters.pdm.PDMDefinition.compareTo ( int  otherDefnId)
virtual

Used to compare this PDMDefinition to another's id taking into account only the the definition id.

Parameters
otherDefnIdthe other definition id to compare against
Returns
0 if the two are equal, 1 if this PDMDefinition is greater, -1 if this PDMDefinition is less

Referenced by com.latencybusters.pdm.PDMMessage.getFields().

virtual int com.latencybusters.pdm.PDMDefinition.compareTo ( PDMDefinition  other)
virtual

Used to compare this PDMDefinition to another taking into account only the the definition id.

Parameters
otherthe other PDMDefinition to compare against
Returns
0 if the two are equal, 1 if this PDMDefinition is greater, -1 if this PDMDefinition is less

References com.latencybusters.pdm.PDMDefinition.Id.

virtual int com.latencybusters.pdm.PDMDefinition.compareToWithVersion ( int  otherDefnId,
int  otherMsgVersMajor,
int  otherMsgVersMinor 
)
virtual

Used to compare this PDMDefinition to another's properties taking into account the definition id and the major and minor message version.

Parameters
otherDefnIdthe other definition id to compare against
otherMsgVersMajorthe other definition major version to compare against
otherMsgVersMinorthe other definition minor version to compare against
Returns
0 if the two are equal, 1 if this PDMDefinition is greater, -1 if this PDMDefinition is less

Referenced by com.latencybusters.pdm.PDMMessage.getFields().

virtual int com.latencybusters.pdm.PDMDefinition.compareToWithVersion ( PDMDefinition  other)
virtual

Used to compare this PDMDefinition to another taking into account the definition id and the major and minor message version.

Parameters
otherthe other PDMDefinition to compare against
Returns
0 if the two are equal, 1 if this PDMDefinition is greater, -1 if this PDMDefinition is less

References com.latencybusters.pdm.PDMDefinition.MsgVersMajor, and com.latencybusters.pdm.PDMDefinition.MsgVersMinor.

List<PDMFieldInfo>.Enumerator com.latencybusters.pdm.PDMDefinition.createFieldInfoIterator ( )

Creates an iterator of PDMFieldInfo to iterate through the field information.

Returns
an Enumerator used to iterate through the list of PDMFieldInfo
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.getFieldInfo ( int  name)
virtual

Access the field information by integer name.

Parameters
namethe int field name
Returns
the PDMFieldInfo handle
virtual PDMFieldInfo com.latencybusters.pdm.PDMDefinition.getFieldInfo ( System.String  name)
virtual

Access the field information by String name.

Parameters
namethe string field name
Returns
the PDMFieldInfo handle
List< PDMFieldInfo > com.latencybusters.pdm.PDMDefinition.getFieldInfoList ( )

The accessor method for the list of field info.

Returns
the list of PDMFieldInfo objects

Referenced by com.latencybusters.pdm.PDMMessage.getFields().

virtual int com.latencybusters.pdm.PDMDefinition.parse ( PDMDeserializer  deser,
byte[]  ba 
)
virtual

Parses an existing byte array into this object.

Parameters
deserthe PDMDeserializer to use
bathe byte array to parse
Returns
the updated position after parsing this object

Referenced by com.latencybusters.pdm.PDMMessage.getFields().

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

Parses an existing byte array into this object.

Parameters
deserthe PDMDeserializer to use
bathe byte array to parse
posthe position to start parsing in the byte array
Returns
the updated position after parsing this object

References com.latencybusters.pdm.PDMFieldInfo.IntName, com.latencybusters.pdm.PDMDeserializer.readBoolean(), com.latencybusters.pdm.PDMDeserializer.readByte(), com.latencybusters.pdm.PDMDeserializer.readInt(), and com.latencybusters.pdm.PDMFieldInfo.StrName.

virtual byte [] com.latencybusters.pdm.PDMDefinition.toBytes ( PDMSerializer  ser)
virtual

Serializes the PDMDefinition to a new byte array.

Parameters
serthe PDMSerializer to use
Returns
the new byte array

Referenced by com.latencybusters.pdm.PDMMessage.getFields().

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

Serialize the PDMDefinition to an existing byte array.

Parameters
serthe PDMSerializer to use
bathe byte array to serialize into
posthe position to start at in the byte array
Returns
the updated position after serializing this object

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

Property Documentation

virtual bool com.latencybusters.pdm.PDMDefinition.Finalized
get

The finalized property of the definition.

Values: whether or not the definition has been finalized yet

Referenced by com.latencybusters.pdm.PDMMessage.loadDefinition().

virtual bool com.latencybusters.pdm.PDMDefinition.IntsForNames
get

The IntsForNames property of the definition.

Values: whether or not ints are used for names in this definition

virtual sbyte com.latencybusters.pdm.PDMDefinition.MsgVersMajor
getset
virtual sbyte com.latencybusters.pdm.PDMDefinition.MsgVersMinor
getset
virtual int com.latencybusters.pdm.PDMDefinition.NumFields
get

The NumFields property of the definition.

Values: the number of fields specified for this definition

Referenced by com.latencybusters.pdm.PDMMessage.getFields().


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