include
tmcl_ros
socket_can_wrapper.h
Go to the documentation of this file.
1
6
#ifndef SOCKET_CAN_WRAPPER_H
7
#define SOCKET_CAN_WRAPPER_H
8
9
class
SocketCAN
10
{
11
public
:
12
/* Constructor */
13
SocketCAN
();
14
15
/* Destructor */
16
~SocketCAN
();
17
18
/* Initialize CAN with specified interface name */
19
bool
initialize
(
const
char
*interface_name);
20
21
/* De-initialize CAN */
22
void
deinitialize
();
23
24
/* Check if CAN frames are available */
25
bool
framesAvailable
();
26
27
/* Rx CAN frames */
28
bool
readFrame
(uint32_t *
id
, uint8_t *data, uint8_t *size);
29
30
/* Tx CAN frames */
31
bool
writeFrame
(uint32_t
id
, uint8_t *data, uint8_t size);
32
33
private
:
34
int
can_socket_
;
35
std::string
interface_name_
;
36
};
37
38
#endif // SOCKET_CAN_WRAPPER_H
SocketCAN::initialize
bool initialize(const char *interface_name)
Definition:
socket_can_wrapper.cpp:31
SocketCAN::framesAvailable
bool framesAvailable()
Definition:
socket_can_wrapper.cpp:127
SocketCAN
Definition:
socket_can_wrapper.h:9
SocketCAN::deinitialize
void deinitialize()
Definition:
socket_can_wrapper.cpp:109
SocketCAN::can_socket_
int can_socket_
Definition:
socket_can_wrapper.h:34
SocketCAN::interface_name_
std::string interface_name_
Definition:
socket_can_wrapper.h:35
SocketCAN::writeFrame
bool writeFrame(uint32_t id, uint8_t *data, uint8_t size)
Definition:
socket_can_wrapper.cpp:196
SocketCAN::SocketCAN
SocketCAN()
Definition:
socket_can_wrapper.cpp:18
SocketCAN::readFrame
bool readFrame(uint32_t *id, uint8_t *data, uint8_t *size)
Definition:
socket_can_wrapper.cpp:162
SocketCAN::~SocketCAN
~SocketCAN()
Definition:
socket_can_wrapper.cpp:26
adi_tmcl
Author(s):
autogenerated on Wed Apr 2 2025 02:43:01