ms35.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef ES35_H
19 #define ES35_H
20 
21 #include <iColorO.h>
22 
23 #include <serialIO.h>
24 #include <colorUtils.h>
25 #include <sstream>
26 
27 class MS35 : public IColorO
28 {
29 public:
30  MS35(SerialIO* serialIO);
31  virtual ~MS35();
32 
33  bool init();
35  void setColorMulti(std::vector<color::rgba> &colors);
36 
37 private:
39  std::stringstream _ssOut;
40  static const int PACKAGE_SIZE = 9;
42 
43  int sendData(const char* data, size_t len);
44  unsigned short int getChecksum(const char* data, size_t len);
45 };
46 
47 #endif
Definition: ms35.h:27
SerialIO * _serialIO
Definition: ms35.h:38
std::stringstream _ssOut
Definition: ms35.h:39
void setColor(color::rgba color)
Definition: ms35.cpp:90
char buffer[PACKAGE_SIZE]
Definition: ms35.h:41
unsigned short int getChecksum(const char *data, size_t len)
Definition: ms35.cpp:63
static const int PACKAGE_SIZE
Definition: ms35.h:40
MS35(SerialIO *serialIO)
Definition: ms35.cpp:24
void setColorMulti(std::vector< color::rgba > &colors)
Definition: ms35.cpp:85
bool init()
Definition: ms35.cpp:33
virtual ~MS35()
Definition: ms35.cpp:29
int sendData(const char *data, size_t len)
Definition: ms35.cpp:71


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