Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MeshModelSelector Class Reference

Class that selects which model to use to send a message. More...

#include <cs_MeshModelSelector.h>

Collaboration diagram for MeshModelSelector:

Public Member Functions

void init (MeshModelMulticast &multicastModel, MeshModelMulticastAcked &multicastAckedModel, MeshModelMulticastNeighbours &multicastNeighboursModel, MeshModelUnicast &unicastModel)
 Init with pointer to all models. More...
 
cs_ret_code_t addToQueue (MeshUtil::cs_mesh_queue_item_t &item)
 Add item to the send queue of a suitable model. More...
 
cs_ret_code_t remFromQueue (MeshUtil::cs_mesh_queue_item_t &item)
 Remove an item from the send queue. More...
 

Private Attributes

MeshModelMulticast_multicastModel = nullptr
 
MeshModelMulticastAcked_multicastAckedModel = nullptr
 
MeshModelMulticastNeighbours_multicastNeighboursModel = nullptr
 
MeshModelUnicast_unicastModel = nullptr
 

Detailed Description

Class that selects which model to use to send a message.

Member Function Documentation

◆ addToQueue()

cs_ret_code_t MeshModelSelector::addToQueue ( MeshUtil::cs_mesh_queue_item_t item)

Add item to the send queue of a suitable model.

◆ init()

void MeshModelSelector::init ( MeshModelMulticast multicastModel,
MeshModelMulticastAcked multicastAckedModel,
MeshModelMulticastNeighbours multicastNeighboursModel,
MeshModelUnicast unicastModel 
)

Init with pointer to all models.

Could maybe be implemented neater if we have a base class for models.

◆ remFromQueue()

cs_ret_code_t MeshModelSelector::remFromQueue ( MeshUtil::cs_mesh_queue_item_t item)

Remove an item from the send queue.

Member Data Documentation

◆ _multicastAckedModel

MeshModelMulticastAcked* MeshModelSelector::_multicastAckedModel = nullptr
private

◆ _multicastModel

MeshModelMulticast* MeshModelSelector::_multicastModel = nullptr
private

◆ _multicastNeighboursModel

MeshModelMulticastNeighbours* MeshModelSelector::_multicastNeighboursModel = nullptr
private

◆ _unicastModel

MeshModelUnicast* MeshModelSelector::_unicastModel = nullptr
private

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