# RadioLib: APRSClient Class Reference

APRSClient Class Reference

Client for APRS communication. More...

`#include <APRS.h>`

## Public Member Functions

| APRSClient (AX25Client *ax)
| Constructor for "classic" mode using AX.25/AFSK. More...
| APRSClient (PhysicalLayer *phy)
| Constructor for LoRa mode. More...
int16_t | begin (char sym, char *callsign=NULL, uint8_t ssid=0, bool alt=false)
| Initialization method. More...
int16_t | sendPosition (char *destCallsign, uint8_t destSSID, char *lat, char *lon, char *msg=NULL, char *time=NULL)
| Transmit position. More...
int16_t | sendMicE (float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, uint8_t *telem=NULL, size_t telemLen=0, char *grid=NULL, char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED)
| Transmit position using Mic-E encoding. More...
int16_t | sendFrame (char *destCallsign, uint8_t destSSID, char *info)
| Transmit generic APRS frame. More...

## Detailed Description

Client for APRS communication.

## Constructor & Destructor Documentation

## APRSClient() [1/2]

APRSClient::APRSClient | ( | AX25Client * | ax | ) |

explicit

Constructor for "classic" mode using AX.25/AFSK.

Parameters

  ax | Pointer to the instance of AX25Client to be used for APRS.

## APRSClient() [2/2]

APRSClient::APRSClient | ( | PhysicalLayer * | phy | ) |

explicit

Constructor for LoRa mode.

Parameters

  phy | Pointer to the wireless module providing PhysicalLayer communication.

## Member Function Documentation

## begin()

int16_t APRSClient::begin | ( | char | sym,
|  | char * | callsign = `NULL`,
|  | uint8_t | ssid = `0`,
|  | bool | alt = `false`
| ) |  |

Initialization method.

Parameters

  sym | APRS symbol to be displayed.
  callsign | Source callsign. Required and only used for APRS over LoRa, ignored in classic mode.
  ssid | Source SSID. Only used for APRS over LoRa, ignored in classic mode, defaults to 0.
  alt | Whether to use the primary (false) or alternate (true) symbol table. Defaults to primary table.

Returns
  Status Codes

## sendFrame()

int16_t APRSClient::sendFrame | ( | char * | destCallsign,
|  | uint8_t | destSSID,
|  | char * | info
| ) |  |

Transmit generic APRS frame.

Parameters

  destCallsign | Destination station callsign.
  destSSID | Destination station SSID.
  info | AX.25 info field contents.

Returns
  Status Codes

## sendMicE()

int16_t APRSClient::sendMicE | ( | float | lat,
|  | float | lon,
|  | uint16_t | heading,
|  | uint16_t | speed,
|  | uint8_t | type,
|  | uint8_t * | telem = `NULL`,
|  | size_t | telemLen = `0`,
|  | char * | grid = `NULL`,
|  | char * | status = `NULL`,
|  | int32_t | alt = `RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED`
| ) |  |

Transmit position using Mic-E encoding.

Parameters

  lat | Geographical latitude, positive for north, negative for south.
  lon | Geographical longitude, positive for east, negative for west.
  heading | Heading in degrees.
  speed | Speed in knots.
  type | Mic-E message type - see Mic-E message types..
  telem | Pointer to telemetry array (either 2 or 5 bytes long). NULL when telemetry is not used.
  telemLen | Telemetry length, 2 or 5. 0 when telemetry is not used.
  grid | Maidenhead grid locator. NULL when not used.
  status | Status message to send. NULL when not used.
  alt | Altitude to send. RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED when not used.

## sendPosition()

int16_t APRSClient::sendPosition | ( | char * | destCallsign,
|  | uint8_t | destSSID,
|  | char * | lat,
|  | char * | lon,
|  | char * | msg = `NULL`,
|  | char * | time = `NULL`
| ) |  |

Transmit position.

Parameters

  destCallsign | Destination station callsign.
  destSSID | Destination station SSID.
  lat | Latitude as a null-terminated string.
  lon | Longitude as a null-terminated string.
  msg | Message to be transmitted. Defaults to NULL (no message).
  time | Position timestamp. Defaults to NULL (no timestamp).

Returns
  Status Codes

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

- src/protocols/APRS/APRS.h
- src/protocols/APRS/APRS.cpp