14 #include <vlutil/vlMachineTypes.h>
15 #include <vlutil/vlString.h>
17 #include <tbb/spin_mutex.h>
28 class DtSimulationAddress;
77 virtual bool registerInterfaceCallbacks();
88 virtual void tick(
double simTime);
91 virtual void restart();
95 virtual void setEnabled(
bool b);
96 bool enabled()
const {
return myEnabled; };
100 static void resourceMonitorRequestCallback(
DtSimMessage* msg,
void* usr);
107 static void currentResourceRequestCallback(
DtSimMessage* msg,
void* usr);
113 static void resourceNamesRequestCallback(
DtSimMessage* msg,
void* usr);
117 virtual void processSimObjectAboutToBeRemoved(
const DtSimObject* msg);
128 virtual void resourcesChangedFor(
const DtSimObject*);
129 const std::set<DtUUID>& resourcesChangedList()
const;
135 const DtLocalObject* obj,
const std::list<DtString>& resources);
146 const DtString& resourceName,
const DtSimulationAddress& sender,
147 int iMonitorBy,
const DtFloat64& iMonitorPeriod,
bool stopMonitoring);
151 virtual DtResourceMonitorList::iterator resourceMonitorInfo(
const DtUUID&);
157 virtual void removeMonitorReference(
const DtUUID&,
const DtString& resourceName,
158 const DtSimulationAddress& sender);
161 virtual void removeMonitorReference(
const DtUUID&);
164 virtual void removeAllMonitorReferencesTo(
const DtSimulationAddress& addr);
168 virtual bool shouldAddResource(
const DtSimResource* resourceItem);
170 virtual bool resourceChanged(
const DtUUID&)
const;
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
bool myEnabled
Definition: resourceMonitor.h:177
class DtLocalObjectManager:
Definition: localObjectManager.h:151
This class will be responsible for handling requests to return resources for a particular entity (or ...
Definition: resourceMonitor.h:54
DtLocalObjectManager * myObjectManager
Definition: resourceMonitor.h:183
void setUpdateOnTick(bool b)
Set to make sure the resource monitor updates the network with any requested resources even if the si...
Definition: resourceMonitor.h:122
Content-Type: DtNetIfResourceMonitorResponse.
Definition: ifResourceMonitorResponse.h:43
Variable portion List of resouce names.
Definition: ifResourceNamesResponse.h:42
DtSimulationServices * simulationServices() const
Definition: resourceMonitor.h:172
DtSimInterfaceMessage is used to send a message to the front end or the back end. It derives from a s...
Definition: simInterfaceMessage.h:23
Contains the DtUUID class declaration.
std::set< DtUUID > myResourcesChangedList
Definition: resourceMonitor.h:180
bool updateOnTick() const
Definition: resourceMonitor.h:123
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
File: simMsg.h.
Definition: simMessage.h:35
bool myUpdateOnTick
Definition: resourceMonitor.h:178
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:53
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
DtSimResource is an abstract base class that can be used to create a hierarchical resource list of a ...
Definition: simResource.h:41
const std::set< DtUUID > & resourcesChangedList() const
Definition: resourceMonitor.h:186
bool enabled() const
Definition: resourceMonitor.h:96
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtResourceMonitorList myMonitoringResources
Definition: resourceMonitor.h:176
tbb::spin_mutex myMonitoringResourcesMutex
Definition: resourceMonitor.h:181
std::map< DtUUID, DtResourceMonitorInfo > DtResourceMonitorList
Definition: resourceMonitor.h:31
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