ros
include
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
();
34
void
setColor
(
color::rgba
color
);
35
void
setColorMulti
(std::vector<color::rgba> &colors);
36
37
private
:
38
SerialIO
*
_serialIO
;
39
std::stringstream
_ssOut
;
40
static
const
int
PACKAGE_SIZE
= 9;
41
char
buffer
[
PACKAGE_SIZE
];
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
color
Definition:
colorUtils.h:24
MS35::init
bool init()
Definition:
ms35.cpp:33
MS35::~MS35
virtual ~MS35()
Definition:
ms35.cpp:29
SerialIO
Definition:
serialIO.h:39
colorUtils.h
iColorO.h
MS35::sendData
int sendData(const char *data, size_t len)
Definition:
ms35.cpp:71
color::rgba
Definition:
colorUtils.h:26
serialIO.h
MS35
Definition:
ms35.h:27
MS35::_serialIO
SerialIO * _serialIO
Definition:
ms35.h:38
MS35::setColor
void setColor(color::rgba color)
Definition:
ms35.cpp:90
IColorO
Definition:
iColorO.h:24
MS35::_ssOut
std::stringstream _ssOut
Definition:
ms35.h:39
MS35::buffer
char buffer[PACKAGE_SIZE]
Definition:
ms35.h:41
MS35::PACKAGE_SIZE
static const int PACKAGE_SIZE
Definition:
ms35.h:40
MS35::getChecksum
unsigned short int getChecksum(const char *data, size_t len)
Definition:
ms35.cpp:63
MS35::MS35
MS35(SerialIO *serialIO)
Definition:
ms35.cpp:24
MS35::setColorMulti
void setColorMulti(std::vector< color::rgba > &colors)
Definition:
ms35.cpp:85
cob_light
Author(s): Benjamin Maidel
autogenerated on Wed Nov 8 2023 03:47:37