Demo HCI Implementation for WiMOD-LR Devices  V2.0.3
WiMOD_SAP_SensorApp Class Reference

Implementation for the ServiceAccessPoint SensorApp (LR-Base_PLUS firmware only) More...

#include <SAP/WiMOD_SAP_SensorApp.h>

Public Member Functions

 WiMOD_SAP_SensorApp (TWiMODLRHCI *hci, UINT8 *buffer, UINT16 bufferSize)
 Constructor. More...
 
virtual TWiMODLRResultCodes SetSensorAppConfig (const TWiMODLR_SensorApp_Config *config, UINT8 *statusRsp)
 Sets a new SensorApp configuration to the WiMOD. More...
 
virtual TWiMODLRResultCodes GetSensorAppConfig (TWiMODLR_SensorApp_Config *config, UINT8 *statusRsp)
 Gets the current SensorApp configuration from the WiMOD. More...
 
virtual bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_SensorApp_SensorData *sensorData)
 Convert a received low level HCI-Msg to a high-level SensorData structure. More...
 
virtual bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_SensorApp_AckSensorData *sensorAckData)
 Convert a received low level HCI-Msg to a high-level SensorAckData structure. More...
 
virtual void RegisterSensorAckIndClient (TSensorAppAckIndicationCallback cb)
 Register a callback function for the event "SensorApp Ack Data Indication". More...
 
virtual void RegisterSensorDataIndClient (TSensorAppSensorDataIndicationCallback cb)
 Register a callback function for the event "SensorApp Data Indication". More...
 
virtual void DispatchSensorAppMessage (TWiMODLR_HCIMessage &rxMsg)
 

Detailed Description

Implementation for the ServiceAccessPoint SensorApp (LR-Base_PLUS firmware only)

Constructor & Destructor Documentation

◆ WiMOD_SAP_SensorApp()

WiMOD_SAP_SensorApp::WiMOD_SAP_SensorApp ( TWiMODLRHCI hci,
UINT8 *  buffer,
UINT16  bufferSize 
)

Constructor.

Parameters
hciPointer to HCI processor object
bufferpointer to storage area for building tx frames; MUST BE VALID
bufferSizesize of the buffer

Member Function Documentation

◆ convert() [1/2]

bool WiMOD_SAP_SensorApp::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLR_SensorApp_AckSensorData sensorAckData 
)
virtual

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

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

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
sensorAckDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful

◆ convert() [2/2]

bool WiMOD_SAP_SensorApp::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLR_SensorApp_SensorData sensorData 
)
virtual

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

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

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
sensorDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful

◆ GetSensorAppConfig()

TWiMODLRResultCodes WiMOD_SAP_SensorApp::GetSensorAppConfig ( TWiMODLR_SensorApp_Config config,
UINT8 *  statusRsp 
)
virtual

Gets the current SensorApp configuration from the WiMOD.

Parameters
configpointer to data structure where to store the data
statusRspStatus byte contained in the local response of the module
Return values
WiMODLR_RESULT_OKif command transmit to WiMOD was ok

◆ RegisterSensorAckIndClient()

void WiMOD_SAP_SensorApp::RegisterSensorAckIndClient ( TSensorAppAckIndicationCallback  cb)
virtual

Register a callback function for the event "SensorApp Ack Data Indication".

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

Parameters
cbpointer to a callback function that should be called if the event occurs.

◆ RegisterSensorDataIndClient()

void WiMOD_SAP_SensorApp::RegisterSensorDataIndClient ( TSensorAppSensorDataIndicationCallback  cb)
virtual

Register a callback function for the event "SensorApp Data Indication".

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

Parameters
cbpointer to a callback function that should be called if the event occurs.

◆ SetSensorAppConfig()

TWiMODLRResultCodes WiMOD_SAP_SensorApp::SetSensorAppConfig ( const TWiMODLR_SensorApp_Config config,
UINT8 *  statusRsp 
)
virtual

Sets a new SensorApp configuration to the WiMOD.

Parameters
configpointer to data structure containing the new parameters
statusRspStatus byte contained in the local response of the module
Return values
WiMODLR_RESULT_OKif command transmit to WiMOD was ok

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