#include <mode.h>

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 |
| Mode::Mode | ( | int | priority = 0, |
| double | freq = 0, |
||
| int | pulses = 0, |
||
| double | timeout = 0 |
||
| ) | [inline] |
| virtual Mode::~Mode | ( | ) | [inline, virtual] |
| virtual void Mode::execute | ( | ) | [pure virtual] |
Implemented in XMasMode, DistApproxMode, SweepColorMode, SequenceMode, CircleColorMode, FadeColorMode, FlashMode, GlowColorMode, BreathColorMode, BreathMode, and StaticMode.
| bool Mode::finished | ( | ) | [inline] |
| color::rgba Mode::getActualColor | ( | ) | [inline] |
| color::rgba Mode::getColor | ( | ) | [inline] |
| double Mode::getFrequency | ( | ) | [inline] |
| virtual std::string Mode::getName | ( | ) | [pure virtual] |
Implemented in DistApproxMode, SequenceMode, XMasMode, SweepColorMode, FadeColorMode, GlowColorMode, BreathColorMode, FlashMode, CircleColorMode, BreathMode, and StaticMode.
| int Mode::getPriority | ( | ) | [inline] |
| int Mode::getPulses | ( | ) | [inline] |
| double Mode::getTimeout | ( | ) | [inline] |
| bool Mode::isPauseRequested | ( | ) | [inline, private] |
| bool Mode::isRunning | ( | ) | [inline] |
| bool Mode::isStopRequested | ( | ) | [inline, private] |
| void Mode::pause | ( | ) | [inline] |
| int Mode::pulsed | ( | ) | [inline] |
| void Mode::setActualColor | ( | color::rgba | color | ) | [inline] |
| void Mode::setColor | ( | color::rgba | color | ) | [inline] |
| void Mode::setFrequency | ( | double | freq | ) | [inline] |
| void Mode::setPriority | ( | int | priority | ) | [inline] |
| void Mode::setPulses | ( | int | pulses | ) | [inline] |
| void Mode::setTimeout | ( | double | timeout | ) | [inline] |
| boost::signals2::signal<void (std::vector<color::rgba> colors)>* Mode::signalColorsReady | ( | ) | [inline] |
| boost::signals2::signal<void (int)>* Mode::signalModeFinished | ( | ) | [inline] |
| void Mode::start | ( | ) | [inline] |
| void Mode::stop | ( | ) | [inline] |
color::rgba Mode::_actualColor [protected] |
color::rgba Mode::_color [protected] |
Reimplemented in SequenceMode.
std::vector<color::rgba> Mode::_colors [protected] |
boost::condition_variable Mode::_cond_pause [private] |
bool Mode::_finished [protected] |
double Mode::_freq [protected] |
color::rgba Mode::_init_color [protected] |
bool Mode::_isPauseRequested [private] |
bool Mode::_isRunning [private] |
bool Mode::_isStopRequested [private] |
boost::mutex Mode::_mutex [private] |
boost::mutex Mode::_mutex_pause [private] |
int Mode::_priority [protected] |
int Mode::_pulsed [protected] |
int Mode::_pulses [protected] |
boost::shared_ptr<boost::thread> Mode::_thread [private] |
double Mode::_timeout [protected] |
boost::signals2::signal<void (color::rgba color)> Mode::m_sigColorReady [protected] |
boost::signals2::signal<void (std::vector<color::rgba> colors)> Mode::m_sigColorsReady [protected] |
boost::signals2::signal<void (int)> Mode::m_sigFinished [protected] |
const unsigned int Mode::UPDATE_RATE_HZ = 100 [static, protected] |