Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
MeshMsgHandler Class Referenceabstract

Class that: More...

#include <cs_MeshMsgHandler.h>

Collaboration diagram for MeshMsgHandler:

Classes

struct  cs_mesh_model_ext_state_t
 

Public Member Functions

void init ()
 
void handleMsg (MeshMsgEvent &msg)
 

Protected Member Functions

cs_ret_code_t handleTest (MeshMsgEvent &msg)
 
cs_ret_code_t handleAck (MeshMsgEvent &msg)
 
cs_ret_code_t handleCmdTime (MeshMsgEvent &msg)
 
cs_ret_code_t handleCmdNoop (MeshMsgEvent &msg)
 
cs_ret_code_t handleRssiPing (MeshMsgEvent &msg)
 
cs_ret_code_t handleRssiData (MeshMsgEvent &msg)
 
cs_ret_code_t handleTimeSync (MeshMsgEvent &msg)
 
cs_ret_code_t handleCmdMultiSwitch (MeshMsgEvent &msg)
 
cs_ret_code_t handleState0 (MeshMsgEvent &msg)
 
cs_ret_code_t handleState1 (MeshMsgEvent &msg)
 
cs_ret_code_t handleProfileLocation (MeshMsgEvent &msg)
 
cs_ret_code_t handleTrackedDeviceRegister (MeshMsgEvent &msg)
 
cs_ret_code_t handleTrackedDeviceToken (MeshMsgEvent &msg)
 
cs_ret_code_t handleTrackedDeviceHeartbeat (MeshMsgEvent &msg)
 
cs_ret_code_t handleTrackedDeviceListSize (MeshMsgEvent &msg)
 
cs_ret_code_t handleSyncRequest (MeshMsgEvent &msg)
 
void handleStateSet (MeshMsgEvent &msg)
 
void handleControlCommand (MeshMsgEvent &msg)
 
cs_ret_code_t handleResult (MeshMsgEvent &msg)
 
cs_ret_code_t handleSetIbeaconConfigId (MeshMsgEvent &msg)
 
cs_ret_code_t dispatchEventForMeshMsg (CS_TYPE evtType, MeshMsgEvent &msg)
 

Private Member Functions

 TYPIFY (CONFIG_CROWNSTONE_ID) _ownId=0
 
 TYPIFY (CMD_SET_TIME) _lastReveivedSetTime=0
 Cache last received set time command, so it can be ignored. More...
 
bool isFromSameState (stone_id_t srcId, stone_id_t id, uint16_t partialTimestamp)
 Whether a state message is from the same state as last received part. More...
 
void checkStateReceived ()
 Check if all parts of a state are received. More...
 
void replyWithRetCode (cs_mesh_model_msg_type_t type, cs_ret_code_t retCode, mesh_reply_t *reply)
 Set the reply to a result message with given mesh message type and return code as payload. More...
 
void sendResultToUart (uart_msg_mesh_result_packet_header_t &resultHeader, const cs_data_t &resultData)
 Send the given result to UART. More...
 

Private Attributes

cs_mesh_model_ext_state_t _lastReceivedState
 Cache part(s) of the last received state, so it can be combined. More...
 

Detailed Description

Class that:

  • Handles received messages from the mesh.

Member Function Documentation

◆ checkStateReceived()

void MeshMsgHandler::checkStateReceived ( )
private

Check if all parts of a state are received.

Send an event if that's the case.

◆ dispatchEventForMeshMsg()

cs_ret_code_t MeshMsgHandler::dispatchEventForMeshMsg ( CS_TYPE  evtType,
MeshMsgEvent msg 
)
protected

◆ handleAck()

cs_ret_code_t MeshMsgHandler::handleAck ( MeshMsgEvent msg)
protected

◆ handleCmdMultiSwitch()

cs_ret_code_t MeshMsgHandler::handleCmdMultiSwitch ( MeshMsgEvent msg)
protected

◆ handleCmdNoop()

cs_ret_code_t MeshMsgHandler::handleCmdNoop ( MeshMsgEvent msg)
protected

◆ handleCmdTime()

cs_ret_code_t MeshMsgHandler::handleCmdTime ( MeshMsgEvent msg)
protected

◆ handleControlCommand()

void MeshMsgHandler::handleControlCommand ( MeshMsgEvent msg)
protected

◆ handleMsg()

void MeshMsgHandler::handleMsg ( MeshMsgEvent msg)

◆ handleProfileLocation()

cs_ret_code_t MeshMsgHandler::handleProfileLocation ( MeshMsgEvent msg)
protected

◆ handleResult()

cs_ret_code_t MeshMsgHandler::handleResult ( MeshMsgEvent msg)
protected

◆ handleRssiData()

cs_ret_code_t MeshMsgHandler::handleRssiData ( MeshMsgEvent msg)
protected

◆ handleRssiPing()

cs_ret_code_t MeshMsgHandler::handleRssiPing ( MeshMsgEvent msg)
protected

◆ handleSetIbeaconConfigId()

cs_ret_code_t MeshMsgHandler::handleSetIbeaconConfigId ( MeshMsgEvent msg)
protected

◆ handleState0()

cs_ret_code_t MeshMsgHandler::handleState0 ( MeshMsgEvent msg)
protected

◆ handleState1()

cs_ret_code_t MeshMsgHandler::handleState1 ( MeshMsgEvent msg)
protected

◆ handleStateSet()

void MeshMsgHandler::handleStateSet ( MeshMsgEvent msg)
protected

◆ handleSyncRequest()

cs_ret_code_t MeshMsgHandler::handleSyncRequest ( MeshMsgEvent msg)
protected

◆ handleTest()

cs_ret_code_t MeshMsgHandler::handleTest ( MeshMsgEvent msg)
protected

◆ handleTimeSync()

cs_ret_code_t MeshMsgHandler::handleTimeSync ( MeshMsgEvent msg)
protected

◆ handleTrackedDeviceHeartbeat()

cs_ret_code_t MeshMsgHandler::handleTrackedDeviceHeartbeat ( MeshMsgEvent msg)
protected

◆ handleTrackedDeviceListSize()

cs_ret_code_t MeshMsgHandler::handleTrackedDeviceListSize ( MeshMsgEvent msg)
protected

◆ handleTrackedDeviceRegister()

cs_ret_code_t MeshMsgHandler::handleTrackedDeviceRegister ( MeshMsgEvent msg)
protected

◆ handleTrackedDeviceToken()

cs_ret_code_t MeshMsgHandler::handleTrackedDeviceToken ( MeshMsgEvent msg)
protected

◆ init()

void MeshMsgHandler::init ( )

◆ isFromSameState()

bool MeshMsgHandler::isFromSameState ( stone_id_t  srcId,
stone_id_t  id,
uint16_t  partialTimestamp 
)
private

Whether a state message is from the same state as last received part.

◆ replyWithRetCode()

void MeshMsgHandler::replyWithRetCode ( cs_mesh_model_msg_type_t  type,
cs_ret_code_t  retCode,
mesh_reply_t reply 
)
private

Set the reply to a result message with given mesh message type and return code as payload.

◆ sendResultToUart()

void MeshMsgHandler::sendResultToUart ( uart_msg_mesh_result_packet_header_t resultHeader,
const cs_data_t resultData 
)
private

Send the given result to UART.

◆ TYPIFY() [1/2]

MeshMsgHandler::TYPIFY ( CMD_SET_TIME  )
privatepure virtual

Cache last received set time command, so it can be ignored.

◆ TYPIFY() [2/2]

MeshMsgHandler::TYPIFY ( CONFIG_CROWNSTONE_ID  )
privatepure virtual

Member Data Documentation

◆ _lastReceivedState

cs_mesh_model_ext_state_t MeshMsgHandler::_lastReceivedState
private

Cache part(s) of the last received state, so it can be combined.


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