VR-Link API Documentation for DIS
dRadioRcvrPub.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 
00009 
00010 #ifndef dRadioRcvrPub_H_
00011 #define dRadioRcvrPub_H_
00012 
00013 #if DtDIS
00014 
00015 
00016 #include "dObjPub.h"
00017 #include "pdu.h"
00018 #include "radioRecvrSR.h"
00019 #include "dRadioRcvrEnc.h"
00020 #include "dRadioRcvrDec.h"
00021 #include <vlutil/vlPrint.h>
00022 
00023 
00024 class DT_DLL_VL DtRadioReceiverPublisher : public DtObjectPublisher
00025 {
00026 public:
00027 
00030    typedef DtRadioReceiverRepository* (*DtStateRepCreator)();
00031 
00032 public:
00033 
00035    DtRadioReceiverPublisher(
00036      DtRadioReceiverRepository* stateRepToUse,
00037      DtExerciseConn* conn, 
00038      const DtObjectId& entityId = DtObjectId::defaultId());
00039 
00041    DtRadioReceiverPublisher(
00042      DtExerciseConn* conn, 
00043      const DtObjectId& entityId = DtObjectId::defaultId(),
00044      int radioId = 1);
00045 
00047    virtual ~DtRadioReceiverPublisher();
00048 
00053    virtual void tick();
00054 
00057    virtual DtRadioReceiverRepository* receiverRep();
00058 
00060    virtual DtRadioReceiverRepository* rsr();
00061 
00065    virtual DtRadioReceiverDecoder* decoder();
00066 
00069    virtual DtRadioReceiverEncoder* encoder();
00070 
00072    virtual const DtObjectId& id() const;
00073 
00075    virtual const DtObjectId& localId() const;
00076 
00078    virtual const DtGlobalObjectDesignator& globalId() const;
00079 
00081    virtual int radioId() const;
00082 
00086    virtual void sendFinalPduOnDestruction(bool onOff);
00087 
00090    virtual void forceUpdate();
00091 
00092 public:
00093 
00095    static void setStateRepCreator(DtStateRepCreator creator);
00096    static DtStateRepCreator stateRepCreator(void);
00097 
00098    static void setClassDfltTimeThreshold(DtTime threshold);
00099 
00100 protected: 
00101 
00103    void sendFinalPdu();
00104 
00106    void init(const DtEntityIdentifier& vehId);
00107 
00109    DtRadioReceiverPublisher(const DtRadioReceiverPublisher& orig);
00110 
00112    DtRadioReceiverPublisher& operator= (const DtRadioReceiverPublisher& orig);
00113 
00114 protected:
00115    DtObjectId myId;
00116    DtRadioReceiverDecoder* myDecoder;
00117    DtRadioReceiverEncoder* myEncoder;
00118    bool mySendFinalInDtor;
00119 
00120 protected:
00121    static DtStateRepCreator theStateRepCreator;
00122    static DtTime            theClassDfltTimeThreshold;
00123    static bool              theClassDfltIsSetFlag;
00124 };
00125 
00126 inline DtRadioReceiverRepository* DtRadioReceiverPublisher::rsr()
00127 {
00128    return static_cast<DtRadioReceiverRepository*>(myStateRep);
00129 }
00130 
00131 #endif
00132 #endif
00133 

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)