![]() |
VR-Forces 4.10 Class Documentation
|
The DtSimComponentManager is the top level class within a DtVrfObject which owns and manages all the DtSimComponent instances for that object. More...

Public Member Functions | |
| DtSimComponentManager (DtVrfObject *vrfObject) | |
| read/writable constructor More... | |
| virtual | ~DtSimComponentManager () |
| destructor More... | |
| virtual bool | init () |
| virtual void | tick () |
| virtual DtVrfObject * | vrfObject () const |
| This is a pointer to the simulation object for which this interface was created. More... | |
| virtual bool | addComponents () |
| virtual bool | addSensorComponent (DtSimComponent *component) |
| virtual bool | addControllerComponent (DtSimComponent *component) |
| virtual bool | addActuatorComponent (DtSimComponent *component) |
| virtual bool | removeSensorComponent (DtSimComponent *component) |
| Removes sensor from the component manager list, and removes any port connections to or from the component by calling disconnectComponent(). More... | |
| virtual bool | removeControllerComponent (DtSimComponent *component) |
| Removes controller from the component manager list, and removes any port connections to or from the component by calling disconnectComponent(). More... | |
| virtual bool | removeActuatorComponent (DtSimComponent *component) |
| Removes actuator from the component manager list, and removes any port connections to or from the component by calling disconnectComponent(). More... | |
| virtual bool | hasComponents () const |
| Returns true if this object has components or systems, false otherwise. More... | |
| virtual std::list < DtSimComponent * > | lookupComponentsByType (const DtString &typeString) const |
| Returns a list of DtSimComponents that have the specified type. More... | |
| virtual DtSimComponent * | lookupComponent (const DtString &name) const |
| Lookup a particular component by its DtReaderWriter name. More... | |
| virtual DtComponentSystem * | lookupSystem (const std::string &printName) |
| Look up a system by its name. More... | |
| virtual const DtComponentSystem * | lookupSystem (const std::string &printName) const |
| virtual DtComponentSystem * | lookupSystemFromFullName (const std::string &fullName) |
| Look up a system by its full name. More... | |
| virtual void | setAllSystemEnabled (bool enableDisable) |
| Performs a lookup and attempts to enable or disable all systems. More... | |
| virtual void | setSystemEnabled (const std::string &systemName, bool enableDisable, bool sendSystemUpdate) |
| Performs a lookup and attempts to enable or disable the given system. More... | |
| virtual std::list< std::string > | getSystemNames () const |
| Get a list of all system (print) names. More... | |
| virtual DtString | systemCategory (DtString &systemName) const |
| Get the category of a system, i.e. More... | |
| virtual DtSimComponentList * | sensorComponentList () const |
| virtual DtControllerComponentList * | controllerComponentList () const |
| virtual DtSimComponentList * | actuatorComponentList () const |
| virtual DtString | type () const |
| Returns the type of component manager object. More... | |
| virtual DtList * | connectionList () |
| virtual DtList * | groupConnectionList () |
| virtual void | allSystems (DtComponentSystemList &) const |
| Given the supplied system list, puts all known systems into the list (including the base system) More... | |
| virtual bool | hasSystemThatCanBeDisabled () |
| Returns whether this has a system that can be disabled. More... | |
| virtual void | notifySetDataSubscriber (DtSimMessage *msg) |
| virtual void | sendGenericSetRwStateSubscribersUpdate (const DtSetMessageType &type, const DtUUID &uuid=DtUUID::nullUUID()) |
| virtual void | sendSystemStateUpdated (const std::vector< DtComponentSystem * > &system) |
| Sends the current state of the system. More... | |
| virtual void | sendSystemStateUpdated (DtComponentSystem *system) |
| virtual DtComponentSystem * | baseSystem () |
| virtual const DtComponentSystem * | baseSystem () const |
Static Public Member Functions | |
| static DtSimComponentManagerFactory * | factory () |
| A DtSimEntityFactory is allocated by the DtSimCreator, and this pointer is set. More... | |
| static void | setFactory (DtSimComponentManagerFactory *factory) |
| static void | addSimComponentManagerCreatorFcn (const DtString &type, DtSimComponentManagerCreatorFcn fcn) |
| static DtSimComponentManager * | creator (DtVrfObject *vrfObject) |
| static DtSimComponentManager * | createComponentManager (const DtString &type, DtVrfObject *vrfObject) |
| Creates a new component manager, using the factory. More... | |
| static void | notifySetDataSubscriberCallback (DtSimMessage *msg, void *usr) |
Protected Member Functions | |
| virtual void | allSystems (DtComponentSystemList &, DtComponentSystem *) const |
| Used recursively from allSystems(). More... | |
Protected Attributes | |
| DtVrfObject * | myVrfObject |
| DtComponentSystem * | myComponentSystem |
| DtList | myConnectionList |
| DtList | myGroupConnectionList |
| std::set< DtUUID > | mySystemStateSubscribers |
| std::map< DtString, std::set < DtUUID > > | myGenericSetRwStateSubscribers |
Static Protected Attributes | |
| static DtSimComponentManagerFactory * | theFactory |
Private Member Functions | |
| DtSimComponentManager () | |
| Not implemented. More... | |
| DtSimComponentManager (const DtSimComponentManager &orig) | |
| const DtSimComponentManager & | operator= (const DtSimComponentManager &orig) |
| virtual void | processSystemListRequest (const DtVrfObjectMessage *msg) |
| static void | systemListRequestCallback (const DtVrfObjectMessage *msg, void *usr) |
| Responds to system list requests with list of system names associated with this entity. More... | |
| virtual void | processGenericSetRwRequest (const DtVrfObjectMessage *msg) |
| static void | genericSetRwRequestCallback (const DtVrfObjectMessage *msg, void *usr) |
| Responds to generic SetRw requests with data associated with this entity. More... | |
The DtSimComponentManager is the top level class within a DtVrfObject which owns and manages all the DtSimComponent instances for that object.
It does much of this management though a DtSimComponentNetwork.
|
private |
Not implemented.
|
private |
| DtSimComponentManager::DtSimComponentManager | ( | DtVrfObject * | vrfObject | ) |
read/writable constructor
|
virtual |
destructor
|
private |
|
virtual |
|
virtual |
|
virtual |
This is a pointer to the simulation object for which this interface was created.
|
virtual |
Reimplemented in DtRemoteComponentManager.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Removes sensor from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().
Does not delete the component.
|
virtual |
Removes controller from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().
Does not delete the component.
|
virtual |
Removes actuator from the component manager list, and removes any port connections to or from the component by calling disconnectComponent().
Does not delete the component.
|
virtual |
Returns true if this object has components or systems, false otherwise.
|
virtual |
Returns a list of DtSimComponents that have the specified type.
The typeString is that returned by DtSimComponent::type() such as those found in compTypes.h
|
virtual |
Lookup a particular component by its DtReaderWriter name.
It will search all systems on the entity.
|
virtual |
Look up a system by its name.
It first looks through all systems, searching depth-first, checking their print names. If no matching systems are found, it searches through all systems again, checking against the RW system name. This function uses a std::string argument to support script interfaces directly.
|
virtual |
|
virtual |
Look up a system by its full name.
It first looks through all systems, searching depth-first, checking their full names.
|
virtual |
Performs a lookup and attempts to enable or disable all systems.
if true is passed in (enable) it will iterate over all systems that are currently disabled. if false is passed in, it will iterate over all systems that can be disabled and are currently enabled.
|
virtual |
Performs a lookup and attempts to enable or disable the given system.
|
virtual |
Get a list of all system (print) names.
Get the category of a system, i.e.
system name at the first level under the base; e.g. sensor, weapon, weapon-1, damage, other, etc. SystemName is the display name of the system (i.e., what is returned from getSystemNames).
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the type of component manager object.
Strings are defined in compMgrTypes.h.
|
virtual |
|
virtual |
|
static |
A DtSimEntityFactory is allocated by the DtSimCreator, and this pointer is set.
The DtSimCreator deletes this pointer when it is deleted. This is done this way because we don't allow static initialization.
|
static |
|
static |
|
static |
|
static |
Creates a new component manager, using the factory.
|
virtual |
Given the supplied system list, puts all known systems into the list (including the base system)
|
virtual |
Returns whether this has a system that can be disabled.
|
static |
Responds to system list requests with list of system names associated with this entity.
|
virtual |
|
static |
Responds to generic SetRw requests with data associated with this entity.
|
virtual |
|
static |
|
virtual |
|
virtual |
|
virtual |
Sends the current state of the system.
|
virtual |
|
protectedvirtual |
Used recursively from allSystems().
Adds the supplied system then iterates over component network for other systems
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |