RadioShuttle Lib for the STM32 L4 Heltec Board
Dependents: Turtle_RadioShuttle
RadioStatusInterface.h@0:0c31756924a2, 2019-02-06 (annotated)
- Committer:
- Helmut64
- Date:
- Wed Feb 06 15:26:48 2019 +0000
- Revision:
- 0:0c31756924a2
new lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Helmut64 | 0:0c31756924a2 | 1 | /* |
Helmut64 | 0:0c31756924a2 | 2 | * The file is licensed under the Apache License, Version 2.0 |
Helmut64 | 0:0c31756924a2 | 3 | * (c) 2019 Helmut Tschemernjak |
Helmut64 | 0:0c31756924a2 | 4 | * 30826 Garbsen (Hannover) Germany |
Helmut64 | 0:0c31756924a2 | 5 | */ |
Helmut64 | 0:0c31756924a2 | 6 | |
Helmut64 | 0:0c31756924a2 | 7 | |
Helmut64 | 0:0c31756924a2 | 8 | |
Helmut64 | 0:0c31756924a2 | 9 | class RadioStatusInterface { |
Helmut64 | 0:0c31756924a2 | 10 | public: |
Helmut64 | 0:0c31756924a2 | 11 | virtual ~RadioStatusInterface() { } |
Helmut64 | 0:0c31756924a2 | 12 | /* |
Helmut64 | 0:0c31756924a2 | 13 | * Signaling that a radio message send has been initiated |
Helmut64 | 0:0c31756924a2 | 14 | */ |
Helmut64 | 0:0c31756924a2 | 15 | virtual void TXStart(int AppID, int toStation, int length, int dBm) = 0; |
Helmut64 | 0:0c31756924a2 | 16 | /* |
Helmut64 | 0:0c31756924a2 | 17 | * Signaling that a radio message send has been completed |
Helmut64 | 0:0c31756924a2 | 18 | */ |
Helmut64 | 0:0c31756924a2 | 19 | virtual void TXComplete(void) = 0; |
Helmut64 | 0:0c31756924a2 | 20 | /* |
Helmut64 | 0:0c31756924a2 | 21 | * Signaling that a radio message input has been received |
Helmut64 | 0:0c31756924a2 | 22 | * and queued for later processing |
Helmut64 | 0:0c31756924a2 | 23 | */ |
Helmut64 | 0:0c31756924a2 | 24 | virtual void RxDone(int size, int rssi, int snr) = 0; |
Helmut64 | 0:0c31756924a2 | 25 | /* |
Helmut64 | 0:0c31756924a2 | 26 | * Signaling that a radio message protocol processing has been completed |
Helmut64 | 0:0c31756924a2 | 27 | */ |
Helmut64 | 0:0c31756924a2 | 28 | virtual void RxCompleted(void) = 0; |
Helmut64 | 0:0c31756924a2 | 29 | /* |
Helmut64 | 0:0c31756924a2 | 30 | * Signaling that a higher-level message received a timeout |
Helmut64 | 0:0c31756924a2 | 31 | * after the specified retry period |
Helmut64 | 0:0c31756924a2 | 32 | */ |
Helmut64 | 0:0c31756924a2 | 33 | virtual void MessageTimeout(int AppID, int toStation) = 0; |
Helmut64 | 0:0c31756924a2 | 34 | |
Helmut64 | 0:0c31756924a2 | 35 | void SetStationID(int stationID) { _stationID = stationID; }; |
Helmut64 | 0:0c31756924a2 | 36 | |
Helmut64 | 0:0c31756924a2 | 37 | void SetRadioType(const char *radioType) { _radioType = radioType; }; |
Helmut64 | 0:0c31756924a2 | 38 | |
Helmut64 | 0:0c31756924a2 | 39 | void SetRadioParams(int frequency, int spreadingFactor) { |
Helmut64 | 0:0c31756924a2 | 40 | _frequency = frequency; _spreadingFactor = spreadingFactor; }; |
Helmut64 | 0:0c31756924a2 | 41 | |
Helmut64 | 0:0c31756924a2 | 42 | int _frequency; /* automaticlally set on RadioShuttle::Startup */ |
Helmut64 | 0:0c31756924a2 | 43 | int _spreadingFactor; /* automaticlally set on RadioShuttle::Startup */ |
Helmut64 | 0:0c31756924a2 | 44 | int _stationID; /* automaticlally set */ |
Helmut64 | 0:0c31756924a2 | 45 | const char *_radioType; /* automaticlally set */ |
Helmut64 | 0:0c31756924a2 | 46 | }; |