simple-socket library 1.9.0
Loading...
Searching...
No Matches
CANRawSocket.h
Go to the documentation of this file.
1#ifndef NET_CANRawSocket_h__
2#define NET_CANRawSocket_h__
3
4#include "CANSocket.h"
5
6namespace NET
7{
9 class CANRawSocket : public CANSocket
10 {
11 public:
17
19 IOResult send( const ::can_frame& frame);
20
22 IOResult receive( ::can_frame& frame);
23
25 IOResult timedReceive( ::can_frame& frame, int timeout);
26
41 IOResult sendTo( const ::can_frame& frame, std::string_view interface);
42
54 IOResult receiveFrom( ::can_frame& frame, std::string& interface);
55
70 IOResult timedReceiveFrom( ::can_frame& frame, std::string& interface, int timeout);
71
78 void setReceiveFilter( const ::can_filter* filters, size_t len);
79
85 void setErrorFilter( ::can_err_mask_t filter);
86
92 void setLocalLoopback( bool enable);
93
99 void setReceiveOwnMessages( bool enable);
100 };
101
102} // namespace NET
103
104#endif // NET_CANRawSocket_h__
IOResult timedReceiveFrom(::can_frame &frame, std::string &interface, int timeout)
void setReceiveOwnMessages(bool enable)
IOResult receive(::can_frame &frame)
(overload) receive can frame from a bound socket
void setLocalLoopback(bool enable)
void setReceiveFilter(const ::can_filter *filters, size_t len)
IOResult send(const ::can_frame &frame)
(overload) send can_frame through a connected socket
IOResult sendTo(const ::can_frame &frame, std::string_view interface)
IOResult receiveFrom(::can_frame &frame, std::string &interface)
void setErrorFilter(::can_err_mask_t filter)
IOResult timedReceive(::can_frame &frame, int timeout)
(overload) receive can frame from a bound socket with timeout
CANSocket(int type, int protocol)
allows a subclass to create new socket