VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spotReportReceiver.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 
10 
11 #pragma once
12 
15 
16 class DtObjectSensorPSR;
19 class DtVrfObjectMessage;
21 class DtSpotReport;
22 
35 {
36 private:
38 
43 
44 public:
45 
48  DtSpotReportReceiver(const DtString& name,
49  DtVrfObject* owner,
50  DtSimManager* simManager,
51  DtComponentDescriptor* desc = 0,
52  DtReaderWriterRegistry* parentRegistry = 0);
53 
55  virtual ~DtSpotReportReceiver();
56 
57  virtual bool init();
58 
61  virtual const char* type() const;
62 
63  virtual void tick();
64 
66  virtual bool tickWhileDestroyed() const;
67 
71  static DtSimComponent * creator(const DtString& name,
72  DtVrfObject* owner,
73  DtSimManager* simManager,
74  DtComponentDescriptor* desc = 0,
75  DtReaderWriterRegistry* parentRegistry = 0);
76 
78  virtual void setSensorEnabled(bool enabled);
79 
81  virtual bool sensorEnabled() const;
82 
83  virtual void enable();
84 
85  virtual void disable();
86 
87 protected:
88 
90  virtual bool createPorts();
91 
94  static void setSensorEnabledRequestCallback(DtSimMessage *msg, void * usrData);
95 
98  virtual void processSetSensorEnabledRequestMessage(DtSimMessage *msg);
99 
101  virtual void initializeCallbacks(bool);
102 
108  virtual DtObjectSensorPSR* createPSR();
109 
111  virtual bool createAndInitSensorMonitor();
112 
114 
115  static void spotReportCallback(const DtVrfObjectMessage* msg, void* usr);
116  static void simReportCollectionCallback(const DtVrfObjectMessage* msg, void* usr);
118  virtual void processSpotReport(const DtVrfObjectMessage* msg);
119  virtual void processSimReportCollection(const DtVrfObjectMessage* msg);
121 
127  virtual bool mergeSpotReportWithCurrentData(const DtSpotReport* spotReport);
128 
132  virtual void setContactSource(DtSpotReport& spotReport);
133 
137  virtual bool pruneOldReports();
138 
139 protected:
140 
142 
143  DtSensorContactListOutputPort * myContactsListPort;
152 
156 
160 };
161 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtObjectSensorPSR * myProcessState
Container for state data associated with this component.
Definition: spotReportReceiver.h:155
const DtSpotReportReceiverDescriptor * mySpotReportReceiverDescriptor
Definition: spotReportReceiver.h:159
DtSpotReportReceiver; listens for and tracks spot report messages Developer Description: DtSpotReport...
Definition: spotReportReceiver.h:34
bool myContactsChanged
Definition: spotReportReceiver.h:158
Definition: sensorContactListIOPort.h:71
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
virtual void disable()
virtual bool init()
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
virtual void enable()
Is this component enabled or not.
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
DtSimComponent & operator=(const DtSimComponent &orig)
assignment operator, not implemented
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
virtual bool createPorts()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
Class which manages the sending of sensor contact information to the GUI from one particular sensor o...
Definition: objectSensorMonitor.h:25
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
Descriptor for the DtSpotReportReceiver class.
Definition: spotReportReceiverDescriptor.h:26
DtObjectSensorMonitor * myMonitor
Definition: spotReportReceiver.h:157
DtSpotReport; subclass of DtSimReport.
Definition: spotReport.h:35
virtual const char * type() const =0
Returns a string identifies the class type of component.
Definition: objectSensorPSR.h:30

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)