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

WiMOD_SAP_DEVMGMT_Lorawan.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32
33
34 #ifndef ARDUINO_SAP_WIMOD_SAP_DEVMGMT_LORAWAN_H_
35 #define ARDUINO_SAP_WIMOD_SAP_DEVMGMT_LORAWAN_H_
36
37
38 /*
39 * THIS IS AN EXAMPLE IMPLEMENTATION ACCORDING THE THE HCI SPEC: V2.1
40 * FOR FIRMWARE: LoRaWAN EndNode Firmware
41 *
42 * SEE FILE: WiMOD_LoRaWAN_EndNode_Firmware_HCI_Spec_V2_1.pdf for detailed information
43 *
44 */
45
46 //------------------------------------------------------------------------------
47 //
48 // Section Includes Files
49 //
50 //------------------------------------------------------------------------------
51
52 #include "WiMOD_SAP_DEVMGMT.h"
53 #include "WiMOD_SAP_DEVMGMT_Lorawan_IDs.h"
54 //------------------------------------------------------------------------------
55 //
56 // Section class
57 //
58 //------------------------------------------------------------------------------
59
63 class WiMOD_SAP_DevMgmt_Lorawan : public WiMOD_SAP_DevMgmt
64 {
65 public:
66 WiMOD_SAP_DevMgmt_Lorawan(TWiMODLRHCI* hci, UINT8* buffer, UINT16 bufferSize);
67 virtual ~WiMOD_SAP_DevMgmt_Lorawan(void);
68
69 virtual TWiMODLRResultCodes GetDeviceInfo(TWiMODLR_DevMgmt_DevInfo* info, UINT8* statusRsp);
70 virtual TWiMODLRResultCodes GetDeviceInfo(TWiMODLR_DevMgmt_DevInfoLoRaWan* info, UINT8* statusRsp);
71
72 virtual TWiMODLRResultCodes GetSystemStatus(TWiMODLR_DevMgmt_SystemStatus* info, UINT8* statusRsp);
73 virtual TWiMODLRResultCodes GetSystemStatus(TWiMODLR_DevMgmt_SystemStatusLorawan* info, UINT8* statusRsp);
74
75
76 virtual TWiMODLRResultCodes GetRadioConfig(TWiMODLR_DevMgmt_RadioConfig* radioCfg, UINT8* statusRsp);
77 virtual TWiMODLRResultCodes SetRadioConfig(const TWiMODLR_DevMgmt_RadioConfig* radioCfg, UINT8* statusRsp);
78 virtual TWiMODLRResultCodes ResetRadioConfig(UINT8* statusRsp);
79 virtual TWiMODLRResultCodes SetRadioMode(const TRadioCfg_RadioMode radioMode, UINT8* statusRsp);
80 virtual TWiMODLRResultCodes SetAesKey(const UINT8* key, UINT8* statusRsp);
81 virtual TWiMODLRResultCodes GetAesKey(UINT8* key, UINT8* statusRsp);
82
83
84 // virtual TWiMODLRResultCodes GetRadioConfig(TWiMODLR_DevMgmt_RadioConfig* radioCfg, UINT8* statusRsp);
85 // virtual TWiMODLRResultCodes GetRadioConfig(TWiMODLR_DevMgmt_RadioConfigPlus* radioCfg, UINT8* statusRsp);
86 //
87 // virtual TWiMODLRResultCodes SetRadioConfig(const TWiMODLR_DevMgmt_RadioConfig* radioCfg, UINT8* statusRsp);
88 // virtual TWiMODLRResultCodes SetRadioConfig(const TWiMODLR_DevMgmt_RadioConfigPlus* radioCfg, UINT8* statusRsp, UINT8 wrgParamBM[] = NULL);
89 //
90 // virtual TWiMODLRResultCodes GetSystemStatus(TWiMODLR_DevMgmt_SystemStatus* info, UINT8* statusRsp);
91 // virtual TWiMODLRResultCodes GetSystemStatus(TWiMODLR_DevMgmt_SystemStatusPlus* info, UINT8* statusRsp);
92
93 protected:
94 virtual TWiMODLRResultCodes unsupportedCmd(UINT8* statusRsp);
95
96 private:
97 };
98
99
100
101 #endif /* ARDUINO_SAP_WIMOD_SAP_DEVMGMT_LORAWAN_H_ */
102
103
104
105
106
107
TWiMODLR_DevMgmt_SystemStatusLorawan::RxAccept
UINT32 RxAccept
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:97
TWiMODLR_DevMgmt_SystemStatusLorawan::Rx2MicError
UINT32 Rx2MicError
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:95
WiMOD_SAP_DEVMGMT_Lorawan.h
DEVMGMT_SAP_ID
#define DEVMGMT_SAP_ID
Definition: WiMOD_SAP_DEVMGMT_IDs.h:61
WiMOD_SAP_DevMgmt_Lorawan::~WiMOD_SAP_DevMgmt_Lorawan
virtual ~WiMOD_SAP_DevMgmt_Lorawan(void)
Destructor.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:74
WiMOD_SAP_DevMgmt
Implementation for the ServiceAccessPoint DeviceManagement.
Definition: WiMOD_SAP_DEVMGMT.h:109
TWiMODLR_DevMgmt_SystemStatusLorawan::TxUDataPackets
UINT32 TxUDataPackets
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:87
TWiMODLRHCI
Internal helper class for processing SLIP frames.
Definition: WiMODLRHCI.h:235
WiMODLR_RESULT_TRANMIT_ERROR
@ WiMODLR_RESULT_TRANMIT_ERROR
Definition: WiMODLRHCI.h:154
WiMOD_SAP_DevMgmt_Lorawan::ResetRadioConfig
virtual TWiMODLRResultCodes ResetRadioConfig(UINT8 *statusRsp)
ResetRadioConfig Cmd - Reset the radio config to factory defaults.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:206
TWiMODLR_DevMgmt_SystemStatusLorawan::Rx1MicError
UINT32 Rx1MicError
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:92
TWiMODLR_DevMgmt_DevInfoLoRaWan::ModuleType
UINT8 ModuleType
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:67
TWiMODLR_DevMgmt_SystemStatusLorawan::NvmStatus
UINT16 NvmStatus
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:83
TWiMODLR_DevMgmt_DevInfoLoRaWan
Structure containing basic information about the WiMOD device.
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:64
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
WiMOD_SAP_DEVMGMT.h
WiMOD_SAP_DevMgmt_Lorawan::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_DEVMGMT_Lorawan.cpp:217
TWiMODLR_DevMgmt_DevInfoLoRaWan::Status
UINT8 Status
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:66
TWiMODLR_DevMgmt_SystemStatusLorawan::BatteryStatus
UINT16 BatteryStatus
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:84
WiMOD_SAP_DevMgmt_Lorawan::GetRadioConfig
virtual TWiMODLRResultCodes GetRadioConfig(TWiMODLR_DevMgmt_RadioConfig *radioCfg, UINT8 *statusRsp)
GetRadioConfig Cmd - Get the radio settings of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:194
TWiMODLR_DevMgmt_SystemStatusLorawan::TxError
UINT32 TxError
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:89
TWiMODLR_HCIMessage::Payload
UINT8 Payload[WIMODLR_HCI_MSG_PAYLOAD_SIZE]
Definition: WiMODLRHCI.h:132
TWiMODLR_DevMgmt_SystemStatusLorawan::TxJoin
UINT32 TxJoin
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:96
WiMOD_SAP_DevMgmt_Lorawan::GetDeviceInfo
virtual TWiMODLRResultCodes GetDeviceInfo(TWiMODLR_DevMgmt_DevInfo *info, UINT8 *statusRsp)
Get Device Info - Basic Information about the WiMOD module.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:82
TWiMODLR_DevMgmt_SystemStatusLorawan::Rx2UDataPackets
UINT32 Rx2UDataPackets
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:93
TRadioCfg_RadioMode
TRadioCfg_RadioMode
general operation mode of the radio part (only for LR-BASE)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:255
WiMOD_SAP_DevMgmt_Lorawan::GetSystemStatus
virtual TWiMODLRResultCodes GetSystemStatus(TWiMODLR_DevMgmt_SystemStatus *info, UINT8 *statusRsp)
GetSystemStatus Cmd - Get basic info about the system status of WiMOD.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:120
TWiMODLR_DevMgmt_SystemStatusLorawan::Status
UINT8 Status
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:79
TWiMODLR_DevMgmt_SystemStatusLorawan::SysTickResolution
UINT8 SysTickResolution
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:80
TWiMODLR_DevMgmt_SystemStatusLorawan::TxCDataPackets
UINT32 TxCDataPackets
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:88
TWiMODLR_DevMgmt_DevInfo
Structure containing basic information about the WiMOD device.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:172
WiMOD_SAP_DevMgmt_Lorawan::SetRadioConfig
virtual TWiMODLRResultCodes SetRadioConfig(const TWiMODLR_DevMgmt_RadioConfig *radioCfg, UINT8 *statusRsp)
SetRadioConfig Cmd - Set the radio settings of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:200
WiMOD_SAP_DevMgmt_Lorawan::GetAesKey
virtual TWiMODLRResultCodes GetAesKey(UINT8 *key, UINT8 *statusRsp)
GetAesKey Cmd - Get the 128bit AES that that is used for encryption.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:223
TWiMODLR_DevMgmt_SystemStatusLorawan::Rx2CDataPackets
UINT32 Rx2CDataPackets
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:94
TWiMODLR_DevMgmt_SystemStatusLorawan::Rx1UDataPackets
UINT32 Rx1UDataPackets
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:90
TWiMODLRResultCodes
TWiMODLRResultCodes
Result codes for the local serial communication itself.
Definition: WiMODLRHCI.h:149
TWiMODLR_DevMgmt_SystemStatusLorawan::RtcTime
UINT32 RtcTime
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:82
WiMOD_SAP_DevMgmt_Lorawan::SetRadioMode
virtual TWiMODLRResultCodes SetRadioMode(const TRadioCfg_RadioMode radioMode, UINT8 *statusRsp)
SetRadioMode - Set the current radio mode of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:211
TWiMODLR_DevMgmt_DevInfoLoRaWan::DevAdr
UINT32 DevAdr
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:68
TWiMODLR_DevMgmt_SystemStatusLorawan::ExtraStatus
UINT16 ExtraStatus
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:85
TWiMODLR_DevMgmt_SystemStatusLorawan::Rx1CDataPackets
UINT32 Rx1CDataPackets
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:91
TWiMODLR_DevMgmt_SystemStatusLorawan
Basic information about system status of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:77
TWiMODLR_DevMgmt_RadioConfig
Structure containing the radio (stack) config parameters of the WiMOD (only for LR-BASE)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:406
TWiMODLR_DevMgmt_SystemStatusLorawan::SysTickCounter
UINT32 SysTickCounter
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:81
WiMOD_SAP_DevMgmt_Lorawan
Implementation for the ServiceAccessPoint DeviceManagement.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.h:63
TWiMODLR_DevMgmt_SystemStatus
Basic information about system status of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:234
WiMOD_SAP_DevMgmt_Lorawan::WiMOD_SAP_DevMgmt_Lorawan
WiMOD_SAP_DevMgmt_Lorawan(TWiMODLRHCI *hci, UINT8 *buffer, UINT16 bufferSize)
Constructor.
Definition: WiMOD_SAP_DEVMGMT_Lorawan.cpp:64
TWiMODLR_DevMgmt_DevInfoLoRaWan::DevID
UINT32 DevID
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:69