VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
remoteSensorSpotReportReceiver.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 
10 #pragma once
11 
13 
15 
22 {
23 private:
25 
30 
31 public:
32 
36  DtLocalObject* owner,
37  DtSimulationServices* simManager,
38  DtComponentDescriptor* desc = 0,
39  DtReaderWriterRegistry* parentRegistry = 0);
40 
43 
44  virtual bool init();
45 
48  virtual const char* type() const;
49 
50  virtual void tick();
51 
55  static DtSimComponent * creator(const DtString& name,
56  DtLocalObject* owner,
57  DtSimulationServices* simManager,
58  DtComponentDescriptor* desc = 0,
59  DtReaderWriterRegistry* parentRegistry = 0);
60 
61 
62 protected:
63 
65  virtual void initializeCallbacks(bool);
66 
72  virtual DtObjectSensorPSR* createPSR();
73 
75  virtual void processSimReportCollection(const DtVrfObjectMessage* msg);
76 
78  static void stopSpottingReportCallback(const DtVrfObjectMessage* msg, void* usr);
79 
81  virtual void processStopSpottingReport(const DtVrfObjectMessage* msg);
82 
86  virtual bool mergeSpotReportWithCurrentData(const DtSpotReport* spotReport);
87 
91  virtual void setContactSource(DtSpotReport& spotReport);
92 
96  virtual bool pruneOldReports();
97 
100  virtual void checkRemoteSensorStatus();
101 
104  virtual bool spotterEnabled(const DtUUID& remoteSensorObject);
105 
107  virtual void processSetRemoteSensor(DtSimMessage* msg);
108 
110  static void setRemoteSensorCallback(DtSimMessage* msg, void* usr);
111 
112 protected:
113 
120  std::set<DtUUID> myDisabledSpotterList;
121 
122 };
123 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtRemoteSensorSpotReportReceiverPSR * myRemoteSensorSpotReportRcvrProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: remoteSensorSpotReportReceiver.h:116
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
Instances of DtObjectSensorPSR are used to hold the shared/checkpointable state data for the DtRemote...
Definition: remoteSensorSpotReportReceiverPSR.h:22
DtSpotReportReceiver; listens for and tracks spot report messages Developer Description: DtSpotReport...
Definition: spotReportReceiver.h:34
virtual bool mergeSpotReportWithCurrentData(const DtSpotReport *spotReport)
Merges data from the specified spot report with the current list of contacts.
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 initializeCallbacks(bool)
Initialize spot report callbacks for spot report messages.
const DtSpotReportReceiver & operator=(const DtSpotReportReceiver &orig)
Not Implemented.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
virtual void setContactSource(DtSpotReport &spotReport)
Sets the contact source to be the spot report generator rather than whatever source the detecting ent...
File: simMsg.h.
Definition: simMessage.h:35
virtual bool pruneOldReports()
Looks though the current spot reports and removes any that are beyond the age limit.
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
virtual void processSimReportCollection(const DtVrfObjectMessage *msg)
Calls mergeSpotReportWithCurrentData().
DtRemoteSensorSpotReportReceiver; A DtSpotReportReceiver that listens for and tracks spot report mess...
Definition: remoteSensorSpotReportReceiver.h:21
virtual bool init()
Calls createPorts and createPortGroups Initializes myLastTickSimTime.
std::set< DtUUID > myDisabledSpotterList
Tracks remote sensor entities that have been disabled (e.g. destroyed) This is kept here instead of t...
Definition: remoteSensorSpotReportReceiver.h:120
virtual DtObjectSensorPSR * createPSR()
Creates myProcessState data member, and adds it to our process state repository manager. Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in procSRTypes.h.
DtSpotReport; subclass of DtSimReport.
Definition: spotReport.h:35
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)