PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
MotionCommand Struct Reference

A motion command, consisting of a control and length of time to execute it. More...

Public Member Functions

Construction
 MotionCommand ()
 
 MotionCommand (const ControlSet &_c, const double _seconds)
 
virtual std::unique_ptr< CommandClone () const override
 Dynamic-copy a derived command type. More...
 
virtual ~MotionCommand ()
 
Equality
bool operator== (const MotionCommand &_other) const noexcept
 
bool operator!= (const MotionCommand &_other) const noexcept
 
Downcasts

Downcast this generic command to the appropriate object type.

MotionCommandToMotionCommand ()
 Downcast to a MotionCommand. Throws if this has any other command type.
 
const MotionCommandToMotionCommand () const
 
SensorCommandToSensorCommand ()
 Downcast to a SensorCommand. Throws if this has any other command type.
 
const SensorCommandToSensorCommand () const
 

Public Types

Local Types
enum class  Type { Motion , Sensor }
 

Public Attributes

Internal State
ControlSet controls
 The controls.
 
Internal State
const Type type
 The command type.
 
double seconds
 The command duration.
 

Detailed Description

A motion command, consisting of a control and length of time to execute it.

Constructor & Destructor Documentation

◆ MotionCommand()

MotionCommand::MotionCommand ( const ControlSet &  _c,
const double  _seconds 
)
Parameters
_cSet of controls for the motion command
_secondsThe control duration

Member Function Documentation

◆ Clone()

std::unique_ptr< Command > MotionCommand::Clone ( ) const
overridevirtual

Dynamic-copy a derived command type.

Implements Command.

◆ operator==()

bool MotionCommand::operator== ( const MotionCommand _other) const
noexcept

Define an equivalence relation.

Returns
True if both commands have the same control sets and near-equal durations (within a small tolerance).

The documentation for this struct was generated from the following files: