![]() |
VR-Forces 4.0.4 Class Documentation
|
DtSwingingPartActuator is a simple actuator which controls the movement of an articulated part as it swings between an open and closed position. More...

Public Member Functions | |
| DtSwingingPartActuator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtSwingingPartActuator () |
| destructor | |
| virtual bool | init () |
| Overridden to cache a pointer to the entity's radio in this class. | |
| virtual bool | postAddComponentsInit () |
| Overridden to set the values on myAzimuthInfoPortGroup. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | tick () |
| Calculate new kinematic state. | |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Types | |
| enum | SwingAxis { XAxis, YAxis, ZAxis } |
Protected Member Functions | |
| virtual bool | createPorts () |
| Overridden to create azimuth ports. | |
| virtual DtSwingingPartActuatorPSR * | createPSR () |
| Creates myProcessState data member, and adds it to our process state repository manager. | |
| virtual double | currentPosition () |
| virtual void | setPositionAndRate (double newPos, double newRate) |
| Sets the new angle and rate of the articulated part. | |
| virtual bool | angleWithinSlewArc (double angle) |
Protected Attributes | |
| DtArticulatedPartStateRepository * | myArtPartStateRep |
| The state repository that represents the swinging articulated part. | |
| const DtSwingingPartActuatorDescriptor * | myDescriptor |
| SwingAxis | mySwingAxis |
| DtSwingingPartActuatorPSR * | myProcessState |
| Container for state data associated with this component such as whether it is in the closed or opened position. | |
Ports and Port Groups | |
| DtIntegerOutputPort * | myCurrentStateOutputPort |
| Output Port Name: current-state Output Port Description: Nominal azimuth value. | |
| DtBooleanInputPort * | myRequestedStateInputPort |
| Output Port Name: requested-state Output Port Description: The requested state for this swinging part. | |
Private Member Functions | |
| DtSwingingPartActuator () | |
| default constructor; not implemented | |
| DtSwingingPartActuator (const DtSwingingPartActuator &orig) | |
| copy constructor; not implemented | |
| const DtSwingingPartActuator & | operator= (const DtSwingingPartActuator &orig) |
| assignment operator; not implemented | |
DtSwingingPartActuator is a simple actuator which controls the movement of an articulated part as it swings between an open and closed position.
It is designed to articulate things such as doors or landing gear on planes. It takes boolean input on a port to determine the requested position, and then swings the articulated part between the specified open and closed positions based on the specified rate. The part cannot be stopped at intermediate positions with this actuator. This actuator also provides feedback on an output port about the current position of the articulated part, whether it is open, closed or in transition.
Uses Descriptor Type: DtAzimuthMountComponentDescriptor
enum DtSwingingPartActuator::SwingAxis [protected] |
| DtSwingingPartActuator::DtSwingingPartActuator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtSwingingPartActuator::~DtSwingingPartActuator | ( | ) | [virtual] |
destructor
| DtSwingingPartActuator::DtSwingingPartActuator | ( | ) | [private] |
default constructor; not implemented
| DtSwingingPartActuator::DtSwingingPartActuator | ( | const DtSwingingPartActuator & | orig | ) | [private] |
copy constructor; not implemented
| virtual bool DtSwingingPartActuator::init | ( | ) | [virtual] |
Overridden to cache a pointer to the entity's radio in this class.
Reimplemented from DtActuatorComponent.
| virtual bool DtSwingingPartActuator::postAddComponentsInit | ( | ) | [virtual] |
Overridden to set the values on myAzimuthInfoPortGroup.
Reimplemented from DtSimComponent.
| virtual DtString DtSwingingPartActuator::type | ( | ) | const [virtual] |
Returns a string identifies the class type of component.
Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.
Reimplemented from DtSimComponent.
| virtual void DtSwingingPartActuator::tick | ( | ) | [virtual] |
Calculate new kinematic state.
Reimplemented from DtSimComponent.
| static DtSimComponent* DtSwingingPartActuator::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual bool DtSwingingPartActuator::createPorts | ( | ) | [protected, virtual] |
Overridden to create azimuth ports.
Reimplemented from DtSimComponent.
| virtual DtSwingingPartActuatorPSR* DtSwingingPartActuator::createPSR | ( | ) | [protected, virtual] |
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.
| virtual double DtSwingingPartActuator::currentPosition | ( | ) | [protected, virtual] |
| virtual void DtSwingingPartActuator::setPositionAndRate | ( | double | newPos, |
| double | newRate | ||
| ) | [protected, virtual] |
Sets the new angle and rate of the articulated part.
| virtual bool DtSwingingPartActuator::angleWithinSlewArc | ( | double | angle | ) | [protected, virtual] |
| const DtSwingingPartActuator& DtSwingingPartActuator::operator= | ( | const DtSwingingPartActuator & | orig | ) | [private] |
assignment operator; not implemented
Output Port Name: current-state
Output Port Description: Nominal azimuth value.
Output Port Range: 0: CLOSED, 1: IN_TRANSITION, 2: OPEN
Output Port Name: requested-state
Output Port Description: The requested state for this swinging part.
True is open, false is closed.
Output Port Range:
Output Port Default Value:
The state repository that represents the swinging articulated part.
const DtSwingingPartActuatorDescriptor* DtSwingingPartActuator::myDescriptor [protected] |
SwingAxis DtSwingingPartActuator::mySwingAxis [protected] |
Container for state data associated with this component such as whether it is in the closed or opened position.
This state is saved and restored as part of a scenario (or checkpoint).