Main Page
Modules
Namespaces
Classes
Files
File List
File Members
common
comm
comm_device.h
Go to the documentation of this file.
1
//
2
// The MIT License (MIT)
3
//
4
// Copyright (c) 2019 Livox. All rights reserved.
5
//
6
// Permission is hereby granted, free of charge, to any person obtaining a copy
7
// of this software and associated documentation files (the "Software"), to deal
8
// in the Software without restriction, including without limitation the rights
9
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
// copies of the Software, and to permit persons to whom the Software is
11
// furnished to do so, subject to the following conditions:
12
//
13
// The above copyright notice and this permission notice shall be included in
14
// all copies or substantial portions of the Software.
15
//
16
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
// SOFTWARE.
23
//
24
25
#ifndef COMM_COMM_DEVICE_H_
26
#define COMM_COMM_DEVICE_H_
27
28
#include <
stdint.h
>
29
30
namespace
livox_ros
{
31
32
const
uint32_t
kDevNameLengthMax
= 256;
33
35
enum
CommDeviceType
{
36
kCommDevUart
,
37
kCommDevUsb
,
38
kCommDevCan
,
39
kCommDevEthernet
,
40
kCommDevUndef
41
};
42
44
struct
CommDevUartConfig
{
45
uint8_t
baudrate
;
46
uint8_t
parity
;
47
};
48
50
struct
CommDevUsbConfig
{
51
void
*
data
;
52
};
53
55
struct
CommDevCanConfig
{
56
void
*
data
;
57
};
58
60
typedef
struct
{
61
uint8_t
type
;
62
char
name[
kDevNameLengthMax
];
63
union
{
64
CommDevUartConfig
uart
;
65
CommDevUsbConfig
usb
;
66
CommDevCanConfig
can
;
67
} config;
68
}
CommDevConfig
;
69
70
}
// namespace livox_ros
71
#endif // COMM_COMM_DEVICE_H_
livox_ros::CommDevConfig::can
CommDevCanConfig can
Definition:
comm_device.h:66
livox_ros::CommDevConfig::type
uint8_t type
Definition:
comm_device.h:61
livox_ros::CommDevConfig::usb
CommDevUsbConfig usb
Definition:
comm_device.h:65
livox_ros::kCommDevCan
Definition:
comm_device.h:38
livox_ros::kCommDevUsb
Definition:
comm_device.h:37
livox_ros::kCommDevEthernet
Definition:
comm_device.h:39
livox_ros::kCommDevUart
Definition:
comm_device.h:36
livox_ros::CommDevConfig::uart
CommDevUartConfig uart
Definition:
comm_device.h:64
livox_ros::CommDevUartConfig
Definition:
comm_device.h:44
livox_ros
Definition:
comm_device.h:30
uint8_t
unsigned char uint8_t
Definition:
stdint.h:125
livox_ros::CommDevCanConfig::data
void * data
Definition:
comm_device.h:56
livox_ros::CommDevUsbConfig::data
void * data
Definition:
comm_device.h:51
livox_ros::kCommDevUndef
Definition:
comm_device.h:40
livox_ros::CommDevCanConfig
Definition:
comm_device.h:55
uint32_t
unsigned int uint32_t
Definition:
stdint.h:127
livox_ros::CommDevUartConfig::baudrate
uint8_t baudrate
Definition:
comm_device.h:45
livox_ros::CommDeviceType
CommDeviceType
Definition:
comm_device.h:35
livox_ros::kDevNameLengthMax
const uint32_t kDevNameLengthMax
Definition:
comm_device.h:32
livox_ros::CommDevUsbConfig
Definition:
comm_device.h:50
livox_ros::CommDevUartConfig::parity
uint8_t parity
Definition:
comm_device.h:46
stdint.h
livox_ros::CommDevConfig
Definition:
comm_device.h:60
livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:45