|
AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
A Windows CAN Driver for SYS TEC electronic AG USB CAN modules. More...
#include <sys_tec_windows_plugin.hpp>
Public Member Functions | |
| SysTecWindowsPlugin (std::uint8_t channel=USBCAN_CHANNEL_CH0, std::uint32_t baudrate=USBCAN_BAUD_250kBit) | |
| Constructor for the Windows SYS TEC plugin. | |
| SysTecWindowsPlugin (std::uint32_t serialNumber, std::uint32_t baudrate=USBCAN_BAUD_250kBit) | |
| Constructor for the Windows SYS TEC plugin. | |
| virtual | ~SysTecWindowsPlugin () |
| The destructor for PCANBasicWindowsPlugin. | |
| bool | get_is_valid () const override |
| Returns if the connection with the hardware is valid. | |
| void | close () override |
| Closes the connection to the hardware. | |
| void | open () override |
| Connects to the hardware you specified in the constructor's channel argument. | |
| bool | read_frame (isobus::CANMessageFrame &canFrame) override |
Returns a frame from the hardware (synchronous), or false if no frame can be read. | |
| bool | write_frame (const isobus::CANMessageFrame &canFrame) override |
| Writes a frame to the bus (synchronous) | |
Private Attributes | |
| std::uint32_t | serialNumber = 0 |
| The serial number to connect to, or 0 if not used. | |
| std::uint16_t | baudrateConstant = USBCAN_BAUD_250kBit |
| The constant used to configure the adapter's baudrate. | |
| std::uint8_t | channelIndex = 0 |
| The channel for the device, used if you have a multi-channel device. | |
| std::uint8_t | handle = USBCAN_INVALID_HANDLE |
| The handle for the device, used to interact with the DLL. | |
| bool | openResult = false |
| Stores the result of the call to begin CAN communication. Used for is_valid check later. | |
A Windows CAN Driver for SYS TEC electronic AG USB CAN modules.
Definition at line 28 of file sys_tec_windows_plugin.hpp.
| isobus::SysTecWindowsPlugin::SysTecWindowsPlugin | ( | std::uint8_t | channel = USBCAN_CHANNEL_CH0, |
| std::uint32_t | baudrate = USBCAN_BAUD_250kBit ) |
Constructor for the Windows SYS TEC plugin.
| [in] | channel | The channel to use. See definitions in USBCAN32.h, such as USBCAN_CHANNEL_CH0 |
| [in] | baudrate | The baudrate to use when connecting to the bus, typically 250k |
Definition at line 17 of file sys_tec_windows_plugin.cpp.
| isobus::SysTecWindowsPlugin::SysTecWindowsPlugin | ( | std::uint32_t | serialNumber, |
| std::uint32_t | baudrate = USBCAN_BAUD_250kBit ) |
Constructor for the Windows SYS TEC plugin.
| [in] | serialNumber | The serial number of the device to connect to |
| [in] | baudrate | The baudrate to use when connecting to the bus, typically 250k |
Definition at line 27 of file sys_tec_windows_plugin.cpp.
|
virtual |
The destructor for PCANBasicWindowsPlugin.
Definition at line 33 of file sys_tec_windows_plugin.cpp.
|
overridevirtual |
Closes the connection to the hardware.
Implements isobus::CANHardwarePlugin.
Definition at line 43 of file sys_tec_windows_plugin.cpp.
|
overridevirtual |
Returns if the connection with the hardware is valid.
true if connected, false if not connected Implements isobus::CANHardwarePlugin.
Definition at line 38 of file sys_tec_windows_plugin.cpp.
|
overridevirtual |
Connects to the hardware you specified in the constructor's channel argument.
Implements isobus::CANHardwarePlugin.
Definition at line 54 of file sys_tec_windows_plugin.cpp.
|
overridevirtual |
Returns a frame from the hardware (synchronous), or false if no frame can be read.
| [in,out] | canFrame | The CAN frame that was read |
true if a CAN frame was read, otherwise false Implements isobus::CANHardwarePlugin.
Definition at line 102 of file sys_tec_windows_plugin.cpp.
|
overridevirtual |
Writes a frame to the bus (synchronous)
| [in] | canFrame | The frame to write to the bus |
true if the frame was written, otherwise false Implements isobus::CANHardwarePlugin.
Definition at line 136 of file sys_tec_windows_plugin.cpp.
|
private |
The constant used to configure the adapter's baudrate.
Definition at line 66 of file sys_tec_windows_plugin.hpp.
|
private |
The channel for the device, used if you have a multi-channel device.
Definition at line 67 of file sys_tec_windows_plugin.hpp.
|
private |
The handle for the device, used to interact with the DLL.
Definition at line 68 of file sys_tec_windows_plugin.hpp.
|
private |
Stores the result of the call to begin CAN communication. Used for is_valid check later.
Definition at line 69 of file sys_tec_windows_plugin.hpp.
|
private |
The serial number to connect to, or 0 if not used.
Definition at line 65 of file sys_tec_windows_plugin.hpp.