VR-Link API Documentation for HLA 1516
tExerciseConn.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 
00010 #if DtTENA
00011 
00012 #ifndef tExerciseConn_H_
00013 #define tExerciseConn_H_
00014 
00015 #include <TENA/Middleware/config.h>
00016 #include <TENA/Middleware/SDO/ID.h>
00017 #include "baseExConn.h"
00018 #include "tInterCbMgr.h"
00019 #include "globalObjDes.h"
00020 #include "eventId.h"
00021 
00022 #include <set>
00023 
00024 
00025 class DtExerciseConnInitializer;
00026 class DtLromMapper;
00027 class DtInteraction;
00028 class DtDynamicLibrary;
00029 class DtAmoPublisher;
00030 
00036 class DT_DLL_VL DtExerciseConn : public DtBaseExerciseConn
00037 {
00038 public:
00040    typedef DtLromMapper* (*DtLromMapperCreator)(void* usr);
00041    
00043    typedef void (*DtLromMapperDeletor)(DtLromMapper*);
00044 
00045 public:
00049    DtExerciseConn(const DtExerciseConnInitializer& init);
00050 
00054    DtExerciseConn(int site, int app, DtLromMapper* mapper, const DtString& execName,
00055       const DtString& sessionName, const DtString& orbDefaultInitRef, bool useAmo = true,
00056       TENA::Middleware::CommunicationProperties transport = TENA::Middleware::Reliable);
00057 
00059    virtual ~DtExerciseConn();
00060 
00061 private:
00063    DtExerciseConn(const DtExerciseConn& other);
00064 
00066    DtExerciseConn& operator=(const DtExerciseConn& other);
00067 
00068 public:
00070    virtual TENA::Middleware::SessionPtr sessionPtr();
00071 
00074    virtual void send(const DtStateMsg& msg);
00075 
00077    virtual void send(const DtInteraction& msg);
00078 
00082    virtual void sendStamped(const DtStateMsg& msg);
00083 
00086    virtual void sendStamped(const DtInteraction& msg);
00087 
00089    static DtString vrlinkVersion();
00090 
00092    virtual int siteId() const;
00093 
00095    virtual int applicationId() const;
00096 
00102    virtual void drainInput(int usecs = 20);
00103 
00105    virtual void addInteractionCallback(const DtString& name,
00106       DtReceiveInteractionCb cb, void* userData);
00107 
00109    virtual void removeInteractionCallback(const DtString& name,
00110       DtReceiveInteractionCb cb, void* userData);
00111 
00113    virtual void applyInteractionCallback(const DtString& name,
00114       DtInteraction* interaction);
00115 
00117    virtual DtLromMapper *lromMapper();
00118 
00121    virtual const DtGlobalObjectDesignator& nextMessageId();
00122 
00124    virtual const DtEventId& nextEventId();
00125 
00128    virtual void setReflecting();
00129 
00131    virtual bool reflecting() const;
00132 
00135    virtual DtAmoPublisher* amoPublisher();
00136 
00140    virtual void setTransportType(TENA::Middleware::CommunicationProperties transportType);
00141 
00143    virtual TENA::Middleware::CommunicationProperties transportType() const;
00144 
00148    virtual void incrementNumberOfObjectsServed();
00149 
00153    virtual void decrementNumberOfObjectsServed();
00154 
00158    virtual void incrementNumberOfProxies();
00159 
00163    virtual void decrementNumberOfProxies();
00164 protected:
00168    void initializeLromMapper(const DtString& lromMapperLibName, void* initData);
00169 
00170    void getFuncsFromSharedLib(DtDynamicLibrary& dso, DtLromMapperCreator* creator, 
00171       DtLromMapperDeletor* deletor);
00172 
00173 protected:
00174 
00175    TENA::Middleware::RuntimePtr myRuntimePtr;
00176    TENA::Middleware::ExecutionPtr myExecutionPtr;
00177    TENA::Middleware::SessionPtr mySessionPtr;
00178    TENA::Middleware::CommunicationProperties myTransportType;
00179 
00180    int mySiteId;
00181    int myApplicationId;
00182    int myAvailEventNum;
00183    DtGlobalObjectDesignator myCurrentMessageId;
00184    DtEventID myCurrentEventId;
00185    DtString myExecutionName;
00186    DtString mySessionName;
00187    DtInteractionCallbackManager myInteractionCallbackManager;
00188    DtLromMapper *myLromMapper;
00189    DtLromMapperCreator myDsoCreator;
00190    DtLromMapperDeletor myDsoDeletor;
00191    bool myUseLromMapperDeletor;
00192    bool myReflecting;
00193    DtAmoPublisher* myAmoPublisher;
00194    DtTime myLastAmoUpdate;
00195 
00196    DtDynamicLibrary* myLromMapperDso;
00197 };
00198 
00199 #endif
00200 #endif
00201 

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)