VR-Link API Documentation for HLA Evolved
dObjPub.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #if DtDIS
11 
12 
13 #ifndef DtDISObjectPublisher_H_
14 #define DtDISObjectPublisher_H_
15 
16 
17 #include <vlutil/vlMachineTypes.h>
18 #include "objectId.h"
19 #include <vlutil/vlTime.h>
20 
23 class DT_DLL_VL DtPdu;
24 
31 {
32 public:
33 
40  DtStateRepository* stateRep,
41  DtStateRepository* asSeenByRemote,
42  bool okToDeleteStateRep = true);
43 
45  virtual ~DtObjectPublisher();
46 
47 private:
48 
51 
53  DtObjectPublisher& operator= (const DtObjectPublisher& orig);
54 
55 public:
56 
59  virtual DtStateRepository* stateRep();
60 
63  virtual DtStateRepository* sr();
64 
66  virtual DtExerciseConn* exerciseConn();
67 
69  virtual const DtObjectId& localId() const = 0;
71  virtual const DtObjectId& id() const = 0;
73  virtual const DtGlobalObjectDesignator& globalId() const = 0;
74 
76  virtual void forceUpdate()=0;
77 
79  virtual void tick() = 0;
80 
83  virtual void setTimeThreshold(DtTime time);
85  virtual DtTime timeThreshold() const;
86 
91  virtual DtStateRepository* approximateRemoteStateRep();
92 
95  virtual DtTime lastTimeUpdated() const;
96 
99  virtual DtTime lastSimTimeUpdated() const;
100 
101 public:
102 
107  static void setDfltTimeThreshold(DtTime time);
108 
110  static DtTime dfltTimeThreshold();
111 
112 protected:
113 
114 
116  void send(DtPdu* pdu) const;
117 
118 
119 protected:
120 
121  DtExerciseConn *myExConn;
122  DtStateRepository *myStateRep;
123  DtStateRepository *myAsSeenByRemote;
124  bool myOkToDeleteStateRepFlag;
125 
126  DtTime myTimeThreshold;
127 
129  mutable DtTime mySimTimeLastUpdate;
130 
132  mutable DtTime myRealTimeLastUpdate;
133 
134 protected:
135 
136  static DtTime theDfltTimeThreshold;
137 
138 };
139 
141 {
142  return myStateRep;
143 }
144 
146 {
147  return myStateRep;
148 }
149 
151 {
152  return myExConn;
153 }
154 
156 {
157  return myAsSeenByRemote;
158 }
159 
160 #endif //DtObjectPublisher_H_
161 #endif //DtDIS
162 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)