VR-Link API Documentation for DIS
 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 VT MAK
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&
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 
172 };
173 
174 #endif
175 #endif
176 
177 
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
virtual void print() const
Print the SRs of all objects.
Instances of DtReflectedObjectList are lists of instances of classes derived from DtReflectedObject...
Definition: reflectedObjectListDIS.h:38
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:61
Implements the storage, sending, and receipt of DI Guy custom PDU's.
Definition: diGuyCustomPdu.h:37
virtual const DtBaseHashKey & hashKeyFromStateMessage(const DtStateMsg *msg)=0
Get a hash key from a state message.
#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
DtReflectedObjectList & operator=(const DtReflectedObjectList &orig)
assignment operator – not implemented
Instances of DtRelativeLocationPdu are used to convey the fact that one unit is located at a position...
Definition: relativeLocationPdu.h:29
bool mySmoothCapable
Definition: reflectedEntityListDIS.h:169
Instances of DtReflectedObject are used to represent a simulation entity reflected across a network (...
Definition: reflectedObjectDIS.h:34
class DtEntityStateUpdatePdu:
Definition: entityStateUpdatePdu.h:33
Instances of this class provide a protocol independent interface to a list of reflected entities in a...
Definition: reflectedEntityListDIS.h:31
bool myProcessingDiGuyData
Definition: reflectedEntityListDIS.h:171
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
virtual DtReflectedObject * newReflectedObj(const DtStateMsg &msg)=0
Create a new object from a state message.
virtual void objectAdded(DtReflectedObject *object)
Called after a remote object has been added to the list.
DtEntityIdentifierHashKey myHashKey
Definition: reflectedEntityListDIS.h:170
This class provides a wrapper around the DIS Entity State PDU network structure.
Definition: entityStatePdu.h:44
Instances of DtStateMsg are used to represent state data communicated via the network in a DIS (as op...
Definition: stateMsgDIS.h:21
virtual DtReflectedObject * processStateMessage(const DtStateMsg &msg)
Process an incoming state message.
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26

Document ID: Generated on Tue Aug 10 00:12:31 EDT 2021 from SVN revision 232765
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)