UM .NET API 6.17.1

- Main Page
- Related Pages
- Packages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Properties | List of all members
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< PDMFieldInfo > | getFieldInfoList ()
| 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

  numFields | the 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

  numFields | the number of fields
  useIntsForNames | true 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

  name | the string name of the field
  type | the type of field
  required | whether 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

  name | the int name of the field
  type | the type of field
  required | whether 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

  name | the string name of the field
  type | the type of field
  fixedStrLen | the fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
  required | whether 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

  name | the int name of the field
  type | the type of field
  fixedStrLen | the fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
  required | whether 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

  name | the string name of the field
  type | the type of field
  required | whether or not the field is required
  numElements | a 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

  name | the int name of the field
  type | the type of field
  required | whether or not the field is required
  numElements | a 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

  name | the string name of the field
  type | the type of field
  fixedStrLen | the fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
  required | whether or not the field is required
  numElements | a 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

  name | the int name of the field
  type | the type of field
  fixedStrLen | the fixed string length (number of characters) and is normally 0 unless the type is fixed string or fixed unicode
  required | whether or not the field is required
  numElements | a 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

  otherDefnId | the 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

  other | the 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

  otherDefnId | the other definition id to compare against
  otherMsgVersMajor | the other definition major version to compare against
  otherMsgVersMinor | the 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

  other | the 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

  name | the 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

  name | the 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

  deser | the PDMDeserializer to use
  ba | the 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

  deser | the PDMDeserializer to use
  ba | the byte array to parse
  pos | the 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

  ser | the 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

  ser | the PDMSerializer to use
  ba | the byte array to serialize into
  pos | the 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 int com.latencybusters.pdm.PDMDefinition.Id
| get set

The Id property of the definition.

Values: the int id of the definition

Referenced by com.latencybusters.pdm.PDMDefinition.compareTo(), com.latencybusters.pdm.PDMDefinitionCache.containsKey(), com.latencybusters.pdm.PDMDefinitionCache.get(), com.latencybusters.pdm.PDMMessage.getFields(), and com.latencybusters.pdm.PDMDefinitionCache.put().

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
| get set

The MsgVersMajor property of the definition.

Values: the major version number for the definition and corresponding messages

Referenced by com.latencybusters.pdm.PDMDefinition.compareToWithVersion(), com.latencybusters.pdm.PDMDefinitionCache.containsKey(), com.latencybusters.pdm.PDMDefinitionCache.get(), com.latencybusters.pdm.PDMMessage.getFields(), and com.latencybusters.pdm.PDMDefinitionCache.put().

virtual sbyte com.latencybusters.pdm.PDMDefinition.MsgVersMinor
| get set

The MsgVersMinor property of the definition.

Values: the minor version number for the definition and corresponding messages

Referenced by com.latencybusters.pdm.PDMDefinition.compareToWithVersion(), com.latencybusters.pdm.PDMDefinitionCache.containsKey(), com.latencybusters.pdm.PDMDefinitionCache.get(), com.latencybusters.pdm.PDMMessage.getFields(), and com.latencybusters.pdm.PDMDefinitionCache.put().

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:

- PDMDefinition.cs