RIT VEXU Core API
Loading...
Searching...
No Matches
VDP::AbstractDevice Class Referenceabstract

#include <protocol.hpp>

Public Member Functions

virtual bool send_packet (const VDP::Packet &packet)=0
 
virtual void register_receive_callback (std::function< void(const VDP::Packet &packet)> callback)=0
 
virtual ~AbstractDevice ()
 

Detailed Description

defines a generic device to trasmit packets through

Constructor & Destructor Documentation

◆ ~AbstractDevice()

VDP::AbstractDevice::~AbstractDevice ( )
virtual

deleter for the device, used to delete it when it is no longer needed

Member Function Documentation

◆ register_receive_callback()

virtual void VDP::AbstractDevice::register_receive_callback ( std::function< void(const VDP::Packet &packet)> callback)
pure virtual

a callback to function that runs when a new packet is available

Parameters
thefunction for the callback to call me when my ex-wife

◆ send_packet()

virtual bool VDP::AbstractDevice::send_packet ( const VDP::Packet & packet)
pure virtual

Sends a packet over some transmission medium It is not specified how the packet reaches the partner The transmission medium and wire format are left to the user

Parameters
packetthe packet to send through the device
Returns
whether the packet was sent sucessfully or not

The documentation for this class was generated from the following files: