VR-Link API Documentation for HLA 1.3
designatePdu.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00008 
00009 #ifndef DtDesignatorPdu_H_
00010 #define DtDesignatorPdu_H_
00011 
00012 #if DtDIS
00013 
00014 #include "hostStructs.h"
00015 #include "stateMsg.h"
00016 #include <matrix/vlMath.h>
00017 #include "packets/designateP.h"
00018 
00019 
00020 class DtExerciseConn;
00021 class DtDesignatorPdu;
00022 
00024 typedef void (*DtDesignatorPduCb)( DtDesignatorPdu* pdu, void* usr );
00025 
00029 class DT_DLL_VL DtDesignatorPdu : public DtStateMsg
00030 {
00031 public:
00033    enum {
00034       DtDesignatorStaticSizeVERS5 = 88,   
00035       DtDesignatorStaticSizeVERS4 = 72
00036    };
00037 
00039    enum { PduStaticSize = DtDesignatorStaticSizeVERS5 };
00040 
00041 public:
00043    DtDesignatorPdu( DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );
00044    
00046    DtDesignatorPdu( const DtNetDesignatorPdu* initial,
00047                     DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );
00048 
00051    static DtPdu* create( const DtNetPacket* initial,
00052                          DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );
00053    
00055    static void addCallback( DtExerciseConn* conn,
00056                             DtDesignatorPduCb cb, void* usr );
00057 
00059    static void removeCallback( DtExerciseConn* conn,
00060                                DtDesignatorPduCb cb, void* usr );
00061 
00063 
00064    const DtEntityIdentifier& designatingEntityId() const;
00065    void setDesignatingEntityId( const DtEntityIdentifier& id );
00067 
00069 
00070    DtDesignatorCodeName codeName() const;
00071    void setCodeName( DtDesignatorCodeName name );
00073 
00075 
00076    const DtEntityIdentifier& designatedEntityId() const;
00077    void setDesignatedEntityId( const DtEntityIdentifier& id );
00079 
00081 
00082    DtDesignatorCode designatorCode() const;
00083    void setDesignatorCode( DtDesignatorCode code );
00085 
00087 
00088    float power() const;
00089    void setPower( float power );
00091 
00093 
00094    float wavelength() const;
00095    void setWavelength( float wavelength );
00097 
00099 
00100    const DtVector& designatorSpotRelative() const;
00101    void setDesignatorSpotRelative( const DtVector& loc );
00103 
00105 
00106 
00107    const DtVector& designatorSpotWorld() const;
00108    void setDesignatorSpotWorld( const DtVector& loc );
00110 
00112 
00113    DtDeadReckonTypes deadReckoningAlgorithm() const;
00114    void setDeadReckoningAlgorithm( DtDeadReckonTypes alg );
00116 
00118 
00119    const DtVector& linearAcceleration() const;
00120    void setLinearAcceleration( const DtVector& acc );
00122 
00124    virtual void printData() const;
00126 
00128    virtual void printDataToStream(std::ostream& stream) const;
00130 
00131 protected:
00132    DtPduKind internalGetPduKind() const { return DtDesignatorPduKind; }
00133    DtEntityIdentifier theId;
00134    DtVector loc;
00135 };
00136 
00137 #endif   //! DtDIS
00138 #endif   //! DtDesignatorPdu_H_
00139 
00140 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)