PPL API Reference |
|
---|
Public Member Functions | |
Construction | |
Command (const Type _t, const double _seconds) | |
virtual std::unique_ptr< Command > | Clone () const =0 |
Dynamic-copy a derived command type. More... | |
virtual | ~Command ()=0 |
Downcasts | |
Downcast this generic command to the appropriate object type. | |
MotionCommand & | ToMotionCommand () |
Downcast to a MotionCommand. Throws if this has any other command type. | |
const MotionCommand & | ToMotionCommand () const |
SensorCommand & | ToSensorCommand () |
Downcast to a SensorCommand. Throws if this has any other command type. | |
const SensorCommand & | ToSensorCommand () const |
Public Types | |
Local Types | |
enum class | Type { Motion , Sensor } |
Public Attributes | |
Internal State | |
const Type | type |
The command type. | |
double | seconds |
The command duration. | |
A command of unspecified type. This serves as an interface class for the RobotCommandQueue.
Command::Command | ( | const Type | _t, |
const double | _seconds | ||
) |
Construct a command.
_t | The command type. |
_seconds | The number of seconds required to execute this. |
|
pure virtual |
Dynamic-copy a derived command type.
Implemented in MotionCommand, and SensorCommand.