A generic packed of typed binary data. More...
Collaboration diagram for MAKLogger::DtPacket:Public Types | |
| enum | DtPacketType { Type_Interaction = 0, Type_Update = 1, Type_Removal = 2, Type_Annotation = 3, Type_Pdu = 4, Type_Fom = 5, Type_Audio = 6, Type_Checkpoint = 7, Type_IndexTable = 8, Type_MultiTSUpdates = 9, Type_RecordingData = 11, Type_SimulationData = 12, Type_EntityTable = 13, Type_ConfigData = 14, Type_UpdateDDM = 15, Type_InteractionDDM = 16, Type_TapeTimeDate = 17, Type_Pause = 18, Type_Unpause = 19, Type_None = 0x7FFFFFF0 } |
| MIGRATION Info Same values as LtPacketKind in Logger 3.x versions. More... | |
| enum | FilterType { Unfiltered, Filtered, Dropped } |
Public Member Functions | |
| ~DtPacket () | |
| DTOR which releases resources. | |
| void | operator delete (void *v, size_t t) |
| Customized delete packet. | |
| bool | operator< (const DtPacket &) const |
| Check to see if this packet comes before another packet. | |
| FilterType | filter () const |
| Get the filter setting applied to this packet. | |
| size_t | size () const |
| Get the size of the packet's data in bytes. | |
| const DtAbsoluteTime & | time () const |
| Get the time of the packet. | |
| int | type () const |
| Get the type of the packet. | |
| DtLgrEntityTracker::EntryHandle | entityId () const |
| Get the entity ID of the packet. | |
| void | setEntityId (DtLgrEntityTracker::EntryHandle id) |
| Set the entity ID of the packet. | |
| void | setFilter (FilterType filter) |
| void | setTime (DtAbsoluteTime time) |
| void | setType (int type) |
| void | addAttribute (DtPacketAttributeSP) |
| Add integer mapped attributes. | |
| bool | removeAttribute (int) |
| Removes the attribute. | |
| DtPacketAttributeSP | lookupAttribute (int) |
| Lookup attribute, fairly fast. | |
| void | convertTime (DtAbsoluteTime inputCurrentTime, DtAbsoluteTime outputCurrentTime) |
| char * | data () |
| Get the data pointer. | |
| const char * | data () const |
| Get the data pointer. | |
| DtSmartBuffer & | buffer () |
| Get the internal buffer of the packet. | |
| const DtSmartBuffer & | buffer () const |
| Get the internal buffer of the packet. | |
Static Public Member Functions | |
| static DtPacket * | create (DtSmartBuffer data, DtAbsoluteTime time, int type, int id=-1) |
| CTOR which takes a shared smart buffer and the time and type. | |
| static DtPacket * | create (size_t size, DtAbsoluteTime time, int type, int id=-1) |
| CTOR which defines the size, which will create it's own smart buffer. | |
| static DtAbsoluteTime | convertTime (DtAbsoluteTime inputCurrentTime, DtAbsoluteTime outputCurrentTime, DtAbsoluteTime arrivalTime) |
| Convert the arrivalTime using both the Current Input time, and the current ouputTime. | |
Protected Member Functions | |
| DtPacket (DtSmartBuffer data, DtAbsoluteTime time, int type, int id) | |
| DtPacket (size_t size, DtAbsoluteTime time, int type, int id) | |
| CTOR which defines the size, which will create it's own smart buffer. | |
| void * | operator new (size_t t) |
Protected Attributes | |
| DtAbsoluteTime | myTime |
| The time of the packet (typically the arrival time) | |
| DtLgrEntityTracker::EntryHandle | myEntityId |
| int | myType |
| The type of packet. | |
| FilterType | myFilterCondition |
| The filter condition of a packet Initially DtUnfiltered. | |
| DtSmartBuffer | myData |
| Pointer to packet data. | |
| std::list< DtPacketAttributeSP > | myAttributes |
| Attribute list, initially NULL. | |
| static DtPacket * | theFirstPacket |
| Deallocate the chunks of data used. | |
| static DtMutex | thePacketListMutex |
| Deallocate the chunks of data used. | |
| static std::vector< char * > | theMemoryChunks |
| Deallocate the chunks of data used. | |
| static char * | currentMemory |
| Deallocate the chunks of data used. | |
| static char * | endMemory |
| Deallocate the chunks of data used. | |
| DtPacket * | next |
| Deallocate the chunks of data used. | |
| static void | deleteChunks () |
| Deallocate the chunks of data used. | |
A generic packed of typed binary data.
MIGRATION Info Same values as LtPacketKind in Logger 3.x versions.
| void MAKLogger::DtPacket::addAttribute | ( | DtPacketAttributeSP | ) |
Add integer mapped attributes.
Used to store cached data. The integer must be >= 0 or add will quietly fail.
| static DtAbsoluteTime MAKLogger::DtPacket::convertTime | ( | DtAbsoluteTime | inputCurrentTime, |
| DtAbsoluteTime | outputCurrentTime, | ||
| DtAbsoluteTime | arrivalTime | ||
| ) | [static] |
Convert the arrivalTime using both the Current Input time, and the current ouputTime.
| DtPacketAttributeSP MAKLogger::DtPacket::lookupAttribute | ( | int | ) |
Lookup attribute, fairly fast.
| null | Attribute was not found. |
| bool MAKLogger::DtPacket::removeAttribute | ( | int | ) |
Removes the attribute.
| true | Attribute was removed. |
| false | Attribute was not removed (due to not being found). |