WebLVC 1.7d API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ddsBroker/vlDds/entityPublisher.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vlDds/dllExport.h>
13 #include <vlDds/reflectedEntity.h>
14 #include <vlutil/vlString.h>
15 #include <vlutil/vlTime.h>
16 
17 // ************************************************************************ //
18 // Use the DIS implementation from VR-Link by temporarily defining DtDIS.
19 // ************************************************************************ //
20 #ifndef DtDIS
21 # define MUST_UNDEF_DTDIS
22 # define DtDIS 1
23 #endif
24 
25 #include <vl/globalObjectDesignator.h>
26 
27 #ifdef MUST_UNDEF_DTDIS
28 # undef DtDIS
29 #endif
30 // ************************************************************************ //
31 
32 namespace MAKVrExchange
33 {
34 
35  namespace DtDdsBroker
36  {
37 
38  class DtDdsDomainConnection;
39 
43  {
44  public:
45 
48  const DtString& id );
49 
51  virtual ~DtEntityPublisher();
52 
55 
56  virtual const DtEntityStateRepository* entityStateRep() const;
57  virtual DtEntityStateRepository* entityStateRep();
58 
59  virtual const DtEntityStateRepository* stateRep() const;
60  virtual DtEntityStateRepository* stateRep();
61 
62  virtual const DtEntityStateRepository* esr() const;
63  virtual DtEntityStateRepository* esr();
64 
65  virtual const DtEntityStateRepository* sr() const;
66  virtual DtEntityStateRepository* sr();
67 
68  virtual const DtEntityStateRepository* approximateRemoteStateRep() const;
69  virtual const DtEntityStateRepository* asbrSr() const;
70 
72 
74  virtual DtDdsDomainConnection* ddsDomConn();
75 
77  virtual void forceUpdate();
78 
80  virtual void tick();
81 
83  virtual const DtGlobalObjectDesignator& globalId() const;
84 
85  protected:
86 
89  virtual bool sendNeeded() const;
90 
91  private:
92 
94  DtEntityPublisher( const DtEntityPublisher& other );
95 
97  DtEntityPublisher& operator = ( const DtEntityPublisher& other );
98 
100  bool operator == ( const DtEntityPublisher& );
101 
103  bool operator != ( const DtEntityPublisher& );
104 
105  protected:
106 
107  mutable bool myForceUpdateFlag;
108 
110  DtEntityStateRepository* myStateRep;
111  DtEntityStateRepository* myAsSeenByRemote;
112 
113  };
114 
115 
116  inline const DtEntityStateRepository* DtEntityPublisher::entityStateRep() const
117  {
118  return myStateRep;
119  }
120 
121  inline DtEntityStateRepository* DtEntityPublisher::entityStateRep()
122  {
123  return myStateRep;
124  }
125 
126  inline const DtEntityStateRepository* DtEntityPublisher::stateRep() const
127  {
128  return myStateRep;
129  }
130 
131  inline DtEntityStateRepository* DtEntityPublisher::stateRep()
132  {
133  return myStateRep;
134  }
135 
136  inline const DtEntityStateRepository* DtEntityPublisher::esr() const
137  {
138  return myStateRep;
139  }
140 
141  inline DtEntityStateRepository* DtEntityPublisher::esr()
142  {
143  return myStateRep;
144  }
145 
146  inline const DtEntityStateRepository* DtEntityPublisher::sr() const
147  {
148  return myStateRep;
149  }
150 
151  inline DtEntityStateRepository* DtEntityPublisher::sr()
152  {
153  return myStateRep;
154  }
155 
156  inline const DtEntityStateRepository* DtEntityPublisher::approximateRemoteStateRep() const
157  {
158  return myAsSeenByRemote;
159  }
160 
161  inline const DtEntityStateRepository* DtEntityPublisher::asbrSr() const
162  {
163  return myAsSeenByRemote;
164  }
165 
167  {
168  return myDdsDomConn;
169  }
170 
171  }
172 }
DtDdsDomainConnection * myDdsDomConn
Definition: ddsBroker/vlDds/entityPublisher.h:109
bool myForceUpdateFlag
Definition: ddsBroker/vlDds/entityPublisher.h:107
virtual const DtEntityStateRepository * asbrSr() const
Definition: ddsBroker/vlDds/entityPublisher.h:161
virtual const DtEntityStateRepository * stateRep() const
Definition: ddsBroker/vlDds/entityPublisher.h:126
DtEntityStateRepository * myAsSeenByRemote
Definition: ddsBroker/vlDds/entityPublisher.h:111
DtEntityStateRepository * myStateRep
Definition: ddsBroker/vlDds/entityPublisher.h:110
virtual const DtEntityStateRepository * approximateRemoteStateRep() const
Definition: ddsBroker/vlDds/entityPublisher.h:156
virtual const DtEntityStateRepository * entityStateRep() const
Definition: ddsBroker/vlDds/entityPublisher.h:116
#define DT_DLL_VLDDS
Definition: brokers/ddsBroker/vlDds/dllExport.h:20
virtual const DtEntityStateRepository * esr() const
Definition: ddsBroker/vlDds/entityPublisher.h:136
Definition: ddsDomainConnection.h:46
virtual const DtEntityStateRepository * sr() const
Definition: ddsBroker/vlDds/entityPublisher.h:146
virtual DtDdsDomainConnection * ddsDomConn()
Get our DDS connection.
Definition: ddsBroker/vlDds/entityPublisher.h:166
Handles publication of DDS Entity State objects.
Definition: ddsBroker/vlDds/entityPublisher.h:42

Document ID: Generated on Wed Jun 21 15:05:44 EDT 2023 from SVN revision 256253
Copyright © 2005-2023 MAK Technologies. All Rights Reserved (www.mak.com)