Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

MotionSequenceMC< MAXMOVE > Class Template Reference

#include <MotionSequenceMC.h>

Inheritance diagram for MotionSequenceMC< MAXMOVE >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<unsigned int MAXMOVE>
class MotionSequenceMC< MAXMOVE >

Instantiates MotionSequences - when you want to make a new MotionSequence, make one of these.

Allows a (compile-time) variable amount of data storage through its template parameter. See MotionSequence for documentation on its members

See also:
MotionSequence

MotionSequence::SizeSmall, MotionSequence::SizeMedium, MotionSequence::SizeLarge, MotionSequence::SizeXLarge,

Definition at line 184 of file MotionSequenceMC.h.

Public Member Functions

 MotionSequenceMC ()
 constructor

 MotionSequenceMC (const char *filename)
 constructor, loads from a file and then resets the playtime to beginning and begins to play

virtual ~MotionSequenceMC ()
 destructor

virtual int updateOutputs ()
 is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager

virtual void clear ()
 empties out the sequence (constant time operation - faster than a series of pops)

virtual unsigned int getMaxFrames () const
 returns the maximum number of key frames (Move's) which can be stored, determined by the instantiating MotionSequenceMC's template parameter

virtual unsigned int getUsedFrames () const
 returns the number of used key frames (Move's) which have been stored by the instantiation MotionSequence subclass


Protected Types

typedef ListMemBuf< Move,
MAXMOVE, Move_idx_t
list_t
 shorthand for the ListMemBuf that stores all of the movement frames


Protected Member Functions

virtual Move & getKeyFrame (Move_idx_t x)
 returns the Move struct corresponding to x in the subclass's actual data structure

virtual const Move & getKeyFrame (Move_idx_t x) const
 returns the Move struct corresponding to x in the subclass's actual data structure

virtual Move_idx_t newKeyFrame ()
 causes subclass to create a new Move structure, returns its index

virtual void eraseKeyFrame (Move_idx_t x)
 causes subclass to mark the corresponding Move structure as free

void setRange (unsigned int t, Move_idx_t &prev, Move_idx_t &next) const
 Sets prev and next to the appropriate values for the given time and output index.


Protected Attributes

list_t moves
 stores all of the movement keyframes


Member Typedef Documentation

template<unsigned int MAXMOVE>
typedef ListMemBuf<Move,MAXMOVE,Move_idx_t> MotionSequenceMC< MAXMOVE >::list_t [protected]
 

shorthand for the ListMemBuf that stores all of the movement frames

Definition at line 263 of file MotionSequenceMC.h.


Constructor & Destructor Documentation

template<unsigned int MAXMOVE>
MotionSequenceMC< MAXMOVE >::MotionSequenceMC  )  [inline]
 

constructor

Definition at line 187 of file MotionSequenceMC.h.

References MotionSequenceMC< MAXMOVE >::clear(), and MotionSequenceMC< MAXMOVE >::moves.

template<unsigned int MAXMOVE>
MotionSequenceMC< MAXMOVE >::MotionSequenceMC const char *  filename  )  [inline, explicit]
 

constructor, loads from a file and then resets the playtime to beginning and begins to play

Definition at line 189 of file MotionSequenceMC.h.

References MotionSequenceMC< MAXMOVE >::clear(), LoadSave::LoadFile(), MotionSequenceMC< MAXMOVE >::moves, and MotionSequence::setPlayTime().

template<unsigned int MAXMOVE>
virtual MotionSequenceMC< MAXMOVE >::~MotionSequenceMC  )  [inline, virtual]
 

destructor

Definition at line 191 of file MotionSequenceMC.h.


Member Function Documentation

template<unsigned int MAXMOVE>
virtual void MotionSequenceMC< MAXMOVE >::clear  )  [inline, virtual]
 

empties out the sequence (constant time operation - faster than a series of pops)

Implements MotionSequence.

Definition at line 247 of file MotionSequenceMC.h.

References ListMemBuf< Move, MAXMOVE, Move_idx_t >::back(), ListMemBuf< Move, MAXMOVE, Move_idx_t >::clear(), MotionSequence::invalid_move, MotionSequenceMC< MAXMOVE >::moves, ListMemBuf< Move, MAXMOVE, Move_idx_t >::new_back(), MotionSequence::nexts, ERS210Info::NumOutputs, MotionSequence::prevs, MotionSequence::setPlayTime(), and MotionSequence::starts.

template<unsigned int MAXMOVE>
virtual void MotionSequenceMC< MAXMOVE >::eraseKeyFrame Move_idx_t  x  )  [inline, protected, virtual]
 

causes subclass to mark the corresponding Move structure as free

Implements MotionSequence.

Definition at line 271 of file MotionSequenceMC.h.

References ListMemBuf< Move, MAXMOVE, Move_idx_t >::erase(), and MotionSequenceMC< MAXMOVE >::moves.

template<unsigned int MAXMOVE>
virtual const Move& MotionSequenceMC< MAXMOVE >::getKeyFrame Move_idx_t  x  )  const [inline, protected, virtual]
 

returns the Move struct corresponding to x in the subclass's actual data structure

Implements MotionSequence.

Definition at line 269 of file MotionSequenceMC.h.

References MotionSequenceMC< MAXMOVE >::moves.

template<unsigned int MAXMOVE>
virtual Move& MotionSequenceMC< MAXMOVE >::getKeyFrame Move_idx_t  x  )  [inline, protected, virtual]
 

returns the Move struct corresponding to x in the subclass's actual data structure

Implements MotionSequence.

Definition at line 268 of file MotionSequenceMC.h.

References MotionSequenceMC< MAXMOVE >::moves.

template<unsigned int MAXMOVE>
virtual unsigned int MotionSequenceMC< MAXMOVE >::getMaxFrames  )  const [inline, virtual]
 

returns the maximum number of key frames (Move's) which can be stored, determined by the instantiating MotionSequenceMC's template parameter

Implements MotionSequence.

Definition at line 258 of file MotionSequenceMC.h.

References ListMemBuf< Move, MAXMOVE, Move_idx_t >::getMaxCapacity(), and MotionSequenceMC< MAXMOVE >::moves.

template<unsigned int MAXMOVE>
virtual unsigned int MotionSequenceMC< MAXMOVE >::getUsedFrames  )  const [inline, virtual]
 

returns the number of used key frames (Move's) which have been stored by the instantiation MotionSequence subclass

Implements MotionSequence.

Definition at line 259 of file MotionSequenceMC.h.

References MotionSequenceMC< MAXMOVE >::moves, and ListMemBuf< Move, MAXMOVE, Move_idx_t >::size().

template<unsigned int MAXMOVE>
virtual Move_idx_t MotionSequenceMC< MAXMOVE >::newKeyFrame  )  [inline, protected, virtual]
 

causes subclass to create a new Move structure, returns its index

Implements MotionSequence.

Definition at line 270 of file MotionSequenceMC.h.

References MotionSequence::Move_idx_t, MotionSequenceMC< MAXMOVE >::moves, and ListMemBuf< Move, MAXMOVE, Move_idx_t >::new_front().

template<unsigned int MAXMOVE>
void MotionSequenceMC< MAXMOVE >::setRange unsigned int  t,
Move_idx_t prev,
Move_idx_t next
const [inline, protected, virtual]
 

Sets prev and next to the appropriate values for the given time and output index.

Implements MotionSequence.

Definition at line 272 of file MotionSequenceMC.h.

References MotionSequence::invalid_move, and MotionSequenceMC< MAXMOVE >::moves.

template<unsigned int MAXMOVE>
virtual int MotionSequenceMC< MAXMOVE >::updateOutputs  )  [inline, virtual]
 

is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager

Returns:
zero if no changes were made, non-zero otherwise
See also:
RobotInfo::NumFrames

RobotInfo::FrameTime

Reimplemented from MotionSequence.

Definition at line 222 of file MotionSequenceMC.h.

References MotionSequence::calcOutput(), ERS210Info::FrameTime, MotionSequence::getOutputCmd(), MotionSequence::invalid_move, MotionSequence::isPlaying(), motman, MotionSequence::Move_idx_t, MotionSequenceMC< MAXMOVE >::moves, MotionSequence::nexts, ERS210Info::NumFrames, ERS210Info::NumOutputs, MotionSequence::playtime, MotionSequence::prevs, MotionManager::setOutput(), MotionSequenceMC< MAXMOVE >::setRange(), OutputCmd::unset(), and MotionSequence::updateOutputs().


Member Data Documentation

template<unsigned int MAXMOVE>
list_t MotionSequenceMC< MAXMOVE >::moves [protected]
 

stores all of the movement keyframes

Definition at line 266 of file MotionSequenceMC.h.


The documentation for this class was generated from the following file:
Tekkotsu v1.4
Generated Sat Jul 19 00:09:04 2003 by Doxygen 1.3.2