VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflectedEntityListDIS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #ifndef DtReflectedEntityList_H_
11 #define DtReflectedEntityList_H_
12 
13 #if DtDIS
14 
15 #include "reflectedObjectListDIS.h"
16 #include "reflectedEntityDIS.h"
17 #include "relativeLocationPdu.h"
18 #include "entityStateUpdatePdu.h"
19 #include "diGuyCustomPdu.h"
20 #include "suppEmisEntStatePdu.h"
21 
23 
32 {
33 
34 public:
35 
38  bool smoothCapable = false, bool processDiGuyData = false, int numBucketsPrimeNumber = 503);
39 
41  virtual ~DtReflectedEntityList();
42 
44  virtual DtReflectedEntity* lookup(const DtObjectId& id) const;
45 
47  virtual DtReflectedEntity* first() const;
48  virtual DtReflectedEntity* last() const;
49 
51  virtual void addToObjectList(DtReflectedObject* refObj);
52 
54  virtual void addEntityAdditionCallback(
55  DtEntityCallbackFunction cb, void* userData);
56  virtual void removeEntityAdditionCallback(
57  DtEntityCallbackFunction cb, void* userData);
58 
60  virtual void addEntityRemovalCallback(
61  DtEntityCallbackFunction cb, void* userData);
62  virtual void removeEntityRemovalCallback(
63  DtEntityCallbackFunction cb, void* userData);
64 
66  virtual void print();
67 
70  virtual DtReflectedEntity* processEntityState(const DtEntityStatePdu& pdu);
71 
73  virtual void processRelativeLocationPdu(const DtRelativeLocationPdu& pdu);
74 
76  virtual void processEntityStateUpdatePdu(
77  const DtEntityStateUpdatePdu& pdu);
78 
81  virtual void processDiGuyPdu(
82  const DtDIGuyCustomPdu& pdu);
83 
85  virtual void processSeesPdu(
86  const DtSuppEmisEntStatePdu& pdu);
87 
91 
92  virtual void setProcessDiGuyPdus(bool enableProcessing);
95  virtual bool processingDiGuyPdus() const;
96  virtual void setProcessDiGuyData(bool enableProcessing);
97  virtual bool processingDiGuyData() const;
99 
105  virtual void discoverOnlyWhenEntityTypeKnown(bool yesNo);
106 
107 private:
108 
111  const DtReflectedEntityList& orig);
112 
115 
116 protected:
117 
121  virtual DtReflectedObject* newReflectedObj(const DtStateMsg& msg);
122 
124  virtual DtReflectedObject* processStateMessage(const DtStateMsg& msg);
125 
128  virtual void objectAdded(DtReflectedObject* obj);
129 
132  virtual void finalPduIsSetAction(DtReflectedEntity* entity);
133 
135  virtual const DtBaseHashKey&
136  hashKeyFromStateMessage(const DtStateMsg* msg);
137 
139  virtual DtReflectedEntity* newReflectedEntity(const DtEntityIdentifier& id,
140  const DtEntityType& type) const;
141 
144  virtual void entityAdded(DtReflectedEntity* ent);
145 
146 protected:
147 
149  static void entityStateCb(DtEntityStatePdu* pdu, void* usr);
150 
152  static void relativeLocationCb( DtRelativeLocationPdu* pdu, void* usr );
153 
155  static void entityStateUpdateCb( DtEntityStateUpdatePdu* pdu, void* usr );
156 
158  static void diGuyPduCb(DtDIGuyCustomPdu* pdu, void* usr);
159 
161  static void seesPduCb(DtSuppEmisEntStatePdu* pdu, void* usr);
162 
165  static bool checkEntityType(DtReflectedObject* obj, void* usr);
166 
167 protected:
168 
169  bool mySmoothCapable;
170  DtEntityIdentifierHashKey myHashKey;
171  bool myProcessingDiGuyData;
172 };
173 
174 #endif
175 #endif
176 
177 
Instances of DtReflectedEntity are used to represent a simulation entity reflected across a network (...
Definition: reflectedEntityHLA.h:29
Instances of DtEntityIdentifierHashKey are hash keys made from DtEntityIdentifiers.
Definition: entityIdentifierHashKey.h:21
class DtReflectedObjectList
Definition: reflectedObjectListHLA.h:58
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtBaseHashKey is an abstract base class for hash keys.
Definition: vlHashKeys.h:39
void(* DtEntityCallbackFunction)(DtReflectedEntity *obj, void *userData)
Callback function that takes a DtReflectedObject and user data.
Definition: reflectedEntityHLA.h:23
DtReflectedObjectList & operator=(const DtReflectedObjectList &orig)
assignment operator – not implemented
virtual void addToObjectList(DtReflectedObject *refObj)
Add refObj to myObjectList and initiates discovery callbacks.
class DtReflectedObject:
Definition: reflectedObjectHLA.h:36
Instances of DtReflectedEntityList are used to manage remote entities from the network.
Definition: reflectedEntityListHLA.h:38
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
virtual void objectAdded(DtReflectedObject *object)
Called from processDiscoverObject() after a remote object has been added to the list.
DtObjectId instances are used to represent RTI::ObjectInstances in VR-Link.
Definition: objectId.h:38
class DtStateMsg:
Definition: stateMsgHLA.h:32
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
virtual void print()
Print the SRs of all objects.

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)