11#ifndef PCAN_BASIC_WINDOWS_PLUGIN_HPP
12#define PCAN_BASIC_WINDOWS_PLUGIN_HPP
20#include "isobus/hardware_integration/PCANBasic.h"
47 void close()
override;
An abstraction between this CAN stack and any hardware layer.
A base class for a CAN driver. Can be derived into your platform's required interface.
A classical CAN frame, with 8 data bytes.
An abstract base class for a CAN driver.
A CAN frame for interfacing with a hardware layer, like socket CAN or other interface.
A Windows CAN Driver for PEAK PCAN Devices.
TPCANStatus openResult
Stores the result of the call to begin CAN communication. Used for is_valid check later.
TPCANHandle handle
The handle as defined in the PCAN driver API.
void open() override
Connects to the hardware you specified in the constructor's channel argument.
void close() override
Closes the connection to the hardware.
bool write_frame(const isobus::CANMessageFrame &canFrame) override
Writes a frame to the bus (synchronous)
bool get_is_valid() const override
Returns if the connection with the hardware is valid.
bool read_frame(isobus::CANMessageFrame &canFrame) override
Returns a frame from the hardware (synchronous), or false if no frame can be read.
PCANBasicWindowsPlugin(WORD channel)
Constructor for the Windows version of the PEAK PCAN Basic CAN driver.
virtual ~PCANBasicWindowsPlugin()
The destructor for PCANBasicWindowsPlugin.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...