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 DtString protocol() 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 
110  protected:
111 
113  void connectResponseHandler(DtLgrCommandId id,
114  void (DtLgrDisSimInterface::* function)(DtResponse));
116  void connectionParametersChanged(DtResponse response);
117  void heartbeatRateChanged(DtResponse response);
118  void timeoutRateChanged(DtResponse response);
119  void disDescriptionChanged(DtResponse response);
120  void entityTypeManagerChanged(DtResponse response);
121  void drainInputSettingsChanged(DtResponse response);
122 
123  DtLgrDisSimInterface(DtLogger& logger,const DtLgrDisSimDriver& driver);
124 
125  DtDisDescriptor* myDisDescriptor;
126  DtLgrDisEntityTypeManager* myEntityTypeManager;
127 
128  int myPort;
129  int myExerciseId;
130  int mySiteId;
131  int myAppNumber;
132  bool myUseAsynchIO;
133  int mySendBufferSize;
134  int myRecvBufferSize;
135  int myMulticastTtl;
136  DtInetAddr myDestAddr;
137  DtInetAddr myDeviceAddr;
138  DtString myNetmask;
139  std::vector<DtString> myMcastAddresses;
140  double myHeartBeatRate;
141  double myTimeoutRate;
142  double myDrainInputMaxTime;
143  int myNumPdusToReadPerTimeCheck;
144  };
145 
146 }
147 
148 #endif
149 #endif

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)