VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflectedEntityDIS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #ifndef reflectedEntityDIS_H_
10 #define reflectedEntityDIS_H_
11 
12 #if DtDIS
13 
14 #include "reflectedObjectDIS.h"
15 #include "entityStateDecoder.h"
16 #include "entityStatePdu.h"
17 #include "globalObjectDesignator.h"
18 #include "objectIdHashKey.h"
19 #include "relativeLocationPdu.h"
20 #include "entityStateUpdatePdu.h"
21 #include "suppEmisEntStatePdu.h"
22 #include "diGuyCustomPdu.h"
23 #include "ownershipHandler.h"
25 
26 class DtExerciseConn;
27 class DtReflectedEntity;
30 
33 typedef void (*DtEntityCallbackFunction)(
34  DtReflectedEntity* obj, void* userData);
35 
40 {
41 public:
42 
44  typedef DtEntityStateRepository* (*DtStateRepCreator)();
45 
46 public:
47 
50  const DtEntityIdentifier& id,
51  const DtEntityType& type);
52 
59  DtExerciseConn* conn,
60  const DtEntityIdentifier& id);
61 
63  virtual ~DtReflectedEntity();
64 
67  virtual DtEntityStateRepository* entityStateRep() const;
68 
70  virtual DtEntityStateRepository* esr() const;
71 
75  virtual DtStateRepository* stateRep() const;
76 
79  virtual DtEntityStateDecoder* decoder();
80 
84  virtual DtOwnershipHandler* setOwnershipHandler( DtOwnershipHandler* handler );
85 
87  virtual const DtEntityIdentifier& entityId() const;
88 
90  virtual const DtObjectId& id() const;
91 
93  virtual const DtObjectId& localId() const;
94 
97  virtual const DtGlobalObjectDesignator& globalId() const;
98 
100  virtual void processStateMessage(const DtStateMsg& msg);
101 
103  virtual void processRelativeLocation(const DtRelativeLocationPdu& pdu);
104 
106  virtual void processEntityStateUpdate(const DtEntityStateUpdatePdu& pdu);
107 
109  virtual void processSees(const DtSuppEmisEntStatePdu& pdu);
110 
112  virtual void processDiGuyPdu(const DtDIGuyCustomPdu& pdu);
113 
115  virtual DtReflectedEntity* next() const;
116  virtual DtReflectedEntity* prev() const;
117 
119  virtual DtReflectedEntity* wrapNext() const;
120  virtual DtReflectedEntity* wrapPrev() const;
121 
123  virtual void addPostUpdateCallback(
124  DtEntityCallbackFunction cb, void* userData);
125  virtual void removePostUpdateCallback(
126  DtEntityCallbackFunction cb, void* userData);
127 
129  virtual const DtBaseHashKey& hashKey() const;
130 
132  virtual DtString idString() const;
133 
136  virtual void processEntityState(const DtEntityStatePdu& pdu);
137 
141  virtual void acquireObject();
142 
144 
145  virtual void setProcessDiGuyAttributes(bool enableProcessing);
146  virtual bool isProcessingDiGuyAttributes() const;
148 
151  virtual void decodeExtensions(const DtEntityStatePdu& pdu, DtEntityStateRepository* stateRep);
152 public:
153 
155  static void setStateRepCreator(DtStateRepCreator creator);
156  static DtStateRepCreator stateRepCreator(void);
157 
158 protected:
159 
162 
165 
166 protected:
167 
174  std::vector<DtStateRepositoryExtensionDecoder*> myStateRepositoryExtensionDecoderList;
175 
176 protected:
177 
178  static DtStateRepCreator theStateRepCreator;
179 
180 };
181 
183 {
184  return id();
185 }
186 
187 #endif
188 #endif
189 
Instances of this class provide a protocol independent interface to a reflected entity in a DIS envir...
Definition: reflectedEntityDIS.h:39
Instances of DtEntityIdentifierHashKey are hash keys made from DtEntityIdentifiers.
Definition: entityIdentifierHashKey.h:21
Instances of DtEntityStateDecoder are objects capable of decoding EntityState PDUs into a DtEntitySta...
Definition: entityStateDecoder.h:23
void * next() const
Return next (previous) elements on the list, or NULL if hit the end (beginning) of the list...
Definition: vlList.h:272
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
virtual const DtBaseHashKey & hashKey() const =0
Get a hash key for this object.
Implements the storage, sending, and receipt of DI Guy custom PDU&#39;s.
Definition: diGuyCustomPdu.h:37
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtBaseHashKey is an abstract base class for hash keys.
Definition: vlHashKeys.h:39
class DtSuppEmisEntStatePdu:
Definition: suppEmisEntStatePdu.h:36
DtOwnershipHandler * myOwnershipHandler
Definition: reflectedEntityDIS.h:173
This file contains typedefs used to represent objects in a protocol neutral way.
DtDIGuyCustomPduDecoder * myDiGuyDecoder
Definition: reflectedEntityDIS.h:171
virtual const DtObjectId & localId() const
Get the entity&#39;s local id. For DIS - same as id().
Definition: reflectedEntityDIS.h:182
DtReflectedObject & operator=(const DtReflectedObject &orig)
assignment operator – not implemented
The DtStateRepositoryExtensionDecoder class provides a base class for all State Repository Extension ...
Definition: stateRepositoryExtensionDecoder.h:21
Instances of DtRelativeLocationPdu are used to convey the fact that one unit is located at a position...
Definition: relativeLocationPdu.h:29
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:41
Instances of DtReflectedObject are used to represent a simulation entity reflected across a network (...
Definition: reflectedObjectDIS.h:34
DtEntityIdentifier myId
Definition: reflectedEntityDIS.h:168
virtual const DtGlobalObjectDesignator & globalId() const =0
Get the Global ID for this object.
std::vector< DtStateRepositoryExtensionDecoder * > myStateRepositoryExtensionDecoderList
Definition: reflectedEntityDIS.h:174
void * prev() const
Definition: vlList.h:277
class DtEntityStateUpdatePdu:
Definition: entityStateUpdatePdu.h:33
void * wrapNext() const
Return next (previous) elements on the list, but wrap to the beginning (end) of the list when you hit...
Definition: vlList.h:282
DtEntityStateDecoder * myEntityDecoder
Definition: reflectedEntityDIS.h:170
DtStateRepository is an abstract base class for maintaining state for an object.
Definition: stateRepository.h:50
void(* DtEntityCallbackFunction)(DtReflectedEntity *obj, void *userData)
Callback function that takes a DtReflectedEntity and user data.
Definition: reflectedEntityDIS.h:33
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
Contains the DIS DtEntityStateDecoder class declaration.
Contains the DtEntityStateRepository class declaration.
Definition: diGuyCustomPduDecoder.h:18
static DtStateRepCreator theStateRepCreator
Definition: reflectedEntityDIS.h:178
virtual void processStateMessage(const DtStateMsg &msg)
Process an entity state PDU.
This is a base class meant to encapsulate user callbacks on ownership management services.
Definition: ownershipHandlerDIS.h:39
virtual DtString idString() const =0
Get a string identification of this object.
virtual const DtObjectId & id() const
Get the entity&#39;s id. (For DIS, DtObjectId is DtEntityIdentifier).
This class provides a wrapper around the DIS Entity State PDU network structure.
Definition: entityStatePdu.h:44
void * wrapPrev() const
Definition: vlList.h:288
DtEntityIdentifierHashKey myHashKey
Definition: reflectedEntityDIS.h:172
This file declares DtOwnershipHandler.
Instances of DtString are used to represent strings.
Definition: vlString.h:29
virtual DtStateRepository * stateRep() const =0
Returns a pointer to the StateRepository - through which you can inspect current state information...
Instances of DtStateMsg are used to represent state data communicated via the network in a DIS (as op...
Definition: stateMsgDIS.h:21
Contains classes, constants and macros which provide a wrapper around the Entity State PDU defined in...
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
DtEntityStateRepository * myEntityStateRep
Definition: reflectedEntityDIS.h:169

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)