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

Public Member Functions | List of all members
WiMOD_SAP_LoRaWAN Class Reference

Implementation for the ServiceAccessPoint LoRaWAN (End Node Modem firmware only) More...

`#include <SAP/WiMOD_SAP_LORAWAN.h>`

Inheritance diagram for WiMOD_SAP_LoRaWAN:
[legend]

## Public Member Functions
| WiMOD_SAP_LoRaWAN (TWiMODLRHCI *hci, UINT8 *buffer, UINT16 bufferSize)
| Constructor. More...
virtual | ~WiMOD_SAP_LoRaWAN (void)
| Destructor.
virtual void | setRegion (TLoRaWANregion regionalSetting)
| Setup regional settings for the LoRaWAN Firmware of the WiMOD module. More...
virtual TWiMODLRResultCodes | ActivateDevice (TWiMODLORAWAN_ActivateDeviceData &activationData, UINT8 *statusRsp)
| Activates the device via the ABP procedure. More...
virtual TWiMODLRResultCodes | ReactivateDevice (UINT32 *devAdr, UINT8 *statusRsp)
| Re-Activates the device via the ABP procedure. More...
virtual TWiMODLRResultCodes | SetJoinParameter (TWiMODLORAWAN_JoinParams &joinParams, UINT8 *statusRsp)
| Sets the parameters used for the OTAA activation procedure. More...
virtual TWiMODLRResultCodes | JoinNetwork (UINT8 *statusRsp)
| Start joining the network via the OTAA procedure. Asynchronous process. More...
virtual void | RegisterResetDevNonceIndicationClient (TResetDevNonceIndicationCallback cb)
| Register a callback function for the event "Reset DeviceNonce Indication". More...
virtual void | RegisterLinkDisconnectIndicationClient (TLinkDisconnectIndicationCallback cb)
| Register a callback function for the event "Link Disconnect Indication". More...
virtual void | RegisterDeviceTimeAnsIndicationClient (TNwkDeviceTimeAnsIndicationCallback cb)
| Register a callback function for the event "Nwk DeviceTime Answer Indication". More...
virtual void | RegisterJoinTxIndicationClient (TJoinTxIndicationCallback cb)
| Register a callback function for the event "TX Join Indication". More...
bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_Data *loraWanRxData)
| Convert a received low level HCI-Msg to a high-level Rx Data structure. More...
bool | convert (TWiMODLR_HCIMessage &rxMsg, TWiMODLORAWAN_TxIndData *sendIndData)
| Convert a received low level HCI-Msg to a high-level tx ind structure. More...
bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_MacCmdData *loraWanMacCmdData)
| Convert a received low level HCI-Msg to a high-level MAC-Cmd structure. More...
bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_JoinedNwkData *joinedNwkData)
| Convert a received low level HCI-Msg to a high-level NwkJoined structure. More...
bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_ACK_Data *ackData)
| Convert a received low level HCI-Msg to a high-level AckData structure. More...
bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_NoData_Data *info)
| Convert a received low level HCI-Msg to a high-level NoDataIndication structure. More...
void | RegisterNoDataIndicationClient (TNoDataIndicationCallback cb)
| Register a callback function for the event "TX Join Indication". More...
void | RegisterTxCDataIndicationClient (TTxCDataIndicationCallback cb)
| Register a callback function for the event "TX C-Data Indication". More...
void | RegisterTxUDataIndicationClient (TTxUDataIndicationCallback cb)
| Register a callback function for the event "TX U Data Indication". More...
void | RegisterRxUDataIndicationClient (TRxUDataIndicationCallback cb)
| Register a callback function for the event "RX U-Data Indication". More...
void | RegisterRxCDataIndicationClient (TRxCDataIndicationCallback cb)
| Register a callback function for the event "RX C-Data Indication". More...
void | RegisterRxMacCmdIndicationClient (TRxMacCmdIndicationCallback cb)
| Register a callback function for the event "RX MAC Cmd Indication". More...
void | RegisterJoinedNwkIndicationClient (TJoinedNwkIndicationCallback cb)
| Register a callback function for the event "Joined Nwk Indication". More...
void | RegisterRxAckIndicationClient (TRxAckIndicationCallback cb)
| Register a callback function for the event "RX ACK (data) Indication". More...
virtual TWiMODLRResultCodes | SendUData (const TWiMODLORAWAN_TX_Data *data, UINT8 *statusRsp)
| Tries to send transmit U-Data to network server via RF link. More...
virtual TWiMODLRResultCodes | SendCData (const TWiMODLORAWAN_TX_Data *data, UINT8 *statusRsp)
| Tries to send transmit C-Data to network server via RF link. More...
virtual TWiMODLRResultCodes | SetRadioStackConfig (TWiMODLORAWAN_RadioStackConfig *data, UINT8 *statusRsp)
| Sets a new radio config parameter set of the WiMOD. More...
virtual TWiMODLRResultCodes | GetRadioStackConfig (TWiMODLORAWAN_RadioStackConfig *data, UINT8 *statusRsp)
| Gets the current radio config parameter set of the WiMOD. More...
virtual TWiMODLRResultCodes | DeactivateDevice (UINT8 *statusRsp)
| Deactivate the device (logical disconnect from lora network) More...
virtual TWiMODLRResultCodes | FactoryReset (UINT8 *statusRsp)
| Reset all internal settings to default values (incl. DevEUI) More...
virtual TWiMODLRResultCodes | SetDeviceEUI (const UINT8 *deviceEUI, UINT8 *statusRsp)
| Sets a new DeviceEUI (aka. IEEE-Address) to the WiMOD. More...
virtual TWiMODLRResultCodes | GetDeviceEUI (UINT8 *deviceEUI, UINT8 *statusRsp)
| Gets the DeviceEUI (aka. IEEE-Address) of the WiMOD. More...
virtual TWiMODLRResultCodes | GetNwkStatus (TWiMODLORAWAN_NwkStatus_Data *nwkStatus, UINT8 *statusRsp)
| Gets the current status of the network "connection". More...
virtual TWiMODLRResultCodes | SendMacCmd (const TWiMODLORAWAN_MacCmd *cmd, UINT8 *statusRsp)
| Send a MAC command to the server; expert level only. More...
virtual TWiMODLRResultCodes | SetCustomConfig (const INT8 rfGain, UINT8 *statusRsp)
| Setup a custom config for tx power settings; expert level only. More...
virtual TWiMODLRResultCodes | GetCustomConfig (INT8 *rfGain, UINT8 *statusRsp)
| Get the current offet for tx power level; expert level only. More...
virtual TWiMODLRResultCodes | GetSupportedBands (TWiMODLORAWAN_SupportedBands *supportedBands, UINT8 *statusRsp)
| Get the supported bands of this firmware. More...
virtual TWiMODLRResultCodes | GetTxPowerLimitConfig (TWiMODLORAWAN_TxPwrLimitConfig *txPwrLimitCfg, UINT8 *statusRsp)
| Get the configured TxPowerLimit settings. More...
virtual TWiMODLRResultCodes | SetTxPowerLimitConfig (TWiMODLORAWAN_TxPwrLimitConfig &txPwrLimitCfg, UINT8 *statusRsp)
| Set a SINGLE TxPowerLimit entry. More...
virtual TWiMODLRResultCodes | SetBatteryLevelStatus (UINT8 battStatus, UINT8 *statusRsp)
| Set Battery Level Status. More...
virtual void | DispatchLoRaWANMessage (TWiMODLR_HCIMessage &rxMsg)

## Detailed Description

Implementation for the ServiceAccessPoint LoRaWAN (End Node Modem firmware only)

## Constructor & Destructor Documentation

## ◆ WiMOD_SAP_LoRaWAN()

WiMOD_SAP_LoRaWAN::WiMOD_SAP_LoRaWAN | ( | TWiMODLRHCI * | hci,
|  | UINT8 * | buffer,
|  | UINT16 | bufferSize
| ) |  |

Constructor.

Parameters

  hci | Pointer to HCI processor object
  buffer | pointer to storage area for building tx frames; MUST BE VALID
  bufferSize | size of the buffer

## Member Function Documentation

## ◆ ActivateDevice()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::ActivateDevice | ( | TWiMODLORAWAN_ActivateDeviceData & | activationData,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Activates the device via the ABP procedure.

See also
  TWiMODLRResultCodes for interpretation of the values

Parameters

  activationData | structure holding the necessary parameters
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ convert() [1/6]

bool WiMOD_SAP_LoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg,
|  | TWiMODLORAWAN_NoData_Data * | info
| ) |  |

Convert a received low level HCI-Msg to a high-level NoDataIndication structure.

This function should be used by the NoData Indication Callback function prior processing the received data message.

Parameters

  RxMsg | Reference to low-level HCI message.

Warning
  DO NOT MANIPULATE THESE VALUES !!!

Parameters

  info | Pointer to the buffer where to store the received data

Return values

  true | if the conversion was successful

## ◆ convert() [2/6]

bool WiMOD_SAP_LoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg,
|  | TWiMODLORAWAN_RX_ACK_Data * | ackData
| ) |  |

Convert a received low level HCI-Msg to a high-level AckData structure.

This function should be used by the Rx Ack Indication Callback function prior processing the received data message.

Parameters

  RxMsg | Reference to low-level HCI message.

Warning
  DO NOT MANIPULATE THESE VALUES !!!

Parameters

  ackData | Pointer to the buffer where to store the received data

Return values

  true | if the conversion was successful

## ◆ convert() [3/6]

bool WiMOD_SAP_LoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg,
|  | TWiMODLORAWAN_RX_Data * | loraWanRxData
| ) |  |

Convert a received low level HCI-Msg to a high-level Rx Data structure.

This function should be used by the Rx Data Indication Callback functions prior processing the received data message.

Parameters

  RxMsg | Reference to low-level HCI message.

Warning
  DO NOT MANIPULATE THESE VALUES !!!

Parameters

  loraWanRxData | Pointer to the buffer where to store the received data

Return values

  true | if the conversion was successful

## ◆ convert() [4/6]

bool WiMOD_SAP_LoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg,
|  | TWiMODLORAWAN_RX_JoinedNwkData * | joinedNwkData
| ) |  |

Convert a received low level HCI-Msg to a high-level NwkJoined structure.

This function should be used by the JoinedNwk Indication Callback function prior processing the received data message.

Parameters

  RxMsg | Reference to low-level HCI message.

Warning
  DO NOT MANIPULATE THESE VALUES !!!

Parameters

  joinedNwkData | Pointer to the buffer where to store the received data

Return values

  true | if the conversion was successful

## ◆ convert() [5/6]

bool WiMOD_SAP_LoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg,
|  | TWiMODLORAWAN_RX_MacCmdData * | loraWanMacCmdData
| ) |  |

Convert a received low level HCI-Msg to a high-level MAC-Cmd structure.

This function should be used by the Rx Mac Cmd Indication Callback function prior processing the received data message.

Parameters

  RxMsg | Reference to low-level HCI message.

Warning
  DO NOT MANIPULATE THESE VALUES !!!

Parameters

  loraWanMacCmdData | Pointer to the buffer where to store the received data

Return values

  true | if the conversion was successful

## ◆ convert() [6/6]

bool WiMOD_SAP_LoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg,
|  | TWiMODLORAWAN_TxIndData * | sendIndData
| ) |  |

Convert a received low level HCI-Msg to a high-level tx ind structure.

This function should be used by the Tx Data Indication Callback functions prior processing the received data message.

Parameters

  RxMsg | Reference to low-level HCI message.

Warning
  DO NOT MANIPULATE THESE VALUES !!!

Parameters

  sendIndData | Pointer to the buffer where to store the received data

Return values

  true | if the conversion was successful

## ◆ DeactivateDevice()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::DeactivateDevice | ( | UINT8 * | statusRsp | ) |
| virtual

Deactivate the device (logical disconnect from lora network)

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ FactoryReset()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::FactoryReset | ( | UINT8 * | statusRsp | ) |
| virtual

Reset all internal settings to default values (incl. DevEUI)

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ GetCustomConfig()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::GetCustomConfig | ( | INT8 * | rfGain,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Get the current offet for tx power level; expert level only.

Parameters

  rfGain | pointer to store the rfGain info for tx power settings
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ GetDeviceEUI()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::GetDeviceEUI | ( | UINT8 * | deviceEUI,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Gets the DeviceEUI (aka. IEEE-Address) of the WiMOD.

Parameters

  deviceEUI | pointer for storing the received 64bit address
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ GetNwkStatus()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::GetNwkStatus | ( | TWiMODLORAWAN_NwkStatus_Data * | nwkStatus,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Gets the current status of the network "connection".

Parameters

  nwkStatus | pointer for storing the requested information

See also
  LORAWAN_NWK_STATUS defines; e.g.:
  - LORAWAN_NWK_STATUS_INACTIVE,
  - LORAWAN_NWK_STATUS_ACTIVE_ABP,
  - LORAWAN_NWK_STATUS_ACTIVE_OTAA,
  - LORAWAN_NWK_STATUS_JOINING_OTAA

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ GetRadioStackConfig()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::GetRadioStackConfig | ( | TWiMODLORAWAN_RadioStackConfig * | data,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Gets the current radio config parameter set of the WiMOD.

Parameters

  data | pointer to data structure for storing the requested information

See also
  TWiMODLORAWAN_TX_Data for details

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ GetSupportedBands()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::GetSupportedBands | ( | TWiMODLORAWAN_SupportedBands * | supportedBands,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Get the supported bands of this firmware.

Parameters

  supportedBands | pointer to store area for result
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ GetTxPowerLimitConfig()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::GetTxPowerLimitConfig | ( | TWiMODLORAWAN_TxPwrLimitConfig * | txPwrLimitCfg,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Get the configured TxPowerLimit settings.

Parameters

  txPwrLimitCfg | pointer to store area for result
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ JoinNetwork()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::JoinNetwork | ( | UINT8 * | statusRsp | ) |
| virtual

Start joining the network via the OTAA procedure. Asynchronous process.

This functions starts an asynchronous process of joining to a network. It will take a time until a (final) result is ready. Therefore the callback interface (e.g. RegisterJoinedNwkIndicationClient) should be used.

See also
  TWiMODLRResultCodes for interpretation of the values

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ ReactivateDevice()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::ReactivateDevice | ( | UINT32 * | devAdr,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Re-Activates the device via the ABP procedure.

See also
  TWiMODLRResultCodes for interpretation of the values

Parameters

  devAdr | pointer where to store the "received" device address
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ RegisterDeviceTimeAnsIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterDeviceTimeAnsIndicationClient | ( | TNwkDeviceTimeAnsIndicationCallback | cb | ) |
| virtual

Register a callback function for the event "Nwk DeviceTime Answer Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

Reimplemented in WiMOD_SAP_LoRaWAN_ProLink.

## ◆ RegisterJoinedNwkIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterJoinedNwkIndicationClient | ( | TJoinedNwkIndicationCallback | cb | ) |

Register a callback function for the event "Joined Nwk Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterJoinTxIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterJoinTxIndicationClient | ( | TJoinTxIndicationCallback | cb | ) |
| virtual

Register a callback function for the event "TX Join Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterLinkDisconnectIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterLinkDisconnectIndicationClient | ( | TLinkDisconnectIndicationCallback | cb | ) |
| virtual

Register a callback function for the event "Link Disconnect Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

Reimplemented in WiMOD_SAP_LoRaWAN_ProLink.

## ◆ RegisterNoDataIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterNoDataIndicationClient | ( | TNoDataIndicationCallback | cb | ) |

Register a callback function for the event "TX Join Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterResetDevNonceIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterResetDevNonceIndicationClient | ( | TResetDevNonceIndicationCallback | cb | ) |
| virtual

Register a callback function for the event "Reset DeviceNonce Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

Reimplemented in WiMOD_SAP_LoRaWAN_ProLink.

## ◆ RegisterRxAckIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterRxAckIndicationClient | ( | TRxAckIndicationCallback | cb | ) |

Register a callback function for the event "RX ACK (data) Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterRxCDataIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterRxCDataIndicationClient | ( | TRxCDataIndicationCallback | cb | ) |

Register a callback function for the event "RX C-Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterRxMacCmdIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterRxMacCmdIndicationClient | ( | TRxMacCmdIndicationCallback | cb | ) |

Register a callback function for the event "RX MAC Cmd Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterRxUDataIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterRxUDataIndicationClient | ( | TRxUDataIndicationCallback | cb | ) |

Register a callback function for the event "RX U-Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterTxCDataIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterTxCDataIndicationClient | ( | TTxCDataIndicationCallback | cb | ) |

Register a callback function for the event "TX C-Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ RegisterTxUDataIndicationClient()

void WiMOD_SAP_LoRaWAN::RegisterTxUDataIndicationClient | ( | TTxUDataIndicationCallback | cb | ) |

Register a callback function for the event "TX U Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters

  cb | pointer to a callback function that should be called if the event occurs.

## ◆ SendCData()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SendCData | ( | const TWiMODLORAWAN_TX_Data * | data,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Tries to send transmit C-Data to network server via RF link.

Parameters

  data | pointer to data structure containing the TX-data and options.

See also
  TWiMODLORAWAN_TX_Data for details

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SendMacCmd()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SendMacCmd | ( | const TWiMODLORAWAN_MacCmd * | cmd,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Send a MAC command to the server; expert level only.

Parameters

  cmd | pointer containing the MAC command and parameters
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SendUData()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SendUData | ( | const TWiMODLORAWAN_TX_Data * | data,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Tries to send transmit U-Data to network server via RF link.

Parameters

  data | pointer to data structure containing the TX-data and options.

See also
  TWiMODLORAWAN_TX_Data for details

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SetBatteryLevelStatus()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SetBatteryLevelStatus | ( | UINT8 | battStatus,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Set Battery Level Status.

**

**

Parameters

  battStatus | status value; see documentation for details.
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SetCustomConfig()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SetCustomConfig | ( | const INT8 | rfGain,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Setup a custom config for tx power settings; expert level only.

Parameters

  rfGain | new rfGain value for tx power settings
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SetDeviceEUI()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SetDeviceEUI | ( | const UINT8 * | deviceEUI,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Sets a new DeviceEUI (aka. IEEE-Address) to the WiMOD.

Note: Setting a new DeviceEUI is requires to switch to customer operation mode. In "normal" application mode, this command is locked.

Parameters

  deviceEUI | pointer to data structure containing the new parameters (Must be an pointer of a 64bit address)
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SetJoinParameter()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SetJoinParameter | ( | TWiMODLORAWAN_JoinParams & | joinParams,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Sets the parameters used for the OTAA activation procedure.

See also
  TWiMODLRResultCodes for interpretation of the values

Parameters

  joinParams | structure holding the necessary parameters
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ SetRadioStackConfig()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SetRadioStackConfig | ( | TWiMODLORAWAN_RadioStackConfig * | data,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Sets a new radio config parameter set of the WiMOD.

Parameters

  data | pointer to data structure containing the new parameters

See also
  TWiMODLORAWAN_TX_Data for details

Parameters

  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

## ◆ setRegion()

void WiMOD_SAP_LoRaWAN::setRegion | ( | TLoRaWANregion | regionalSetting | ) |
| virtual

Setup regional settings for the LoRaWAN Firmware of the WiMOD module.

Parameters

  regionalSetting | region code for the firmware

## ◆ SetTxPowerLimitConfig()

TWiMODLRResultCodes WiMOD_SAP_LoRaWAN::SetTxPowerLimitConfig | ( | TWiMODLORAWAN_TxPwrLimitConfig & | txPwrLimitCfg,
|  | UINT8 * | statusRsp
| ) |  |
| virtual

Set a SINGLE TxPowerLimit entry.

Parameters

  txPwrLimitCfg | reference that holds the data to write
  statusRsp | Status byte contained in the local response of the module

Return values

  WiMODLR_RESULT_OK | if command transmit to WiMOD was ok

The documentation for this class was generated from the following files:

- SAP/WiMOD_SAP_LORAWAN.h
- SAP/WiMOD_SAP_LORAWAN.cpp