VR-Link API Documentation for DIS
dRefRadRcvr.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 DtReflectedRadioReceiver_H_
00011 #define DtReflectedRadioReceiver_H_
00012 
00013 #if DtDIS
00014 
00015 #include "dReflectedObj.h"
00016 #include "dRadioRcvrDec.h"
00017 #include "receivePdu.h"
00018 #include "globalObjDes.h"
00019 #include <vlutil/vlHashKeys.h>
00020 
00021 class DT_DLL_VL DtRadioReceiverRepository;
00022 class DT_DLL_VL DtExerciseConn;
00023 class DT_DLL_VL DtReflectedRadioReceiver;
00024 
00028 class DT_DLL_VL DtReflectedRadioReceiver;
00029 typedef void (*DtRadioReceiverCallbackFunction) (
00030    DtReflectedRadioReceiver* obj, void* userData);
00031 
00035 class DT_DLL_VL DtReflectedRadioReceiver : public DtReflectedObject
00036 {
00037 public:
00038 
00040    typedef DtRadioReceiverRepository* (*DtStateRepCreator)();
00041  
00042 public:
00043 
00045    DtReflectedRadioReceiver(
00046       DtExerciseConn* conn,
00047       const DtEntityIdentifier& id,
00048       int radioId);
00049 
00051    virtual ~DtReflectedRadioReceiver();
00052 
00055    virtual DtRadioReceiverRepository* receiverRep() const;
00056 
00058    virtual DtRadioReceiverRepository* rsr() const;
00059 
00061    virtual DtStateRepository* stateRep() const;
00062 
00065    virtual DtRadioReceiverDecoder* decoder();
00066 
00068    virtual const DtEntityIdentifier& entityId() const;
00069 
00071    virtual const DtObjectId& id() const;
00072 
00074    virtual const DtObjectId& localId() const;
00075 
00078    virtual const DtGlobalObjectDesignator& globalId() const;
00079 
00081    virtual int radioId() const;
00082 
00085    virtual void processStateMessage(const DtStateMsg& msg);
00086 
00089    virtual DtReflectedRadioReceiver* next() const;
00090    virtual DtReflectedRadioReceiver* prev() const;
00091 
00093    virtual DtReflectedRadioReceiver* wrapNext() const;
00094    virtual DtReflectedRadioReceiver* wrapPrev() const;
00095 
00097    virtual void addPostUpdateCallback(
00098       DtRadioReceiverCallbackFunction cb, void* userData);
00099    virtual void removePostUpdateCallback(
00100       DtRadioReceiverCallbackFunction cb, void* userData);
00101 
00103    virtual const DtBaseHashKey& hashKey() const;
00104 
00106    virtual DtString idString() const;
00107 
00110    virtual void processRadioReceiver(const DtReceiverPdu& pdu);
00111 
00112 public:
00113 
00115    static void setStateRepCreator(DtStateRepCreator creator);
00116    static DtStateRepCreator stateRepCreator(void);
00117 
00118 protected:
00119 
00121    DtReflectedRadioReceiver(const DtReflectedRadioReceiver& orig);
00122 
00124    DtReflectedRadioReceiver& operator=(const DtReflectedRadioReceiver& orig);
00125 
00126 protected:
00127 
00128    DtEntityIdentifier myId;
00129    DtString myIdString;
00130    DtRadioReceiverRepository* myStateRep;
00131    DtRadioReceiverDecoder* myDecoder;
00132    DtStringHashKey myHashKey;
00133 
00134 protected:
00135 
00136    static DtStateRepCreator theStateRepCreator;
00137 
00138 };
00139 
00140 inline int DtReflectedRadioReceiver::radioId() const
00141 {
00142    return myStateRep->radioId();
00143 }
00144 
00145 #endif
00146 #endif
00147 

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)