VR-Forces 5.0.2 Developer's Guide
 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  DtLocalObject* owner,
50  DtSimulationServices* 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  DtLocalObject* owner,
73  DtSimulationServices* 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
DtObjectSensorPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
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:49
Definition: readerWriterRegistry.h:39
virtual void disable()
Is this component enabled or not. If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
virtual bool init()
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
virtual void enable()
Is this component enabled or not. If enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
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. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
Contains the DtSimComponent class declaration.
Class which manages the sending of sensor contact information to the GUI from one particular sensor o...
Definition: objectSensorMonitor.h:26
Descriptor for the DtSpotReportReceiver class. Specifies parameters needed by this component to run...
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. Type values are defined in compTypes...
Definition: objectSensorPSR.h:23
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)