| Demo HCI Implementation for WiMOD-LR Devices V2.0.3

WiMOD_SAP_RadioLink_ProLink.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32
33
34 /*
35 * THIS IS AN EXAMPLE IMPLEMENTATION ACCORDING THE THE HCI SPEC: V1.3
36 * FOR FIRMWARE: LoRaWAN PROLINK
37 *
38 * SEE FILE: ProLink_LoRaWAN_EndNode_Modem_HCI_Spec_v1_3.pdf for detailed information
39 */
40
41
42
43 #ifndef ARDUINO_SAP_WIMOD_SAP_RADIOLINK_PROLINK_H_
44 #define ARDUINO_SAP_WIMOD_SAP_RADIOLINK_PROLINK_H_
45
46 //------------------------------------------------------------------------------
47 //
48 // Section Includes Files
49 //
50 //------------------------------------------------------------------------------
51
52 #include "WiMOD_SAP_RadioLink_ProLink_IDs.h"
53 #include "WiMOD_SAP_RadioLink.h"
54
55 //------------------------------------------------------------------------------
56 //
57 // Section class
58 //
59 //------------------------------------------------------------------------------
60
61
65 class WiMOD_SAP_RadioLink_ProLink : public WiMOD_SAP_RadioLink {
66 public:
67 WiMOD_SAP_RadioLink_ProLink(TWiMODLRHCI* hci, UINT8* buffer, UINT16 bufferSize);
68 virtual ~WiMOD_SAP_RadioLink_ProLink(void);
69
70 /* currently not supported */
71 virtual TWiMODLRResultCodes SendCData(const TWiMODLR_RadioLink_Msg* txMsg, UINT8* statusRsp);
72 virtual bool convert(TWiMODLR_HCIMessage& RxMsg, TWiMODLR_RadioLink_CdataInd* cDataTxInfo);
73 virtual bool convert(TWiMODLR_HCIMessage& RxMsg, TWiMODLR_AckTxInd_Msg* txAckIndInfo);
74
75 virtual bool convert(TWiMODLR_HCIMessage& RxMsg, TWiMODLR_RadioLink_Msg* radioLinkMsg) { return WiMOD_SAP_RadioLink::convert(RxMsg, radioLinkMsg); };
76 virtual bool convert(TWiMODLR_HCIMessage& RxMsg, TWiMODLR_RadioLink_UdataInd* uDataTxInfo) { return WiMOD_SAP_RadioLink::convert(RxMsg, uDataTxInfo); };
77
78 virtual TWiMODLRResultCodes SetAckData(const TWiMODLR_RadioLink_Msg* txMsg, UINT8* statusRsp);
79
80
81 /* currently not supported */
82 // virtual void RegisterRawDataRxClient(TRadioLinkRawDataRxIndicationCallback cb);
83 // virtual void RegisterCDataRxClient(TRadioLinkCDataRxIndicationCallback cb);
84 // virtual void RegisterCDataTxClient(TRadioLinkCDataTxIndicationCallback cb);
85 // virtual void RegisterAckRxClient(TRadioLinkAckRxIndicationCallback cb);
86 // virtual void RegisterAckRxTimeoutClient(TRadioLinkAckRxTimeoutIndicationCallback cb);
87 // virtual void RegisterAckTxCallback(TRadioLinkAckTxIndicationCallback cb);
88
89 virtual TWiMODLRResultCodes SetAesKey(const UINT8* key, UINT8* statusRsp);
90 virtual TWiMODLRResultCodes GetAesKey(UINT8* key, UINT8* statusRsp);
91
92 virtual TWiMODLRResultCodes GetRadioConfig(TWiMODLR_ProLinkRadioLink_RadioConfig* radioCfg, UINT8* statusRsp);
93 virtual TWiMODLRResultCodes SetRadioConfig(const TWiMODLR_ProLinkRadioLink_RadioConfig* radioCfg, UINT8* statusRsp);
94 virtual TWiMODLRResultCodes ResetRadioConfig(UINT8* statusRsp);
95
96 virtual void DispatchRadioLinkProLinkMessage(TWiMODLR_HCIMessage& rxMsg);
97
98 protected:
99 virtual TWiMODLRResultCodes unsupportedCmd(UINT8* statusRsp);
100
101 };
102
103
104 #endif /* ARDUINO_SAP_WIMOD_SAP_RADIOLINK_PROLINK_H_ */
TRadioCfg_ModulationProLink
TRadioCfg_ModulationProLink
Modulation technique supported by the WiMOD only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:116
TWiMODLR_ProLinkRadioLink_RadioConfig::RadioMode
TRadioCfg_RadioModeProLink RadioMode
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:234
TWiMODLR_ProLinkRadioLink_RadioConfig::DeviceAddress
UINT16 DeviceAddress
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:237
WiMOD_SAP_RadioLink_ProLink_IDs.h
WiMOD_SAP_RadioLink_ProLink::convert
virtual bool convert(TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_Msg *radioLinkMsg)
Convert a received low level HCI-Msg to a high-level RadioLink-Msg.
Definition: WiMOD_SAP_RadioLink_ProLink.h:75
TRadioCfg_FskDatarateProLink
TRadioCfg_FskDatarateProLink
Settings for the FSK data rate only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:216
TWiMODLR_ProLinkRadioLink_RadioConfig::FskDatarate
TRadioCfg_FskDatarateProLink FskDatarate
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:252
TWiMODLRHCI
Internal helper class for processing SLIP frames.
Definition: WiMODLRHCI.h:235
TWiMODLR_ProLinkRadioLink_RadioConfig::RxWindowTime
UINT16 RxWindowTime
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:249
TWiMODLR_RadioLink_Msg
Structure containing a general RadioLink HCI message.
Definition: WiMOD_SAP_RadioLink_IDs.h:160
WiMODLR_RESULT_TRANMIT_ERROR
@ WiMODLR_RESULT_TRANMIT_ERROR
Definition: WiMODLRHCI.h:154
TRadioCfg_LoRaBandwidthProLink
TRadioCfg_LoRaBandwidthProLink
Bandwidth settings for the LoRa modulation only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:126
WiMOD_SAP_RadioLink_ProLink::SetRadioConfig
virtual TWiMODLRResultCodes SetRadioConfig(const TWiMODLR_ProLinkRadioLink_RadioConfig *radioCfg, UINT8 *statusRsp)
SetRadioConfig Cmd - Set the radio settings of the of the proprietary LR-BASE mode.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:197
TWiMODLR_ProLinkRadioLink_RadioConfig::StoreNwmFlag
UINT8 StoreNwmFlag
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:232
TWiMODLR_AckTxInd_Msg
Structure containing information about an acknowledgment transmission.
Definition: WiMOD_SAP_RadioLink_IDs.h:243
TRadioCfg_RxControlProLink
TRadioCfg_RxControlProLink
RX Operation modes only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:198
TWiMODLR_HCIMessage
basic low level HCI message structure used for all serial messages to/from WiMOD
Definition: WiMODLRHCI.h:120
WiMODLR_RESULT_OK
@ WiMODLR_RESULT_OK
Definition: WiMODLRHCI.h:151
TWiMODLR_ProLinkRadioLink_RadioConfig::PowerLevel
TRadioCfg_TxPowerLevelProLink PowerLevel
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:246
TWiMODLR_ProLinkRadioLink_RadioConfig::GroupAddress
UINT8 GroupAddress
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:235
WiMOD_SAP_RadioLink_ProLink::SendCData
virtual TWiMODLRResultCodes SendCData(const TWiMODLR_RadioLink_Msg *txMsg, UINT8 *statusRsp)
Tries to send transmit C-Data to peer module via RF link.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:90
TWiMODLR_ProLinkRadioLink_RadioConfig::MiscOptions
UINT8 MiscOptions
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:251
TRadioCfg_LoRaSpreadingFactorProLink
TRadioCfg_LoRaSpreadingFactorProLink
SpreadingFactors for LoRa modulation only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:136
WiMOD_SAP_RadioLink_ProLink::convert
virtual bool convert(TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_UdataInd *uDataTxInfo)
Convert a received low level HCI-Msg to a high-level UDataTx Info.
Definition: WiMOD_SAP_RadioLink_ProLink.h:76
WiMOD_SAP_RadioLink_ProLink::WiMOD_SAP_RadioLink_ProLink
WiMOD_SAP_RadioLink_ProLink(TWiMODLRHCI *hci, UINT8 *buffer, UINT16 bufferSize)
Constructor.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:75
TRadioCfg_TxPowerLevelProLink
TRadioCfg_TxPowerLevelProLink
TxPowerLevel settings only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:169
TWiMODLR_ProLinkRadioLink_RadioConfig::RfFreq_MID
UINT8 RfFreq_MID
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:241
TWiMODLR_HCIMessage::Payload
UINT8 Payload[WIMODLR_HCI_MSG_PAYLOAD_SIZE]
Definition: WiMODLRHCI.h:132
PROLINK_RADIOLINK_SAP_ID
#define PROLINK_RADIOLINK_SAP_ID
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:61
WiMOD_SAP_RadioLink_ProLink
Implementation for the ServiceAccessPoint RadioLink (LR-Base firmware only)
Definition: WiMOD_SAP_RadioLink_ProLink.h:65
WiMOD_SAP_RadioLink_ProLink::SetAckData
virtual TWiMODLRResultCodes SetAckData(const TWiMODLR_RadioLink_Msg *txMsg, UINT8 *statusRsp)
Sets additional user payload for the next ack frame to send.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:114
TWiMODLR_ProLinkRadioLink_RadioConfig::Status
UINT8 Status
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:229
WiMODLR_RESULT_PAYLOAD_PTR_ERROR
@ WiMODLR_RESULT_PAYLOAD_PTR_ERROR
Definition: WiMODLRHCI.h:153
WiMOD_SAP_RadioLink_ProLink::GetAesKey
virtual TWiMODLRResultCodes GetAesKey(UINT8 *key, UINT8 *statusRsp)
GetAesKey Cmd - Get the 128bit AES that that is used for encryption.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:316
WiMOD_SAP_RadioLink_ProLink::~WiMOD_SAP_RadioLink_ProLink
virtual ~WiMOD_SAP_RadioLink_ProLink(void)
Destructor.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:85
WiMOD_SAP_RadioLink_ProLink::SetAesKey
virtual TWiMODLRResultCodes SetAesKey(const UINT8 *key, UINT8 *statusRsp)
SetAesKey Cmd - Set the 128bit AES that is to be used for encryption.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:286
TRadioCfg_RadioModeProLink
TRadioCfg_RadioModeProLink
general operation mode of the radio part only for LR-BASE mode in ProLink
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:107
WiMOD_SAP_RadioLink.h
TWiMODLRResultCodes
TWiMODLRResultCodes
Result codes for the local serial communication itself.
Definition: WiMODLRHCI.h:149
TWiMODLR_ProLinkRadioLink_RadioConfig::LoRaSpreadingFactor
TRadioCfg_LoRaSpreadingFactorProLink LoRaSpreadingFactor
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:244
TWiMODLR_ProLinkRadioLink_RadioConfig::Modulation
TRadioCfg_ModulationProLink Modulation
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:239
WiMOD_SAP_RadioLink_ProLink::convert
virtual bool convert(TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_CdataInd *cDataTxInfo)
Convert a received low level HCI-Msg to a high-level CDataTx Info.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:98
WiMOD_SAP_RadioLink_ProLink::ResetRadioConfig
virtual TWiMODLRResultCodes ResetRadioConfig(UINT8 *statusRsp)
ResetRadioConfig Cmd - Reset the radio config of the proprietary LR-BASE mode to factory defaults.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:259
WiMOD_SAP_RadioLink_ProLink::GetRadioConfig
virtual TWiMODLRResultCodes GetRadioConfig(TWiMODLR_ProLinkRadioLink_RadioConfig *radioCfg, UINT8 *statusRsp)
GetRadioConfig Cmd - Get the radio settings of the proprietary LR-BASE mode.
Definition: WiMOD_SAP_RadioLink_ProLink.cpp:133
WiMOD_SAP_RadioLink::convert
virtual bool convert(TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_Msg *radioLinkMsg)
Convert a received low level HCI-Msg to a high-level RadioLink-Msg.
Definition: WiMOD_SAP_RadioLink.cpp:153
WiMOD_SAP_RadioLink_ProLink.h
TWiMODLR_RadioLink_UdataInd
Structure containing information about a U-Data indication (TX only)
Definition: WiMOD_SAP_RadioLink_IDs.h:232
TWiMODLR_ProLinkRadioLink_RadioConfig::RxControl
TRadioCfg_RxControlProLink RxControl
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:248
TRadioCfg_ErrorCodingProLink
TRadioCfg_ErrorCodingProLink
ErrorCoding settings (for LoRa modulation) only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:157
TWiMODLR_ProLinkRadioLink_RadioConfig::LoRaBandWidth
TRadioCfg_LoRaBandwidthProLink LoRaBandWidth
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:243
TWiMODLR_RadioLink_CdataInd
Structure containing information about a C-Data indication (TX only)
Definition: WiMOD_SAP_RadioLink_IDs.h:221
WiMOD_SAP_RadioLink
Implementation for the ServiceAccessPoint RadioLink (LR-Base firmware only)
Definition: WiMOD_SAP_RadioLink.h:151
TWiMODLR_ProLinkRadioLink_RadioConfig::RfFreq_MSB
UINT8 RfFreq_MSB
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:242
TWiMODLR_ProLinkRadioLink_RadioConfig::ErrorCoding
TRadioCfg_ErrorCodingProLink ErrorCoding
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:245
TWiMODLR_ProLinkRadioLink_RadioConfig
Structure containing the radio (stack) config parameters of the proprietary LR-BASE stack (only for P...
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:226
TWiMODLR_ProLinkRadioLink_RadioConfig::RfFreq_LSB
UINT8 RfFreq_LSB
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:240