22 : _stopRequested(false), default_priority(0)
58 std::map<int, boost::shared_ptr<Mode>, std::greater<int> >::iterator itr;
62 ROS_DEBUG(
"Stopping mode: %i with prio %i",
73 ROS_DEBUG(
"Attaching Mode %i with prio: %i freq: %f timeout: %f pulses: %i ",
74 ModeFactory::type(mode.get()), mode->getPriority(), mode->getFrequency(), mode->getTimeout(), mode->getPulses());
79 ROS_DEBUG(
"Executing Mode %i with prio: %i freq: %f timeout: %f pulses: %i ",
80 ModeFactory::type(mode.get()), mode->getPriority(), mode->getFrequency(), mode->getTimeout(), mode->getPulses());
83 Mode* ptr = mode.get();
84 u_id =
reinterpret_cast<uint64_t
>( ptr );
106 std::map<int, boost::shared_ptr<Mode>, std::greater<int> >::iterator itr;
120 std::map<int, boost::shared_ptr<Mode>, std::greater<int> >::iterator itr;
123 uint64_t uid =
reinterpret_cast<uint64_t
>(itr->second.get());
126 ROS_DEBUG(
"Stopping mode: %i with prio %i",
135 ROS_DEBUG(
"Resume mode: %i with prio %i",
156 ROS_DEBUG(
"Resume mode: %i with prio %i",
164 ROS_WARN(
"Mode finished which should't be executed");
193 return reinterpret_cast<uint64_t>(
_mapActiveModes.begin()->second.get());
void onColorSetReceived(color::rgba color)
boost::signals2::signal< void(color::rgba color)> * signalColorSet()
void setDefaultPriority(int priority)
std::map< int, boost::shared_ptr< Mode >, std::greater< int > > _mapActiveModes
int getExecutingPriority()
static int type(Mode *mode)
ModeExecutor(IColorO *colorO)
uint64_t execute(boost::shared_ptr< Mode > mode)
void onModeFinishedReceived(int prio)
virtual void setColorMulti(std::vector< color::rgba > &colors)=0
uint64_t getExecutingUId()
virtual void setColor(color::rgba color)=0
static boost::shared_ptr< Mode > create(cob_light::LightMode requestMode, IColorO *colorO)