Firmware for Arduino | PLEN Project Company Inc.
PLEN2::MotionController Class Reference

Management class of a motion. More...

#include <MotionController.h>

Public Member Functions

 MotionController (JointController &joint_ctrl)
 Constructor. More...
 
bool playing ()
 Decide if a motion is playing. More...
 
bool frameUpdatable ()
 Decide if a motion frame is updatable. More...
 
bool updatingFinished ()
 Decide that updating a frame has finished. More...
 
bool nextFrameLoadable ()
 Decide if there is a loadable frame at the next time. More...
 
void play (uint8_t slot)
 Play a motion. More...
 
void playFrameDirectly (const Motion::Frame &frame)
 Play a frame directly. More...
 
void willStop ()
 Will stop playing a motion. More...
 
void stop ()
 Stop playing a motion. More...
 
void updateFrame ()
 
void loadNextFrame ()
 Load next frame. More...
 
void dump (uint8_t slot)
 Dump a motion with JSON format. More...
 

Detailed Description

Management class of a motion.

Constructor & Destructor Documentation

PLEN2::MotionController::MotionController ( JointController joint_ctrl)

Constructor.

Parameters
[in]joint_ctrlAn instance of joint controller.

Member Function Documentation

void PLEN2::MotionController::dump ( uint8_t  slot)

Dump a motion with JSON format.

Output JSON string like a "motion.json", however, property "device"'s type is not string but integer defined as device id in "device_map.json".

See also
Parameters
[in]slotSlot of a motion.
bool PLEN2::MotionController::frameUpdatable ( )

Decide if a motion frame is updatable.

Returns
Result
void PLEN2::MotionController::loadNextFrame ( )

Load next frame.

bool PLEN2::MotionController::nextFrameLoadable ( )

Decide if there is a loadable frame at the next time.

Returns
Result
void PLEN2::MotionController::play ( uint8_t  slot)

Play a motion.

Parameters
[in]slotNumber of a motion.
void PLEN2::MotionController::playFrameDirectly ( const Motion::Frame frame)

Play a frame directly.

Parameters
[in]frameAn instance of frame
bool PLEN2::MotionController::playing ( )

Decide if a motion is playing.

Returns
Result
void PLEN2::MotionController::stop ( )

Stop playing a motion.

void PLEN2::MotionController::updateFrame ( )
bool PLEN2::MotionController::updatingFinished ( )

Decide that updating a frame has finished.

Returns
Result
void PLEN2::MotionController::willStop ( )

Will stop playing a motion.

The method doesn't stop playing a motion just after running itself, but will stop it when a frame that has the stop flag is discovered.


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