VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtSimComponentNetwork Class Reference

A set of DtSimComponent and DtComponentSystem instances that are connected with a set of connections. More...

Public Member Functions

 DtSimComponentNetwork (DtVrfObject *vrfObject, DtComponentSystem *parentSystem)
virtual ~DtSimComponentNetwork ()
virtual bool init ()
virtual void tick (bool hostDestroyed)
virtual bool postAddComponentsInit ()
 Calls postAddComponentsInit() on all subcomponents.
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().
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().
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().
virtual DtSimComponentlookupComponent (const DtString &name) const
 Lookup a particular component by its DtReaderWriter name.
virtual std::list
< DtSimComponent * > 
lookupComponentsByType (const DtString &typeString)
 Returns a list of all components of the given type in this component network.
virtual DtComponentSystemlookupComponentSystem (const DtString &name) const
 Lookup a particular system by name.
virtual const
DtComponentSystemList
componentSystemList () const
virtual DtSimComponentListsensorComponentList () const
virtual DtControllerComponentListcontrollerComponentList () const
virtual DtSimComponentListactuatorComponentList () const
virtual int createComponentsFromList (const DtComponentDescriptorList &descList, DtSimComponentList *destination, int &priority, bool remoteOnly)
virtual int createSystemsFromList (const DtComponentSystemDescriptorList &descList, int &priority, bool remoteOnly)
 Populates mySystemList by creating the systems described in the provided system descriptor list.
virtual bool createComponentConnection (const DtString &source, const DtString &destination, bool suppressErrorMsgs=false)
 Adds a new port connection between two components within the component manager.
virtual void createConnectionsFromList (const DtConnectionDescriptorList &descList, bool suppressErrorMsgs=false)
 Takes the connection descriptor list from the OPD file and creates all the port connection and port group connections for this entity.
virtual void disconnectComponent (DtSimComponent *component)
 Removes and deletes all connections (both port and port group) to and from this component.
virtual void removeConnection (DtPortConnection *conn)
 Removes and deletes a single connection.
virtual void removeConnection (DtPortGroupConnection *conn)
 Removes and deletes a group connection and any sub-connections that are part of the group.
virtual void enable ()
 Enables/disables components/systems in the network.
virtual void disable ()
 Enables/disables components/systems in the network.

Protected Member Functions

virtual bool createComponentConnection (DtSimComponent *sourceComp, const DtString &sourcePortName, DtSimComponent *destComponent, const DtString &destPortName, DtString &errorString)
 Locates the named ports on each specified component and creates a connection between them.
virtual bool createSensorComponentList ()
virtual bool createControllerComponentList ()
virtual bool createActuatorComponentList ()

Protected Attributes

DtSimComponentListmySensorComponentList
DtControllerComponentListmyControllerComponentList
DtSimComponentListmyActuatorComponentList
DtComponentSystemList mySystemList
DtVrfObjectmyVrfObject
DtComponentSystemmyParentSystem

Private Member Functions

 DtSimComponentNetwork ()
 Not implemented.
 DtSimComponentNetwork (const DtSimComponentNetwork &orig)
 Not implemented.
DtSimComponentNetworkoperator= (const DtSimComponentNetwork &orig)
 Not implemented.

Detailed Description

A set of DtSimComponent and DtComponentSystem instances that are connected with a set of connections.

This class manages the instantiation of these components and systems from the descriptors and connecting them based on the connection list provided.

Constructor & Destructor Documentation

DtSimComponentNetwork::DtSimComponentNetwork ( )
private

Not implemented.

DtSimComponentNetwork::DtSimComponentNetwork ( const DtSimComponentNetwork orig)
private

Not implemented.

DtSimComponentNetwork::DtSimComponentNetwork ( DtVrfObject vrfObject,
DtComponentSystem parentSystem 
)
virtual DtSimComponentNetwork::~DtSimComponentNetwork ( )
virtual

Member Function Documentation

DtSimComponentNetwork& DtSimComponentNetwork::operator= ( const DtSimComponentNetwork orig)
private

Not implemented.

virtual bool DtSimComponentNetwork::init ( )
virtual
virtual void DtSimComponentNetwork::tick ( bool  hostDestroyed)
virtual
virtual bool DtSimComponentNetwork::postAddComponentsInit ( )
virtual

Calls postAddComponentsInit() on all subcomponents.

virtual bool DtSimComponentNetwork::addSensorComponent ( DtSimComponent component)
virtual
virtual bool DtSimComponentNetwork::addControllerComponent ( DtSimComponent component)
virtual
virtual bool DtSimComponentNetwork::addActuatorComponent ( DtSimComponent component)
virtual
virtual bool DtSimComponentNetwork::removeSensorComponent ( DtSimComponent component)
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 bool DtSimComponentNetwork::removeControllerComponent ( DtSimComponent 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 bool DtSimComponentNetwork::removeActuatorComponent ( DtSimComponent 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 DtSimComponent* DtSimComponentNetwork::lookupComponent ( const DtString name) const
virtual

Lookup a particular component by its DtReaderWriter name.

This recurses down though all component systems contained by this network.

virtual std::list<DtSimComponent*> DtSimComponentNetwork::lookupComponentsByType ( const DtString typeString)
virtual

Returns a list of all components of the given type in this component network.

The typeString is that returned by DtSimComponent::type() such as those found in compTypes.h

virtual DtComponentSystem* DtSimComponentNetwork::lookupComponentSystem ( const DtString name) const
virtual

Lookup a particular system by name.

virtual const DtComponentSystemList* DtSimComponentNetwork::componentSystemList ( ) const
virtual
virtual DtSimComponentList* DtSimComponentNetwork::sensorComponentList ( ) const
virtual
virtual DtControllerComponentList* DtSimComponentNetwork::controllerComponentList ( ) const
virtual
virtual DtSimComponentList* DtSimComponentNetwork::actuatorComponentList ( ) const
virtual
virtual int DtSimComponentNetwork::createComponentsFromList ( const DtComponentDescriptorList descList,
DtSimComponentList destination,
int &  priority,
bool  remoteOnly 
)
virtual
Returns
The number of components created.
virtual int DtSimComponentNetwork::createSystemsFromList ( const DtComponentSystemDescriptorList descList,
int &  priority,
bool  remoteOnly 
)
virtual

Populates mySystemList by creating the systems described in the provided system descriptor list.

If any systems have duplicate names they will not be created and a warning will be printed.

Parameters
priorityThe starting priority of any components that are created by this call. This parameter will contain the next valid priority for creation of components created after this call.
Returns
The number of systems created.
virtual bool DtSimComponentNetwork::createComponentConnection ( const DtString source,
const DtString destination,
bool  suppressErrorMsgs = false 
)
virtual

Adds a new port connection between two components within the component manager.

Source and Destination strings are specified in any of the formats: component-name:port-name component-name:port-group-name component-name:port-group-name:port-name A connection between two port groups will create connections between all members of the two groups which have matching names and types.

virtual void DtSimComponentNetwork::createConnectionsFromList ( const DtConnectionDescriptorList descList,
bool  suppressErrorMsgs = false 
)
virtual

Takes the connection descriptor list from the OPD file and creates all the port connection and port group connections for this entity.

Makes the connections by calling createComponentConnection().

virtual void DtSimComponentNetwork::disconnectComponent ( DtSimComponent component)
virtual

Removes and deletes all connections (both port and port group) to and from this component.

virtual void DtSimComponentNetwork::removeConnection ( DtPortConnection conn)
virtual

Removes and deletes a single connection.

virtual void DtSimComponentNetwork::removeConnection ( DtPortGroupConnection conn)
virtual

Removes and deletes a group connection and any sub-connections that are part of the group.

virtual void DtSimComponentNetwork::enable ( )
virtual

Enables/disables components/systems in the network.

virtual void DtSimComponentNetwork::disable ( )
virtual

Enables/disables components/systems in the network.

virtual bool DtSimComponentNetwork::createComponentConnection ( DtSimComponent sourceComp,
const DtString sourcePortName,
DtSimComponent destComponent,
const DtString destPortName,
DtString errorString 
)
protectedvirtual

Locates the named ports on each specified component and creates a connection between them.

If unable to create, the error is returned in errorString, and the function returns false.

virtual bool DtSimComponentNetwork::createSensorComponentList ( )
protectedvirtual
virtual bool DtSimComponentNetwork::createControllerComponentList ( )
protectedvirtual
virtual bool DtSimComponentNetwork::createActuatorComponentList ( )
protectedvirtual

Member Data Documentation

DtSimComponentList* DtSimComponentNetwork::mySensorComponentList
protected
DtControllerComponentList* DtSimComponentNetwork::myControllerComponentList
protected
DtSimComponentList* DtSimComponentNetwork::myActuatorComponentList
protected
DtComponentSystemList DtSimComponentNetwork::mySystemList
protected
DtVrfObject* DtSimComponentNetwork::myVrfObject
protected
DtComponentSystem* DtSimComponentNetwork::myParentSystem
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)