MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
MAKLogger::DtLgrDisEntityPublisher Class Reference

DIS Entity Publisher. More...

+ Inheritance diagram for MAKLogger::DtLgrDisEntityPublisher:
+ Collaboration diagram for MAKLogger::DtLgrDisEntityPublisher:

Public Member Functions

 DT_VIRTUAL_CTR (DtLgrDisEntityPublisher,(const DtEntityStatePdu &pdu, DtLgrDisSimulationManager &simManager)) virtual ~DtLgrDisEntityPublisher()
 Main constructor. More...
 
virtual void update (const DtPdu &pdu, const DtAbsoluteTime &updateTime, bool isTimeFromPast, bool isStateUpdate, double scaling, bool isStatic, bool sendFlag)
 Process a state msg. More...
 
virtual void sendUpdateAtScaleChangePoint (double oldScale, double newScale, bool wasStatic, bool isStatic)
 Fills out 'toSend' with a potentially scaled version of the potentially dead-reckoned 'lastRead' (using the time and scale at the exact moment of switching to PAUSE), and sends using sendPdu. More...
 
virtual bool timeoutNow ()
 Returns 'true' if the logger should time out this entity. More...
 
virtual void tick (double scale, bool isStatic)
 Called periodically to give control to the entity. More...
 
virtual const DtEntityIdentifier & id ()
 Returns the entity's id. More...
 
virtual void processDIGuyPdu (const DtDIGuyCustomPdu &pdu)
 
- Public Member Functions inherited from MAKLogger::DtLgrPublisherInterface
 DtLgrPublisherInterface (DtLgrDisSimulationManager &simMgr)
 
virtual ~DtLgrPublisherInterface ()
 DTOR. More...
 
virtual DtPacketcreateUpdatePacket (const DtAbsoluteTime &time)
 Create an update packet with the given time from the publisher's encoded state data. More...
 
virtual void setExerciseId (unsigned char exerciseId)
 Set the exercise id. More...
 
virtual unsigned char exerciseId () const
 Get the associated exercise id. More...
 

Protected Member Functions

 DtLgrDisEntityPublisher (const DtLgrDisEntityPublisher &src)
 Copy constructor (not implemented) More...
 
DtLgrDisEntityPublisheroperator= (const DtLgrDisEntityPublisher &src)
 Assignment operator (not implemented) More...
 
virtual const DtStateMsg & lastState () const
 Return the last state update handled by the publisher. More...
 
virtual void doDDR (DtTime tm, double timescale)
 
virtual bool sendNow ()
 Returns 'true' if we need to send a pdu update right now, where the decision is based on either a heartbeat, or a forced "send" generated by time scale change. More...
 
virtual void sendScaled (double timescale, bool isStatic, bool doSend)
 Fills out 'toSend' with a potentially scaled version of 'lastRead', and sends using sendPdu. More...
 
virtual void sendCurrent (double timescale, bool isStatic)
 Fills out 'toSend' with a current data, and sends using sendPdu. More...
 
virtual void sendPdu ()
 Sends 'toSend' to the network and sets myLastRealTime to current time. More...
 
virtual bool getArtPartParamsFromPdu ()
 Extracts the current sets of articulated-part parameters and attached parts and (as stored in the 'lastRead' pdu) and copies them, respectively, in the 'myArtPartRecvList' object and the auxiliary buffer 'myDynBfr'. More...
 
virtual bool setArtPartParamsToPdu ()
 Copies the current set of articulated-part parameters and attached parts (as stored in the 'myArtPartSendList' object and the auxiliary buffer 'myDynBfr' respectively) to the 'toSend' pdu. More...
 
virtual bool scaleArtPartRateParams (double ts)
 Scales the rate parameters in the articulated parts (if any) using 'ts' as time-scale. More...
 
virtual bool drArtPartParamsToScaleChangePoint (DtTime dt)
 Scales the rate parameters in the articulated parts (if any) using 'ts' as time-scale. More...
 
virtual void scaleVecs (double ts)
 Scales 'scaledVel' and 'scaledRotVel' by 'ts', and 'scaledAcc' by the square of 'ts'. More...
 
virtual void scaleVelocity (double ts)
 Sets 'myScaledVel', to 'myExtrapVel' scaled by 'ts'. More...
 
- Protected Member Functions inherited from MAKLogger::DtLgrPublisherInterface
virtual void adjustConnectionExerciseId ()
 
virtual void resetConnectionExerciseId ()
 
virtual void adjustProtocolVersionToSend ()
 
virtual void resetProtocolVersionToSend ()
 
virtual void setInitialDISVersion (int version)
 

Protected Attributes

DtEntityStatePdu lastRead
 
DtEntityStatePdu toSend
 
DtTime myLastRealTime
 
DtClock * myClock
 
DtTaitBryan myExtrapEuler
 
DtVector myExtrapPos
 
DtVector32 myExtrapVel
 
DtVector32 myScaledVel
 
DtVector32 myScaledAcc
 
DtVector32 myScaledRotVel
 
DtLgrArtPartListmyArtPartRecvList
 
DtLgrArtPartListmyArtPartSendList
 
int myNumAttParts
 
char * myPartBuffer
 
int myPartBufferSize
 
double myLastTimeScale
 
bool myFrozenBeforePause
 
DtDeadReckoner * myOldDeadReckoner
 
DtDeadReckonTypes myOldDRType
 
bool myDRTypeChanged
 
DtEntityStateRepository * myEsr
 
- Protected Attributes inherited from MAKLogger::DtLgrPublisherInterface
DtTime myLastUpdateTime
 
DtLgrDisSimulationManagermySimMgr
 
unsigned char myExConnExerciseId
 
unsigned char myExerciseId
 
int myInitialDISVersion
 
int myDefaultDISVersion
 

Detailed Description

DIS Entity Publisher.

Constructor & Destructor Documentation

MAKLogger::DtLgrDisEntityPublisher::DtLgrDisEntityPublisher ( const DtLgrDisEntityPublisher src)
protected

Copy constructor (not implemented)

Member Function Documentation

virtual void MAKLogger::DtLgrDisEntityPublisher::doDDR ( DtTime  tm,
double  timescale 
)
protectedvirtual
virtual bool MAKLogger::DtLgrDisEntityPublisher::drArtPartParamsToScaleChangePoint ( DtTime  dt)
protectedvirtual

Scales the rate parameters in the articulated parts (if any) using 'ts' as time-scale.

MAKLogger::DtLgrDisEntityPublisher::DT_VIRTUAL_CTR ( DtLgrDisEntityPublisher  ,
(const DtEntityStatePdu &pdu, DtLgrDisSimulationManager &simManager)   
)

Main constructor.

Destructor

virtual bool MAKLogger::DtLgrDisEntityPublisher::getArtPartParamsFromPdu ( )
protectedvirtual

Extracts the current sets of articulated-part parameters and attached parts and (as stored in the 'lastRead' pdu) and copies them, respectively, in the 'myArtPartRecvList' object and the auxiliary buffer 'myDynBfr'.

virtual const DtEntityIdentifier& MAKLogger::DtLgrDisEntityPublisher::id ( )
virtual

Returns the entity's id.

virtual const DtStateMsg& MAKLogger::DtLgrDisEntityPublisher::lastState ( ) const
protectedvirtual

Return the last state update handled by the publisher.

Implements MAKLogger::DtLgrPublisherInterface.

DtLgrDisEntityPublisher& MAKLogger::DtLgrDisEntityPublisher::operator= ( const DtLgrDisEntityPublisher src)
protected

Assignment operator (not implemented)

virtual void MAKLogger::DtLgrDisEntityPublisher::processDIGuyPdu ( const DtDIGuyCustomPdu &  pdu)
virtual
virtual bool MAKLogger::DtLgrDisEntityPublisher::scaleArtPartRateParams ( double  ts)
protectedvirtual

Scales the rate parameters in the articulated parts (if any) using 'ts' as time-scale.

virtual void MAKLogger::DtLgrDisEntityPublisher::scaleVecs ( double  ts)
protectedvirtual

Scales 'scaledVel' and 'scaledRotVel' by 'ts', and 'scaledAcc' by the square of 'ts'.

virtual void MAKLogger::DtLgrDisEntityPublisher::scaleVelocity ( double  ts)
protectedvirtual

Sets 'myScaledVel', to 'myExtrapVel' scaled by 'ts'.

virtual void MAKLogger::DtLgrDisEntityPublisher::sendCurrent ( double  timescale,
bool  isStatic 
)
protectedvirtual

Fills out 'toSend' with a current data, and sends using sendPdu.

virtual bool MAKLogger::DtLgrDisEntityPublisher::sendNow ( )
protectedvirtual

Returns 'true' if we need to send a pdu update right now, where the decision is based on either a heartbeat, or a forced "send" generated by time scale change.

If no update is necessary (at present), the method returns 'false'.

virtual void MAKLogger::DtLgrDisEntityPublisher::sendPdu ( )
protectedvirtual

Sends 'toSend' to the network and sets myLastRealTime to current time.

virtual void MAKLogger::DtLgrDisEntityPublisher::sendScaled ( double  timescale,
bool  isStatic,
bool  doSend 
)
protectedvirtual

Fills out 'toSend' with a potentially scaled version of 'lastRead', and sends using sendPdu.

virtual void MAKLogger::DtLgrDisEntityPublisher::sendUpdateAtScaleChangePoint ( double  oldScale,
double  newScale,
bool  wasStatic,
bool  isStatic 
)
virtual

Fills out 'toSend' with a potentially scaled version of the potentially dead-reckoned 'lastRead' (using the time and scale at the exact moment of switching to PAUSE), and sends using sendPdu.

Implements MAKLogger::DtLgrPublisherInterface.

virtual bool MAKLogger::DtLgrDisEntityPublisher::setArtPartParamsToPdu ( )
protectedvirtual

Copies the current set of articulated-part parameters and attached parts (as stored in the 'myArtPartSendList' object and the auxiliary buffer 'myDynBfr' respectively) to the 'toSend' pdu.

virtual void MAKLogger::DtLgrDisEntityPublisher::tick ( double  scale,
bool  isStatic 
)
virtual

Called periodically to give control to the entity.

As implemented, we send any interim "heartbeat" PDUs

Implements MAKLogger::DtLgrPublisherInterface.

virtual bool MAKLogger::DtLgrDisEntityPublisher::timeoutNow ( )
virtual

Returns 'true' if the logger should time out this entity.

virtual void MAKLogger::DtLgrDisEntityPublisher::update ( const DtPdu &  pdu,
const DtAbsoluteTime updateTime,
bool  isTimeFromPast,
bool  isStateUpdate,
double  scaling,
bool  isStatic,
bool  sendFlag 
)
virtual

Process a state msg.

Send (a potentially scaled version) only if sendFlag is 'true'.

Implements MAKLogger::DtLgrPublisherInterface.

Member Data Documentation

DtEntityStatePdu MAKLogger::DtLgrDisEntityPublisher::lastRead
protected
DtLgrArtPartList* MAKLogger::DtLgrDisEntityPublisher::myArtPartRecvList
protected
DtLgrArtPartList* MAKLogger::DtLgrDisEntityPublisher::myArtPartSendList
protected
DtClock* MAKLogger::DtLgrDisEntityPublisher::myClock
protected
bool MAKLogger::DtLgrDisEntityPublisher::myDRTypeChanged
protected
DtEntityStateRepository* MAKLogger::DtLgrDisEntityPublisher::myEsr
protected
DtTaitBryan MAKLogger::DtLgrDisEntityPublisher::myExtrapEuler
protected
DtVector MAKLogger::DtLgrDisEntityPublisher::myExtrapPos
protected
DtVector32 MAKLogger::DtLgrDisEntityPublisher::myExtrapVel
protected
bool MAKLogger::DtLgrDisEntityPublisher::myFrozenBeforePause
protected
DtTime MAKLogger::DtLgrDisEntityPublisher::myLastRealTime
protected
double MAKLogger::DtLgrDisEntityPublisher::myLastTimeScale
protected
int MAKLogger::DtLgrDisEntityPublisher::myNumAttParts
protected
DtDeadReckoner* MAKLogger::DtLgrDisEntityPublisher::myOldDeadReckoner
protected
DtDeadReckonTypes MAKLogger::DtLgrDisEntityPublisher::myOldDRType
protected
char* MAKLogger::DtLgrDisEntityPublisher::myPartBuffer
protected
int MAKLogger::DtLgrDisEntityPublisher::myPartBufferSize
protected
DtVector32 MAKLogger::DtLgrDisEntityPublisher::myScaledAcc
protected
DtVector32 MAKLogger::DtLgrDisEntityPublisher::myScaledRotVel
protected
DtVector32 MAKLogger::DtLgrDisEntityPublisher::myScaledVel
protected
DtEntityStatePdu MAKLogger::DtLgrDisEntityPublisher::toSend
protected

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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)