UM .NET API  6.16
com.latencybusters.pdm.PDMOffsetTable Class Reference

The PDMOffsetTable is used internally by a PDMMessage when optional or variable fields are set and then is written on the wire as field id and offset into the data segment. More...

Public Member Functions

 PDMOffsetTable (int numFields)
 Constructor takes the total number of fields from the definition including: REQ_FIX, REQ_VAR, OPT_VAR, OPT_FIX.
 
virtual void clearMinOffsetIndex ()
 
virtual void clear ()
 Clears all offsets back to -1.
 
virtual void set (int fieldId, int offset)
 Sets the field id to a specific offset.
 
virtual int get (int fieldId)
 Gets the specific offset for a field id or -1. More...
 
virtual bool isSet (int fieldId)
 Returns true if the offset for a field id is not -1. More...
 
virtual byte[] toBytes (PDMSerializer ser)
 Serializes the offset table to a new byte array. More...
 
virtual int toBytes (PDMSerializer ser, byte[] ba, int pos)
 Serializes the offset table to an existing byte array. More...
 
virtual int parse (PDMDeserializer deser, byte[] ba, int pos, int len)
 Parses an existing byte array into this object. More...
 

Properties

virtual int MinOffsetIndex [get]
 Returns the index of the field with the lowest offset.
 
virtual int NumSet [get]
 Gets the total number of set field offsets. More...
 
virtual int Size [get]
 The total size of the offset table (including unset fields) More...
 
virtual int[] Offsets [get]
 Gets the array of offsets where index is the field id. More...
 

Detailed Description

The PDMOffsetTable is used internally by a PDMMessage when optional or variable fields are set and then is written on the wire as field id and offset into the data segment.

Member Function Documentation

virtual int com.latencybusters.pdm.PDMOffsetTable.get ( int  fieldId)
virtual

Gets the specific offset for a field id or -1.

Returns
the offset

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

virtual bool com.latencybusters.pdm.PDMOffsetTable.isSet ( int  fieldId)
virtual

Returns true if the offset for a field id is not -1.

Returns
if the offset is set
virtual int com.latencybusters.pdm.PDMOffsetTable.parse ( PDMDeserializer  deser,
byte[]  ba,
int  pos,
int  len 
)
virtual

Parses an existing byte array into this object.

Returns
the updated position after parsing this object

References com.latencybusters.pdm.PDMDeserializer.readInt().

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

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

Serializes the offset table to a new byte array.

Returns
the new byte array

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

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

Serializes the offset table to an existing byte array.

Returns
the updated position after serializing this object

References com.latencybusters.pdm.PDMSerializer.writeInt().

Property Documentation

virtual int com.latencybusters.pdm.PDMOffsetTable.NumSet
get

Gets the total number of set field offsets.

Returns
the number of field offsets that are set
virtual int [] com.latencybusters.pdm.PDMOffsetTable.Offsets
get

Gets the array of offsets where index is the field id.

Returns
the offset array

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

virtual int com.latencybusters.pdm.PDMOffsetTable.Size
get

The total size of the offset table (including unset fields)

Returns
the size of the offset table (number passed to the constructor)

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


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