VR-Forces 4.0.4 Class Documentation
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...

List of all members.

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 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 void createComponentsFromList (const DtComponentDescriptorList &descList, DtSimComponentList *destination, int &priority)
virtual void createSystemsFromList (const DtComponentSystemDescriptorList &descList, int &priority)
 Populates mySystemList by creating the systems described in the provided system descriptor list.
virtual bool createComponentConnection (const DtString &source, const DtString &destination)
 Adds a new port connection between two components within the component manager.
virtual void createConnectionsFromList (const DtConnectionDescriptorList &descList)
 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

Not implemented.

Not implemented.


Member Function Documentation

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

Not implemented.

virtual bool DtSimComponentNetwork::init ( ) [virtual]
virtual void DtSimComponentNetwork::tick ( bool  hostDestroyed) [virtual]

Calls postAddComponentsInit() on all subcomponents.

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.

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.

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 DtComponentSystem* DtSimComponentNetwork::lookupComponentSystem ( const DtString name) const [virtual]

Lookup a particular system by name.

virtual void DtSimComponentNetwork::createComponentsFromList ( const DtComponentDescriptorList descList,
DtSimComponentList destination,
int &  priority 
) [virtual]
virtual void DtSimComponentNetwork::createSystemsFromList ( const DtComponentSystemDescriptorList descList,
int &  priority 
) [virtual]

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

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.
virtual bool DtSimComponentNetwork::createComponentConnection ( const DtString source,
const DtString destination 
) [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.

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.

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 
) [protected, virtual]

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 ( ) [protected, virtual]
virtual bool DtSimComponentNetwork::createActuatorComponentList ( ) [protected, virtual]

Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)