Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::Transceiver Class Referenceabstract

#include <Transceiver.h>

Inheritance diagram for Boardcore::Transceiver:

Public Member Functions

 Transceiver ()
 
virtual ~Transceiver ()
 
virtual bool send (uint8_t *packet, size_t packetLength)=0
 Send a packet.
 
virtual ssize_t receive (uint8_t *packet, size_t packetLength)=0
 Wait until a new packet is received.
 

Detailed Description

Definition at line 31 of file Transceiver.h.

Constructor & Destructor Documentation

◆ Transceiver()

Boardcore::Transceiver::Transceiver ( )
inline

Definition at line 34 of file Transceiver.h.

◆ ~Transceiver()

virtual Boardcore::Transceiver::~Transceiver ( )
inlinevirtual

Definition at line 36 of file Transceiver.h.

Member Function Documentation

◆ receive()

virtual ssize_t Boardcore::Transceiver::receive ( uint8_t * packet,
size_t packetLength )
pure virtual

Wait until a new packet is received.

Parameters
packetBuffer to store the packet (at least packetLength bytes).
packetLengthMaximum length of the received data.
Returns
Size of the data received or -1 if failure

Implemented in Boardcore::Xbee::Xbee, Boardcore::SerialTransceiver, Boardcore::ConsoleTransceiver, Boardcore::UdpTransceiver, Boardcore::SX1278Fsk, Boardcore::SX1278Lora, and Boardcore::Gamma868.

◆ send()

virtual bool Boardcore::Transceiver::send ( uint8_t * packet,
size_t packetLength )
pure virtual

Send a packet.

The function must block the thread until the packet is sent (successfully or not).

Parameters
packetPointer to the packet (at least packetLength bytes).
packetLengthLength of the packet to be sent.
Returns
True if the message was sent correctly.

Implemented in Boardcore::SerialTransceiver, Boardcore::ConsoleTransceiver, Boardcore::UdpTransceiver, Boardcore::SX1278Fsk, Boardcore::SX1278Lora, Boardcore::Gamma868, and Boardcore::Xbee::Xbee.


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