RadioLib
Universal wireless communication library for Arduino
AX25Frame Class Reference

Abstraction of AX.25 frame format. More...

#include <AX25.h>

Public Member Functions

 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control)
 Overloaded constructor, for frames without info field. More...
 
 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, const char *info)
 Overloaded constructor, for frames with C-string info field. More...
 
 AX25Frame (const char *destCallsign, uint8_t destSSID, const char *srcCallsign, uint8_t srcSSID, uint8_t control, uint8_t protocolID, uint8_t *info, uint16_t infoLen)
 Default constructor. More...
 
 AX25Frame (const AX25Frame &frame)
 Copy constructor. More...
 
 ~AX25Frame ()
 Default destructor.
 
AX25Frameoperator= (const AX25Frame &frame)
 Overload for assignment operator. More...
 
int16_t setRepeaters (char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
 Method to set the repeater callsigns and SSIDs. More...
 
void setRecvSequence (uint8_t seqNumber)
 Method to set receive sequence number. More...
 
void setSendSequence (uint8_t seqNumber)
 Method to set send sequence number. More...
 

Public Attributes

char destCallsign [RADIOLIB_AX25_MAX_CALLSIGN_LEN+1]
 Callsign of the destination station.
 
uint8_t destSSID
 SSID of the destination station.
 
char srcCallsign [RADIOLIB_AX25_MAX_CALLSIGN_LEN+1]
 Callsign of the source station.
 
uint8_t srcSSID
 SSID of the source station.
 
uint8_t numRepeaters
 Number of repeaters to be used.
 
uint8_t control
 The control field.
 
uint8_t protocolID
 The protocol identifier (PID) field.
 
uint16_t infoLen
 Number of bytes in the information field.
 
uint8_t rcvSeqNumber
 Receive sequence number.
 
uint16_t sendSeqNumber
 Send sequence number.
 
uint8_t * info
 The info field.
 
char ** repeaterCallsigns
 Array of repeater callsigns.
 
uint8_t * repeaterSSIDs
 Array of repeater SSIDs.
 

Detailed Description

Abstraction of AX.25 frame format.

Constructor & Destructor Documentation

◆ AX25Frame() [1/4]

AX25Frame::AX25Frame ( const char *  destCallsign,
uint8_t  destSSID,
const char *  srcCallsign,
uint8_t  srcSSID,
uint8_t  control 
)

Overloaded constructor, for frames without info field.

Parameters
destCallsignCallsign of the destination station.
destSSIDSSID of the destination station.
srcCallsignCallsign of the source station.
srcSSIDSSID of the source station.
controlThe control field.

◆ AX25Frame() [2/4]

AX25Frame::AX25Frame ( const char *  destCallsign,
uint8_t  destSSID,
const char *  srcCallsign,
uint8_t  srcSSID,
uint8_t  control,
uint8_t  protocolID,
const char *  info 
)

Overloaded constructor, for frames with C-string info field.

Parameters
destCallsignCallsign of the destination station.
destSSIDSSID of the destination station.
srcCallsignCallsign of the source station.
srcSSIDSSID of the source station.
controlThe control field.
protocolIDThe protocol identifier (PID) field. Set to zero if the frame doesn't have this field.
infoInformation field, in the form of null-terminated C-string.

◆ AX25Frame() [3/4]

AX25Frame::AX25Frame ( const char *  destCallsign,
uint8_t  destSSID,
const char *  srcCallsign,
uint8_t  srcSSID,
uint8_t  control,
uint8_t  protocolID,
uint8_t *  info,
uint16_t  infoLen 
)

Default constructor.

Parameters
destCallsignCallsign of the destination station.
destSSIDSSID of the destination station.
srcCallsignCallsign of the source station.
srcSSIDSSID of the source station.
controlThe control field.
protocolIDThe protocol identifier (PID) field. Set to zero if the frame doesn't have this field.
infoInformation field, in the form of arbitrary binary buffer.
infoLenNumber of bytes in the information field.

◆ AX25Frame() [4/4]

AX25Frame::AX25Frame ( const AX25Frame frame)

Copy constructor.

Parameters
frameAX25Frame instance to copy.

Member Function Documentation

◆ operator=()

AX25Frame & AX25Frame::operator= ( const AX25Frame frame)

Overload for assignment operator.

Parameters
framervalue AX25Frame.

◆ setRecvSequence()

void AX25Frame::setRecvSequence ( uint8_t  seqNumber)

Method to set receive sequence number.

Parameters
seqNumberSequence number to set, 0 to 7.

◆ setRepeaters()

int16_t AX25Frame::setRepeaters ( char **  repeaterCallsigns,
uint8_t *  repeaterSSIDs,
uint8_t  numRepeaters 
)

Method to set the repeater callsigns and SSIDs.

Parameters
repeaterCallsignsArray of repeater callsigns in the form of null-terminated C-strings.
repeaterSSIDsArray of repeater SSIDs.
numRepeatersNumber of repeaters, maximum is 8.
Returns
Status Codes

◆ setSendSequence()

void AX25Frame::setSendSequence ( uint8_t  seqNumber)

Method to set send sequence number.

Parameters
seqNumberSequence number to set, 0 to 7.

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