1#ifndef CAN_SOCKET_IMPL_H
2#define CAN_SOCKET_IMPL_H
4#ifndef DOXYGEN_SKIP_THIS
10class can_socket_impl final :
13 can_socket_impl() =
default;
14 ~can_socket_impl() noexcept final;
17 native_handle handle() final;
19#error "Unsupported OS"
21 std::errc
open() final;
22 std::errc close() final;
24 std::errc bind(const can_adapter& adapter) final;
25 std::errc send(const can_msg_frame& frame) final;
26 receive_result receive(
28 std::chrono::milliseconds timeout = std::chrono::milliseconds::zero()) final;
29 std::errc set_nonblocking() final;
30 std::errc set_blocking() final;
31 std::errc enable_error_frames() final;
32 std::errc disable_error_frames() final;
33 bool has_receive_callback() final;
34 void clear_receive_callback() final;
35 void set_receive_callback(const can_socket_recv_callback& cb) final;
37 std::optional<can_adapter> adapter() const final;
39 select_result_can select_receive_timeout(const std::vector<can_socket>& sockets,
40 std::chrono::milliseconds timeout) const final;
44 bool _is_nonblocking = false;
45 std::optional<can_adapter> _adapter = std::nullopt;
46 can_socket_recv_callback _recv_cb;
The can_socket_interface lists the expected interface for a CAN socket implementation that can be use...
Definition can_socket_interface.h:58
int open(const std::string &path, int flags)
Wrapper implementation that deals with C++ linter (clang-tidy)
Any entities that belong to the comms library.
Definition can_adapter.h:11