12#ifndef SOCKETCAND_WINDOWS_NETWORK_CLIENT_HPP
13#define SOCKETCAND_WINDOWS_NETWORK_CLIENT_HPP
18#include "isobus/isobus/can_frame.hpp"
61 void close()
override;
69 bool read_frame(isobus::HardwareInterfaceCANFrame &canFrame)
override;
74 bool write_frame(
const isobus::HardwareInterfaceCANFrame &canFrame)
override;
80 static constexpr std::uint32_t MAX_RECV_LENGTH = 1024;
83 sockaddr_in serverDefinition = {};
84 const std::string name;
85 const std::string targetIP;
86 std::uint16_t targetPort = 29536;
90 bool openCalled =
false;
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.
An abstract base class for a CAN driver.
A CAN Driver for using socket CAN remotely over TCP socket.
void close() override
Closes the connection.
bool write_frame(const isobus::HardwareInterfaceCANFrame &canFrame) override
Writes a frame to the bus (synchronous)
void open() override
Connects to the server.
const std::string get_connected_ip_address() const
Returns the IP that the plugin is connected to.
SocketCANdNetworkInterface(std::string deviceName)
Constructor for the socket CAN driver.
bool read_frame(isobus::HardwareInterfaceCANFrame &canFrame) override
Returns a frame from the hardware (synchronous), or false if no frame can be read.
bool get_is_valid() const override
Returns if the connection is valid.
virtual ~SocketCANdNetworkInterface()
The destructor for SocketCANdNetworkInterface.
void initialize()
Initializes some class variables.
std::string get_device_name() const
Returns the device name the driver is using.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...