Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
MAKLogger::DtPacket Class Reference

A generic packed of typed binary data. More...

+ Collaboration diagram for MAKLogger::DtPacket:

List of all members.

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 DtAbsoluteTimetime () 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.
DtSmartBufferbuffer ()
 Get the internal buffer of the packet.
const DtSmartBufferbuffer () const
 Get the internal buffer of the packet.

Static Public Member Functions

static DtPacketcreate (DtSmartBuffer data, DtAbsoluteTime time, int type, int id=-1)
 CTOR which takes a shared smart buffer and the time and type.
static DtPacketcreate (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 DtPackettheFirstPacket
 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.
DtPacketnext
 Deallocate the chunks of data used.
static void deleteChunks ()
 Deallocate the chunks of data used.

Detailed Description

A generic packed of typed binary data.


Member Enumeration Documentation

MIGRATION Info Same values as LtPacketKind in Logger 3.x versions.

Enumerator:
Type_RecordingData 

New for 4.0, multiple time stamped updates.

Type_GeneratedUpdate = 10, //! New for 4.0 use the time of the packet when ! sending.

Type_ConfigData 

entity metadata

Type_UpdateDDM 

configuration metadata

These two are new for Logger 4.4

Type_InteractionDDM 

update with DDM region data (Only makes sense for HLA)

Type_TapeTimeDate 

interaction with DDM data (Only makes sense for HLA)


Member Function Documentation

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.

Return values:
nullAttribute was not found.
bool MAKLogger::DtPacket::removeAttribute ( int  )

Removes the attribute.

Return values:
trueAttribute was removed.
falseAttribute was not removed (due to not being found).

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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)