Public Member Functions | Private Member Functions | Private Attributes | List of all members
SequenceMode Class Reference

#include <sequenceMode.h>

Inheritance diagram for SequenceMode:
Inheritance graph
[legend]

Public Member Functions

void execute ()
 
std::string getName ()
 
 SequenceMode (std::vector< seq_t > sequences, int priority=0, double freq=0.25, int pulses=0, double timeout=0)
 
- Public Member Functions inherited from Mode
bool finished ()
 
color::rgba getActualColor ()
 
color::rgba getColor ()
 
double getFrequency ()
 
int getPriority ()
 
int getPulses ()
 
double getTimeout ()
 
bool isRunning ()
 
 Mode (int priority=0, double freq=0, int pulses=0, double timeout=0)
 
void pause ()
 
int pulsed ()
 
void setActualColor (color::rgba color)
 
void setColor (color::rgba color)
 
void setFrequency (double freq)
 
void setPriority (int priority)
 
void setPulses (int pulses)
 
void setTimeout (double timeout)
 
boost::signals2::signal< void(color::rgba color)> * signalColorReady ()
 
boost::signals2::signal< void(std::vector< color::rgba > &colors)> * signalColorsReady ()
 
boost::signals2::signal< void(int)> * signalModeFinished ()
 
void start ()
 
void stop ()
 
virtual ~Mode ()
 

Private Member Functions

color::rgba interpolateColor (color::rgba start, color::rgba goal, float t)
 
float linearInterpolate (float a, float b, float t)
 

Private Attributes

color::rgba _color
 
bool _init
 
float _int_count
 
float _int_inc
 
std::vector< seq_t_seqences
 
int _seqidx
 
int _state
 

Additional Inherited Members

- Protected Member Functions inherited from Mode
virtual void run ()
 
- Protected Attributes inherited from Mode
color::rgba _actualColor
 
color::rgba _color
 
std::vector< color::rgba_colors
 
bool _finished
 
double _freq
 
color::rgba _init_color
 
int _priority
 
int _pulsed
 
int _pulses
 
double _timeout
 
boost::signals2::signal< void(color::rgba color)> m_sigColorReady
 
boost::signals2::signal< void(std::vector< color::rgba > &colors)> m_sigColorsReady
 
boost::signals2::signal< void(int)> m_sigFinished
 
- Static Protected Attributes inherited from Mode
static const unsigned int UPDATE_RATE_HZ = 100
 

Detailed Description

Definition at line 32 of file sequenceMode.h.

Constructor & Destructor Documentation

SequenceMode::SequenceMode ( std::vector< seq_t sequences,
int  priority = 0,
double  freq = 0.25,
int  pulses = 0,
double  timeout = 0 
)
inline

Definition at line 35 of file sequenceMode.h.

Member Function Documentation

void SequenceMode::execute ( )
inlinevirtual

Implements Mode.

Definition at line 42 of file sequenceMode.h.

std::string SequenceMode::getName ( )
inlinevirtual

Implements Mode.

Definition at line 99 of file sequenceMode.h.

color::rgba SequenceMode::interpolateColor ( color::rgba  start,
color::rgba  goal,
float  t 
)
inlineprivate

Definition at line 111 of file sequenceMode.h.

float SequenceMode::linearInterpolate ( float  a,
float  b,
float  t 
)
inlineprivate

Definition at line 147 of file sequenceMode.h.

Member Data Documentation

color::rgba SequenceMode::_color
private

Definition at line 109 of file sequenceMode.h.

bool SequenceMode::_init
private

Definition at line 104 of file sequenceMode.h.

float SequenceMode::_int_count
private

Definition at line 106 of file sequenceMode.h.

float SequenceMode::_int_inc
private

Definition at line 105 of file sequenceMode.h.

std::vector<seq_t> SequenceMode::_seqences
private

Definition at line 102 of file sequenceMode.h.

int SequenceMode::_seqidx
private

Definition at line 103 of file sequenceMode.h.

int SequenceMode::_state
private

Definition at line 107 of file sequenceMode.h.


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


cob_light
Author(s): Benjamin Maidel
autogenerated on Wed Apr 7 2021 02:11:39