AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
can_hardware_plugin.hpp
Go to the documentation of this file.
1//================================================================================================
8//================================================================================================
9#ifndef CAN_HARDEWARE_PLUGIN_HPP
10#define CAN_HARDEWARE_PLUGIN_HPP
11
13
14namespace isobus
15{
16 //================================================================================================
20 //================================================================================================
22 {
23 public:
28 virtual bool get_is_valid() const = 0;
29
31 virtual void close() = 0;
32
35 virtual void open() = 0;
36
40 virtual bool read_frame(isobus::CANMessageFrame &canFrame) = 0;
41
45 virtual bool write_frame(const isobus::CANMessageFrame &canFrame) = 0;
46 };
47}
48#endif // CAN_HARDEWARE_PLUGIN_HPP
A classical CAN frame, with 8 data bytes.
An abstract base class for a CAN driver.
virtual void open()=0
Connects the driver to the hardware. This will be called to initialize the driver and connect it to t...
virtual bool write_frame(const isobus::CANMessageFrame &canFrame)=0
Writes a frame to the bus (synchronous)
virtual void close()=0
Disconnects the driver from the hardware.
virtual bool get_is_valid() const =0
Returns if the driver is ready and in a good state.
virtual bool read_frame(isobus::CANMessageFrame &canFrame)=0
Reads one frame from the bus synchronously.
A CAN frame for interfacing with a hardware layer, like socket CAN or other interface.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...