iColorO.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef ICOLORO_H
00019 #define ICOLORO_H
00020 
00021 #include <colorUtils.h>
00022 #include <boost/signals2.hpp>
00023 
00024 class IColorO
00025 {
00026 public:
00027   IColorO() : _initialized(false), _invertMask(0), _num_leds(1){;}
00028   virtual ~IColorO(){;}
00029 
00030   virtual bool init() = 0;
00031   virtual void setColor(color::rgba color) = 0;
00032   virtual void setColorMulti(std::vector<color::rgba> &colors) = 0;
00033 
00034   void setMask(int mask){ _invertMask = mask; }
00035   void setNumLeds(size_t num_leds){ _num_leds = num_leds; }
00036   int getNumLeds(){ return _num_leds; }
00037 
00038   boost::signals2::signal<void (color::rgba color)>* signalColorSet(){ return &m_sigColorSet; }
00039   boost::signals2::signal<void (std::vector<color::rgba> colors) >* signalColorsSet(){ return &m_sigColorsSet; }
00040 
00041 protected:
00042   bool _initialized;
00043   int _invertMask;
00044   int _num_leds;
00045   boost::signals2::signal<void (color::rgba color)> m_sigColorSet;
00046   boost::signals2::signal<void (std::vector<color::rgba> colors) > m_sigColorsSet;
00047 };
00048 
00049 #endif


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