# RadioLib: src/protocols/RTTY/RTTY.h Source File

RTTY.h
#if !defined(_RADIOLIB_RTTY_H)
#define _RADIOLIB_RTTY_H
#include "../../TypeDef.h"
#if !RADIOLIB_EXCLUDE_RTTY
#include "../PhysicalLayer/PhysicalLayer.h"
#include "../AFSK/AFSK.h"
#include "../Print/Print.h"
#include "../Print/ITA2String.h"
class RTTYClient: public RadioLibPrint {
public:
explicit RTTYClient(PhysicalLayer* phy);
#if !RADIOLIB_EXCLUDE_AFSK
explicit RTTYClient(AFSKClient* audio);
#endif
// basic methods
int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t enc = RADIOLIB_ASCII, uint8_t stopBits = 1);
void idle();
int16_t standby();
size_t write(uint8_t b) override;
#if !RADIOLIB_GODMODE
private:
#endif
PhysicalLayer* phyLayer;
#if !RADIOLIB_EXCLUDE_AFSK
AFSKClient* audioClient;
#endif
uint32_t baseFreq = 0, baseFreqHz = 0;
uint32_t shiftFreq = 0, shiftFreqHz = 0;
RadioLibTime_t bitDuration = 0;
uint8_t stopBitsNum = 0;
void mark();
void space();
int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
};
#endif
#endif
AFSKClient
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:16
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:135
RTTYClient
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:17
RTTYClient::write
size_t write(uint8_t b) override
Write one byte. Implementation of interface of the RadioLibPrint/Print class.
Definition: RTTY.cpp:59
RTTYClient::standby
int16_t standby()
Stops transmitting.
Definition: RTTY.cpp:115
RTTYClient::idle
void idle()
Send out idle condition (RF tone at mark frequency).
Definition: RTTY.cpp:55
RTTYClient::begin
int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t enc=RADIOLIB_ASCII, uint8_t stopBits=1)
Initialization method.
Definition: RTTY.cpp:23
RTTYClient::RTTYClient
RTTYClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: RTTY.cpp:7
RadioLibPrint
Printing class, based on Arduino Print class with additional encodings.
Definition: Print.h:17
RadioLibTime_t
unsigned long RadioLibTime_t
Type used for durations in RadioLib.
Definition: TypeDef.h:621