lgrDisSimDriver.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00009 
00010 #if DtDIS
00011 
00012 #ifndef lgrDisSimDriver_H_
00013 #define lgrDisSimDriver_H_
00014 
00015 #include "lgrSim.h"
00016 #include "lgrSimDriver.h"
00017 #include "lgrCommandFunctor.h"
00018 #include "lgrCommandDispatcher.h"
00019 #include "lgrExceptions.h"
00020 #include "virtualConstructor.h"
00021 
00022 #include <map>
00023 
00024 #include <vlutil/vlInetAddr.h>
00025 
00026 class DtExerciseConnInitializer;
00027 
00028 namespace MAKLogger
00029 {
00030 
00031    class DtCommand;
00032    class DtDisDescriptor;
00033    class DtLgrDisEntityTypeManager;
00034    class DtLgrDisCommandFactory;
00035    class DtLgrDisSimulationManager;
00036    class DtLgrDisSimInterface;
00037    class DtLgrSimDriver;
00038    class DtMessagePipeline;
00039    class DtLgrSystemDriver;
00040    class DtLgrPduTypeFilter;
00041 
00044    class DT_DLL_LGRSIM DtLgrDisSimDriver : public DtLgrSimDriver
00045    {
00046    public:
00047 
00048       typedef DtLgrDisCommandFactory Factory;
00049       typedef DtLgrDisSimInterface Interface;
00050 
00051       DT_VIRTUAL_CTR(DtLgrDisSimDriver,(DtLgrSystemDriver&))
00052 
00053       virtual ~DtLgrDisSimDriver();
00054       virtual void tick();
00055 
00057       DtResponse setConnectionParameters(const DtCommand& command);
00058 
00060       DtResponse setHeartbeatRate(const DtCommand& command);
00061 
00063       DtResponse setTimeoutRate(const DtCommand& command);
00064 
00066       DtResponse setDrainInputSettings(const DtCommand& command);
00067 
00068       virtual DtLgrSimManager* simManager();
00069       virtual const DtLgrSimManager* simManager() const;
00070 
00071       virtual int port() const;
00072       virtual int exerciseId() const;
00073       virtual int siteId() const;
00074       virtual int appNumber() const;
00075       virtual bool useAsynchIO() const;
00076       virtual DtInetAddr destAddr() const;
00077       virtual DtInetAddr deviceAddr() const;
00078       virtual const DtString& netmask() const;
00079       virtual int sendBufferSize() const;
00080       virtual int recvBufferSize() const;
00081       virtual int multicastTtl() const;
00082       virtual const std::vector<DtString>& mcastAddresses() const;
00083 
00084       virtual double heartbeatRate() const;
00085       virtual double timeoutRate() const;
00086 
00087       virtual double drainInputMaxTime() const;
00088       virtual int    numPdusToReadPerTimeCheck() const;
00089 
00090       virtual bool isConnected() const;
00091       virtual const DtDisDescriptor* disDescription() const;
00092       virtual const DtLgrDisEntityTypeManager* entityTypeManager() const;
00093 
00094    protected:
00095 
00097       virtual DtResponse connect(const DtCommand& command);
00098 
00100       virtual DtResponse connectShared(const DtCommand& command);
00101 
00103       virtual DtResponse disconnect(const DtCommand& command);
00104 
00105       // Update the remote control filter based on the record remote control setting
00106       virtual void updateRecordRemoteControlFilter();
00107 
00109       virtual DtResponse setDisDescription(const DtCommand& command);
00110 
00112       virtual DtResponse setEntityTypeManager(const DtCommand& command);
00113 
00115       virtual DtResponse setCommonEntityTypes(const DtCommand& command);
00116 
00118       virtual DtResponse addCustomPDU(const DtCommand& command);
00119 
00120       virtual DtResponse addFilteredEntityName(const DtCommand& command);
00121 
00130       virtual bool releasePipeline();
00131       virtual bool getPipeline();
00132       virtual bool hasPipeline() const;
00133 
00134    protected:
00135 
00140       class DtFixedExerciseConnInitializer;
00141 
00142       DtLgrDisSimulationManager* mySimManager;
00143       DtLgrPduTypeFilter* myPduFilter;
00144 
00145       int myPort;
00146       int myExerciseId;
00147       int mySiteId;
00148       int myAppNumber;
00149       bool myUseAsynchIO;
00150       DtInetAddr myDestAddr;
00151       DtInetAddr myDeviceAddr;
00152       // Never used independently of establishing the destination address or display
00153       DtString myNetmask;
00154       int mySendBufferSize;
00155       int myRecvBufferSize;
00156       int myMulticastTtl;
00157       std::vector<DtString> myMcastAddresses;
00158 
00159    };
00160 
00161 }
00162 
00163 #endif
00164 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)