MAK Data Logger API Documentation for HLA
lgrDisSimInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef lgrDisSimInterface_H_
11 #define lgrDisSimInterface_H_
12 
13 #if DtDIS
14 
15 #include "lgrSim.h"
16 
17 #include <vlutil/vlUtil.h>
18 #include <vlutil/vlInetAddr.h>
19 #include "lgrSimInterface.h"
20 
21 namespace MAKLogger
22 {
23  class DtDisDescriptor;
24  class DtLgrDisEntityTypeManager;
25  class DtLgrDisSimDriver;
26  class DtLgrDisCommandFactory;
27 
30  class DT_DLL_LGRSIM DtLgrDisSimInterface : public DtLgrSimInterface
31  {
32  public:
33  typedef DtLgrDisCommandFactory Factory;
34 
36  static DtLgrDisSimInterface* create(DtLogger&);
37 
39  static DtLgrSimInterface* createBase(DtLogger&);
40 
42  virtual ~DtLgrDisSimInterface();
43 
46  static DtLgrDisSimInterface* createNonThreadsafe(DtLogger& logger,
47  const DtLgrDisSimDriver& driver);
48 
50  virtual DtLgrProtocolId protocolId() const;
51 
52  virtual void setConnectionParameters(int port, int exerciseId, int siteId, int appNumber,
53  bool useAsynchIO, int sendBufferSize, int recvBufferSize, int multicastTtl,
54  const DtString& destAddrString, const DtString& netmask, const DtString& deviceAddrString,
55  const std::vector<DtString>& mcastAddresses) const;
56 
58  virtual void getLoggerName(DtString& name) const;
59 
61  virtual void setHeartbeatRate(double rate) const;
62 
64  virtual void setTimeoutRate(double rate) const;
65 
67  virtual void setDisDescription(const DtDisDescriptor& desc) const;
68 
70  virtual void setDrainInputSettings(double maxTime,
71  int numPdusToRead) const;
72 
74  virtual const DtDisDescriptor* disDescription() const;
75 
77  virtual void setEntityTypeManager(const DtLgrDisEntityTypeManager& mgr) const;
78 
80  virtual const DtLgrDisEntityTypeManager* entityTypeManager() const;
81 
83 
84  virtual int port() const;
85  virtual int exerciseId() const;
86  virtual int siteId() const;
87  virtual int appNumber() const;
88  virtual bool useAsynchIO() const;
89  virtual int sendBufferSize() const;
90  virtual int recvBufferSize() const;
91  virtual int multicastTtl() const;
92  virtual DtInetAddr destAddr() const;
93  virtual const DtString& netmask() const;
94  virtual DtInetAddr deviceAddr() const;
95  virtual const std::vector<DtString>& mcastAddresses() const;
97 
99  virtual double heartbeatRate() const;
100 
102  virtual double timeoutRate() const;
103 
105  virtual double drainInputMaxTime() const;
106 
108  virtual int numPdusToReadPerTimeCheck() const;
109 
111  virtual bool connectionSettingsMatchInputFile( DtString& filename);
112 
113  protected:
114 
116  void connectResponseHandler(DtLgrCommandId id,
117  void (DtLgrDisSimInterface::* function)(DtResponse));
119  void connectionParametersChanged(DtResponse response);
120  void heartbeatRateChanged(DtResponse response);
121  void timeoutRateChanged(DtResponse response);
122  void disDescriptionChanged(DtResponse response);
123  void entityTypeManagerChanged(DtResponse response);
124  void drainInputSettingsChanged(DtResponse response);
125 
126  DtLgrDisSimInterface(DtLogger& logger,const DtLgrDisSimDriver& driver);
127 
128  DtDisDescriptor* myDisDescriptor;
129  DtLgrDisEntityTypeManager* myEntityTypeManager;
130 
131  int myPort;
132  int myExerciseId;
133  int mySiteId;
134  int myAppNumber;
135  bool myUseAsynchIO;
136  int mySendBufferSize;
137  int myRecvBufferSize;
138  int myMulticastTtl;
139  DtInetAddr myDestAddr;
140  DtInetAddr myDeviceAddr;
141  DtString myNetmask;
142  std::vector<DtString> myMcastAddresses;
143  double myHeartBeatRate;
144  double myTimeoutRate;
145  double myDrainInputMaxTime;
146  int myNumPdusToReadPerTimeCheck;
147  };
148 
149 }
150 
151 #endif
152 #endif

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)