VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
iffPublisherDIS.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 
10 
11 #ifndef iffPublisherDIS_H_
12 #define iffPublisherDIS_H_
13 
14 #if DtDIS
15 
16 
17 #include "objectPublisherDIS.h"
18 #include "hostStructs.h"
19 #include "iffStateRepository.h"
20 #include "iffStateEncoder.h"
21 #include "iffStateDecoder.h"
22 
23 
25 
26 #ifdef __GNUC__
27 #define DT_CANT_USE_STATIC_MEMBER_FCN_AS_DFLT_ARG 1
28 #endif
29 
30 #if DT_CANT_USE_STATIC_MEMBER_FCN_AS_DFLT_ARG
31 static inline const DtObjectId& iffFindOwnId();
34 #else
35 #define iffFindOwnId() DtIffPublisher::findOwnId()
36 #endif
37 
42 {
43 
44 public:
45 
47  typedef DtIffStateRepository* (*DtStateRepCreator)();
48 
49 public:
50 
53  DtIffStateRepository *stateRepToUse,
54  DtExerciseConn* conn,
55  const DtObjectId& id = iffFindOwnId());
56 
60  DtExerciseConn* conn,
61  const DtObjectId& id = iffFindOwnId());
62 
65  DtExerciseConn* conn,
66  const DtObjectId& id = iffFindOwnId());
67 
70  DtExerciseConn* conn,
71  const char* name,
72  const DtObjectId& id = iffFindOwnId());
73 
75  virtual ~DtIffPublisher();
76 
77 
79  virtual void tick();
80 
83  virtual void forceUpdate();
84 
86  virtual DtIffStateRepository* iffStateRep();
87  virtual DtIffStateRepository* isr();
88 
90  virtual const DtObjectId& id() const;
91 
93  virtual const DtObjectId& localId() const;
94 
96  virtual const DtGlobalObjectDesignator& globalId() const;
97 
98 public:
99 
101  static void setStateRepCreator(DtStateRepCreator creator);
102  static DtStateRepCreator stateRepCreator(void);
103 
104  static void setClassDfltTimeThreshold(DtTime threshold);
105 
107  static const DtObjectId& findOwnId();
108 
109 protected:
110 
112  void init(const char* name,
113  const DtEntityIdentifier& id);
114 
116  DtIffPublisher(const DtIffPublisher& orig);
117 
120 protected:
121 
125 
126 protected:
127  static DtStateRepCreator theStateRepCreator;
130  char *myName;
131 };
132 
134 {
135  return static_cast<DtIffStateRepository*>(myStateRep);
136 }
137 
138 inline const DtObjectId& DtIffPublisher::localId() const
139 {
140  return id();
141 }
142 
143 #if DT_CANT_USE_STATIC_MEMBER_FCN_AS_DFLT_ARG
144 inline const DtObjectId& iffFindOwnId()
145 {
146  return DtIffPublisher::findOwnId();
147 }
148 #else
149 #undef iffFindOwnId
150 #endif
151 
152 
153 #endif
154 #endif
155 
DtStateRepository * myStateRep
Definition: objectPublisherDIS.h:176
This file declares the DIS version of DtIffStateEncoder.
Instances of DtIffPublisher are used to take care of the details associated with publishing the state...
Definition: iffPublisherDIS.h:41
Contains the DtIffStateRepository class declaration.
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:61
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Instances of DtIffStateDecoder are used to take state information from an emission state PDU and plac...
Definition: iffStateDecoder.h:33
Defines a protocol independent repository of attributes for IFF objects.
Definition: iffStateRepository.h:57
DtObjectId myId
Definition: iffPublisherDIS.h:122
DtIffAtcNavaidsSysType
Definition: disEnums.h:2087
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
Definition: objectPublisherDIS.h:36
virtual void forceUpdate()=0
For publisher to send PDU on next tick.
#define iffFindOwnId()
Definition: iffPublisherDIS.h:35
DtIffStateDecoder * myIffDecoder
Definition: iffPublisherDIS.h:123
virtual const DtObjectId & id() const =0
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
static const DtObjectId & findOwnId()
Returns an id of (-1,-1,-1).
char * myName
Definition: iffPublisherDIS.h:130
virtual const DtObjectId & id() const
Get the entity&#39;s identifier.
static bool theClassDfltIsSetFlag
Definition: iffPublisherDIS.h:129
virtual const DtObjectId & localId() const
Get the entity&#39;s localId - same as id for DIS.
Definition: iffPublisherDIS.h:138
virtual const DtGlobalObjectDesignator & globalId() const =0
The entityIdentifier unique to this object.
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
static DtStateRepCreator theStateRepCreator
Definition: iffPublisherDIS.h:127
This file is deprecated - Please see simulationAddress.h, entityIdentifier.h, entityType.h, burstDescriptor.h, and NetStructs.h.
This class declares the DIS version of DtObjectPublisher.
static DtTime theClassDfltTimeThreshold
Definition: iffPublisherDIS.h:128
This file declares the DIS version of DtIffStateDecoder.
virtual void tick()=0
Tick (update) this object.
DtIffStateEncoder * myIffEncoder
Definition: iffPublisherDIS.h:124
virtual DtIffStateRepository * isr()
Definition: iffPublisherDIS.h:133
virtual const DtObjectId & localId() const =0
The localId is the same as the globalId, a DtEntityIdentifier unique to this object.
Instances of DtIffStateEncoder are used to take state information from a DtIffStateRepository and pla...
Definition: iffStateEncoder.h:24

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)