pfodParser 5.0.1 The pfodParser library is handles commands sent from the Android pfodApp, pfodApp supports WiFi, BLE, Bluetooth and SMS connections

pfodRadioDriver.h
Go to the documentation of this file.
1 #ifndef pfodRadioDriver_h
2 #define pfodRadioDriver_h
8 /*
9 (c)2014-2018 Forward Computing and Control Pty. Ltd.
10 NSW Australia, www.forward.com.au
11 This code is not warranted to be fit for any purpose. You may only use it at your own risk.
12 This code may be freely used for both private and commercial use
13 Provide this copyright is maintained.
14 */
15
16 class pfodRadioDriver {
17 public:
18 virtual ~pfodRadioDriver() {}
19 virtual bool init() = 0;
20 virtual int16_t lastRssi() = 0;
21 virtual int getMode() = 0;
22 virtual uint8_t getMaxMessageLength() = 0; // it is important to set this correctly
23 virtual void setThisAddress(uint8_t addr) = 0;
24 virtual bool receive(uint8_t* buf, uint8_t* len) = 0;
25 virtual bool send(const uint8_t* data, uint8_t len) = 0;
26 virtual uint8_t headerTo() = 0;
27 virtual uint8_t headerFrom() = 0;
28 virtual uint8_t headerId() = 0;
29 virtual uint8_t headerFlags() = 0;
30 virtual void setHeaderTo(uint8_t to) = 0;
31 virtual void setHeaderFrom(uint8_t from) = 0;
32 virtual void setHeaderId(uint8_t id) = 0;
33 virtual void setHeaderFlags(uint8_t flags) = 0;
34
35 typedef enum {
36 Initialising = 0,
37 Sleep,
38 Idle,
39 Tx,
40 Rx,
41 Unknown // some other mode not used by fodRadio
42 } RadioMode;
43
44 };
45
46
47 #endif // pfodRadioDriver_h
pfodRadioDriver
pfodRadioDriver for Arduino This class abstracts the low level radio functions from pfodParser.
Definition: pfodRadioDriver.h:16
pfodRadioDriver::receive
virtual bool receive(uint8_t *buf, uint8_t *len)=0
pfodRadioDriver::setHeaderFrom
virtual void setHeaderFrom(uint8_t from)=0
pfodRadioDriver::RadioMode
RadioMode
Definition: pfodRadioDriver.h:35
pfodRadioDriver::Initialising
@ Initialising
Transport is initialising. Initial default value until init() is called..
Definition: pfodRadioDriver.h:36
pfodRadioDriver::Idle
@ Idle
Transport is idle.
Definition: pfodRadioDriver.h:38
pfodRadioDriver::Sleep
@ Sleep
Transport hardware is in low power sleep mode (if supported)
Definition: pfodRadioDriver.h:37
pfodRadioDriver::Unknown
@ Unknown
Definition: pfodRadioDriver.h:41
pfodRadioDriver::Rx
@ Rx
Transport is in the process of receiving a message.
Definition: pfodRadioDriver.h:40
pfodRadioDriver::Tx
@ Tx
Transport is in the process of transmitting a message.
Definition: pfodRadioDriver.h:39
pfodRadioDriver::headerFrom
virtual uint8_t headerFrom()=0
pfodRadioDriver::init
virtual bool init()=0
pfodRadioDriver::headerFlags
virtual uint8_t headerFlags()=0
pfodRadioDriver::setHeaderTo
virtual void setHeaderTo(uint8_t to)=0
pfodRadioDriver::~pfodRadioDriver
virtual ~pfodRadioDriver()
Definition: pfodRadioDriver.h:18
pfodRadioDriver::send
virtual bool send(const uint8_t *data, uint8_t len)=0
pfodRadioDriver::setThisAddress
virtual void setThisAddress(uint8_t addr)=0
pfodRadioDriver::setHeaderId
virtual void setHeaderId(uint8_t id)=0
pfodRadioDriver::getMaxMessageLength
virtual uint8_t getMaxMessageLength()=0
pfodRadioDriver::setHeaderFlags
virtual void setHeaderFlags(uint8_t flags)=0
pfodRadioDriver::headerId
virtual uint8_t headerId()=0
pfodRadioDriver::getMode
virtual int getMode()=0
pfodRadioDriver::lastRssi
virtual int16_t lastRssi()=0
pfodRadioDriver::headerTo
virtual uint8_t headerTo()=0