socketcan.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016-2018 UAVCAN Team
3  *
4  * Distributed under the MIT License, available in the file LICENSE.
5  *
6  */
7 
8 #ifndef SOCKETCAN_H
9 #define SOCKETCAN_H
10 
11 #include <canard.h>
12 
13 #ifdef __cplusplus
14 extern "C"
15 {
16 #endif
17 
18 typedef struct
19 {
20  int fd;
22 
27 int16_t socketcanInit(SocketCANInstance* out_ins, const char* can_iface_name);
28 
34 
40 int16_t socketcanTransmit(SocketCANInstance* ins, const CanardCANFrame* frame, int32_t timeout_msec);
41 
47 int16_t socketcanReceive(SocketCANInstance* ins, CanardCANFrame* out_frame, int32_t timeout_msec);
48 
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif
socketcanTransmit
int16_t socketcanTransmit(SocketCANInstance *ins, const CanardCANFrame *frame, int32_t timeout_msec)
Definition: socketcan.c:96
socketcanGetSocketFileDescriptor
int socketcanGetSocketFileDescriptor(const SocketCANInstance *ins)
Definition: socketcan.c:180
socketcanReceive
int16_t socketcanReceive(SocketCANInstance *ins, CanardCANFrame *out_frame, int32_t timeout_msec)
Definition: socketcan.c:136
uavcan::int16_t
std::int16_t int16_t
Definition: std.hpp:30
uavcan::int32_t
std::int32_t int32_t
Definition: std.hpp:31
socketcanInit
int16_t socketcanInit(SocketCANInstance *out_ins, const char *can_iface_name)
Definition: socketcan.c:45
SocketCANInstance::fd
int fd
Definition: socketcan.h:20
frame
uavcan::CanFrame frame
Definition: can.cpp:78
socketcanClose
int16_t socketcanClose(SocketCANInstance *ins)
Definition: socketcan.c:89
SocketCANInstance
Definition: socketcan.h:18


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:03