Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes
Mode Class Reference

#include <mode.h>

Inheritance diagram for Mode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void execute ()=0
bool finished ()
color::rgba getActualColor ()
color::rgba getColor ()
double getFrequency ()
virtual std::string getName ()=0
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(std::vector
< color::rgba > colors)> * 
signalColorsReady ()
boost::signals2::signal< void(int)> * signalModeFinished ()
void start ()
void stop ()
virtual ~Mode ()

Protected Member Functions

virtual void run ()

Protected Attributes

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

static const unsigned int UPDATE_RATE_HZ = 100

Private Member Functions

bool isPauseRequested ()
bool isStopRequested ()

Private Attributes

boost::condition_variable _cond_pause
bool _isPauseRequested
bool _isRunning
bool _isStopRequested
boost::mutex _mutex
boost::mutex _mutex_pause
boost::shared_ptr< boost::thread > _thread

Detailed Description

Definition at line 26 of file mode.h.


Constructor & Destructor Documentation

Mode::Mode ( int  priority = 0,
double  freq = 0,
int  pulses = 0,
double  timeout = 0 
) [inline]

Definition at line 29 of file mode.h.

virtual Mode::~Mode ( ) [inline, virtual]

Definition at line 37 of file mode.h.


Member Function Documentation

virtual void Mode::execute ( ) [pure virtual]
bool Mode::finished ( ) [inline]

Definition at line 84 of file mode.h.

Definition at line 104 of file mode.h.

Definition at line 101 of file mode.h.

double Mode::getFrequency ( ) [inline]

Definition at line 93 of file mode.h.

virtual std::string Mode::getName ( ) [pure virtual]
int Mode::getPriority ( ) [inline]

Definition at line 87 of file mode.h.

int Mode::getPulses ( ) [inline]

Definition at line 96 of file mode.h.

double Mode::getTimeout ( ) [inline]

Definition at line 90 of file mode.h.

bool Mode::isPauseRequested ( ) [inline, private]

Definition at line 151 of file mode.h.

bool Mode::isRunning ( ) [inline]

Definition at line 106 of file mode.h.

bool Mode::isStopRequested ( ) [inline, private]

Definition at line 142 of file mode.h.

void Mode::pause ( ) [inline]

Definition at line 72 of file mode.h.

int Mode::pulsed ( ) [inline]

Definition at line 98 of file mode.h.

virtual void Mode::run ( ) [inline, protected, virtual]

Definition at line 161 of file mode.h.

void Mode::setActualColor ( color::rgba  color) [inline]

Definition at line 103 of file mode.h.

void Mode::setColor ( color::rgba  color) [inline]

Definition at line 100 of file mode.h.

void Mode::setFrequency ( double  freq) [inline]

Definition at line 92 of file mode.h.

void Mode::setPriority ( int  priority) [inline]

Definition at line 86 of file mode.h.

void Mode::setPulses ( int  pulses) [inline]

Definition at line 95 of file mode.h.

void Mode::setTimeout ( double  timeout) [inline]

Definition at line 89 of file mode.h.

boost::signals2::signal<void (std::vector<color::rgba> colors)>* Mode::signalColorsReady ( ) [inline]

Definition at line 109 of file mode.h.

boost::signals2::signal<void (int)>* Mode::signalModeFinished ( ) [inline]

Definition at line 110 of file mode.h.

void Mode::start ( ) [inline]

Definition at line 39 of file mode.h.

void Mode::stop ( ) [inline]

Definition at line 52 of file mode.h.


Member Data Documentation

Definition at line 123 of file mode.h.

Reimplemented in SequenceMode.

Definition at line 121 of file mode.h.

std::vector<color::rgba> Mode::_colors [protected]

Definition at line 122 of file mode.h.

boost::condition_variable Mode::_cond_pause [private]

Definition at line 140 of file mode.h.

bool Mode::_finished [protected]

Definition at line 118 of file mode.h.

double Mode::_freq [protected]

Definition at line 114 of file mode.h.

Definition at line 124 of file mode.h.

bool Mode::_isPauseRequested [private]

Definition at line 137 of file mode.h.

bool Mode::_isRunning [private]

Definition at line 138 of file mode.h.

bool Mode::_isStopRequested [private]

Definition at line 136 of file mode.h.

boost::mutex Mode::_mutex [private]

Definition at line 134 of file mode.h.

boost::mutex Mode::_mutex_pause [private]

Definition at line 135 of file mode.h.

int Mode::_priority [protected]

Definition at line 113 of file mode.h.

int Mode::_pulsed [protected]

Definition at line 119 of file mode.h.

int Mode::_pulses [protected]

Definition at line 115 of file mode.h.

boost::shared_ptr<boost::thread> Mode::_thread [private]

Definition at line 133 of file mode.h.

double Mode::_timeout [protected]

Definition at line 116 of file mode.h.

boost::signals2::signal<void (color::rgba color)> Mode::m_sigColorReady [protected]

Definition at line 128 of file mode.h.

boost::signals2::signal<void (std::vector<color::rgba> colors)> Mode::m_sigColorsReady [protected]

Definition at line 129 of file mode.h.

boost::signals2::signal<void (int)> Mode::m_sigFinished [protected]

Definition at line 130 of file mode.h.

const unsigned int Mode::UPDATE_RATE_HZ = 100 [static, protected]

Definition at line 126 of file mode.h.


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


cob_light
Author(s): Benjamin Maidel
autogenerated on Sat Jun 8 2019 21:02:07