VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtSwingingPartActuator Class Reference

DtSwingingPartActuator is a simple actuator which controls the movement of an articulated part as it swings between an open and closed position. More...

Inheritance diagram for DtSwingingPartActuator:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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 DtSwingingPartActuatorPSRcreatePSR ()
 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

DtArticulatedPartStateRepositorymyArtPartStateRep
 The state repository that represents the swinging articulated part.
const
DtSwingingPartActuatorDescriptor
myDescriptor
SwingAxis mySwingAxis
DtSwingingPartActuatorPSRmyProcessState
 Container for state data associated with this component such as whether it is in the closed or opened position.
Ports and Port Groups
DtIntegerOutputPortmyCurrentStateOutputPort
 Output Port Name: current-state
Output Port Description: Nominal azimuth value.
DtBooleanInputPortmyRequestedStateInputPort
 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 DtSwingingPartActuatoroperator= (const DtSwingingPartActuator &orig)
 assignment operator; not implemented

Detailed Description

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


Member Enumeration Documentation

Enumerator:
XAxis 
YAxis 
ZAxis 

Constructor & Destructor Documentation

DtSwingingPartActuator::DtSwingingPartActuator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor

default constructor; not implemented

copy constructor; not implemented


Member Function Documentation

virtual bool DtSwingingPartActuator::init ( ) [virtual]

Overridden to cache a pointer to the entity's radio in this class.

Reimplemented from DtActuatorComponent.

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.

Returns:
DtSwingingPartActuatorType

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*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.
virtual bool DtSwingingPartActuator::createPorts ( ) [protected, virtual]

Overridden to create azimuth ports.

Reimplemented from DtSimComponent.

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]
Returns:
The current angle of the articulated part.
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]
Returns:
True if the specified angle is within the open-angle to closed-angle arc defined in the descriptor.
const DtSwingingPartActuator& DtSwingingPartActuator::operator= ( const DtSwingingPartActuator orig) [private]

assignment operator; not implemented


Member Data Documentation

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.

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).


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)