|
DataDirector API
|
#include <ChunkProducer.h>
Public Member Functions | |
| ChunkProducer () | |
| ~ChunkProducer () | |
| virtual void | ProcessMessage (unsigned char *msgBuf, unsigned int receivedLength) |
| virtual int | BuildMessage (unsigned char *msgBuf, unsigned int maxMessageLength, unsigned int chunkNumber) |
| ChunkAttribute * | FindAttributeByName (std::string &name) |
| ChunkDescription * | FindChunkDescriptionByName (std::string &name) |
| void | SetDebugMode (unsigned int debugMode) |
| void | SetCheckForChangeBeforeUpdate (const bool value) |
| virtual void | Start () |
Public Member Functions inherited from DDD_Base | |
| DDD_Base () | |
| virtual | ~DDD_Base () |
| const char * | GetInstanceName () const |
| virtual void | SetInstanceName (const char *name) |
| virtual void | SetParams (const DDD_AttributeList ¶ms) |
| virtual DDD_AttributeList & | GetParams () |
Static Public Member Functions | |
| static void | Swap2 (unsigned char *val) |
| static void | Swap4 (unsigned char *val) |
| static void | Swap8 (unsigned char *val) |
Static Public Member Functions inherited from DDD_LogFacade | |
| static void | LogDebug (const char *format,...) |
| static void | LogInfo (const char *format,...) |
| static void | LogWarning (const char *format,...) |
| static void | LogError (const char *format,...) |
Protected Member Functions | |
| void | ReadBitfield (ChunkAttribute *attr, unsigned char *msgBuf) |
| void | ReadInt (ChunkAttribute *attr, unsigned char *msgBuf) |
| void | ReadUInt (ChunkAttribute *attr, unsigned char *msgBuf) |
| void | ReadDouble (ChunkAttribute *attr, unsigned char *msgBuf) |
| void | ReadBoolean (ChunkAttribute *attr, unsigned char *msgBuf) |
| void | ReadString (ChunkAttribute *attr, unsigned char *msgBuf) |
| void | ReadChunk (ChunkDescription *chunk, unsigned char *msgBuf, unsigned int receivedLen) |
| int | WriteBitfield (ChunkAttribute *attr, unsigned char *msgBuf) |
| int | WriteInt (ChunkAttribute *attr, unsigned char *msgBuf) |
| int | WriteUInt (ChunkAttribute *attr, unsigned char *msgBuf) |
| int | WriteDouble (ChunkAttribute *attr, unsigned char *msgBuf) |
| int | WriteBoolean (ChunkAttribute *attr, unsigned char *msgBuf) |
| int | WriteString (ChunkAttribute *attr, unsigned char *msgBuf) |
| int | WriteChunk (ChunkDescription *chunk, unsigned char *msgBuf, unsigned int maxLen) |
| void | PrintDebugInfo (unsigned char *msgBuf, unsigned int receivedLength) |
| virtual void | OnAttributeChanged (DDD_AttributeBase *attribute) |
Protected Attributes | |
| unsigned int | _packetCount |
| unsigned int | _debugMode |
| bool | _checkForChangeBeforeUpdate |
Protected Attributes inherited from DDD_Base | |
| std::string | _instanceName |
| DDD_AttributeList | _params |
The Chunk Producer class. Abstract base class for other "Producers" that will produce attributes for use by the UDP_Asset
| ChunkProducer | ( | ) |
A list of chunk descriptions Constructor
| ~ChunkProducer | ( | ) |
Destructor
|
inlinevirtual |
Builds an outbound message buffer. Only implemented by ChunkProducers that send data.
| msgBuf | A buffer to contain the message |
| maxMessageLength | The max length of the message to build |
Reimplemented in DIS_Producer, and RawProducer.
| ChunkAttribute* FindAttributeByName | ( | std::string & | name | ) |
Find the chunk attribute by fully qualified name, e.g. chunkDesc.attributeName
| attributeName | The fully qualified attribute name to find |
| ChunkDescription* FindChunkDescriptionByName | ( | std::string & | name | ) |
Find the specified chunk description by name
| chunkName | The name of the chunk to find |
|
inlineprotectedvirtual |
A callback method that will be called when the attribute being observed changes if this observer has registered to be notified on attribute change
| attribute | A pointer to the attribute that changed |
Implements DDD_AttributeObserver.
Reimplemented in DIS_Producer, and RawProducer.
|
protected |
Processes an inbound message, only for printing debug information to the console.
| msgBuf | A buffer containing a message |
| receivedLength | The length of the received message |
|
inlinevirtual |
Processes an inbound message, classifying it into chunks and then updating their associated attributes. Required for producers which receive messages. Only implemented by ChunkProducers that receive data.
| msgBuf | A buffer containing a message |
| receivedLength | The length of the received message |
Reimplemented in DIS_Producer, XplaneProducer, and RawProducer.
|
protected |
Processes an inbound bitfield attribute update. Performs the actual decoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the bitfield attribute |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an inbound boolean attribute update. Performs the actual decoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the boolean |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an inbound chunk and updates any connected attributes
| chunk | The chunk specification |
| msgBuf | The UDP message buffer |
| receivedLen | The length of the UDP message |
|
protected |
Processes an inbound double/float attribute update. Performs the actual decoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the double |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an inbound integer attribute update. Performs the actual decoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the integer |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an inbound string attribute update. Strings are not byte swapped byte swapping, etc of the attribute
| attr | The chunk attribute describing the string |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an inbound unsigned integer attribute update. Performs the actual decoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the unsigned integer |
| msgBuf | A buffer containing a chunk of data |
|
inline |
Setter for the flag specifying whether to check for value change before updating over connections
| value | true = check for change before updating over connections, false = do not |
|
inline |
Sets the debug mode for the chunk producer
| debugMode | New debug Mode: 0=None, 1=Light, 2=Verbose |
|
inlinevirtual |
Perform any producer specific initialization
Reimplemented in DIS_Producer.
|
static |
Swaps a 2 byte quanity into the native byte order of this machine
| val | Pointer to the value to swap |
|
static |
Swaps a 4 byte quanity into the native byte order of this machine
| val | Pointer to the value to swap |
|
static |
Swaps an 8 byte quanity into the native byte order of this machine
| val | Pointer to the value to swap |
|
protected |
Processes an outbound bitfield attribute update. Performs the actual encoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the bitfield attribute |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an outbound boolean attribute update. Performs the actual encoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the boolean |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an outbound chunk
| chunk | The chunk specification |
| msgBuf | The UDP message buffer |
| receivedLen | The length of the UDP message |
|
protected |
Processes an outbound double/float attribute update. Performs the actual encoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the double |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an outbound integer attribute update. Performs the actual encoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the integer |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an outbound string attribute update. Strings are not byte swapped byte swapping, etc of the attribute
| attr | The chunk attribute describing the string |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Processes an outbound unsigned integer attribute update. Performs the actual encoding, byte swapping, etc of the attribute
| attr | The chunk attribute describing the unsigned integer |
| msgBuf | A buffer containing a chunk of data |
|
protected |
Whether or not to check the values for change before updating the connection value
|
protected |
0=None, 1=Light, 2=Verbose
|
protected |
For debugging only
1.8.10