AssetForwarder makes it possible for the AssetFiltering to merge mesh messages when they have very si...
Definition: cs_AssetForwarder.h:29
uint8_t _throttleCountdownBumpTicks
Definition: cs_AssetForwarder.h:77
bool addToOutbox(outbox_msg_t &outMsg)
Adds a message to the outbox.
void setThrottleCountdownBumpTicks(uint8_t ticks)
sets how many ticks will be added to records upon sending a message.
outbox_msg_t * getEmptyOutboxSlot()
Returns an empty slot in the outbox.
void clearOutbox()
Removes all messages currently queued for sending.
virtual void handleEvent(event_t &event)
Forwards relevant incoming mesh messages to UART.
outbox_msg_t _outbox[8]
Definition: cs_AssetForwarder.h:104
stone_id_t _myStoneId
Definition: cs_AssetForwarder.h:75
static constexpr uint16_t MIN_THROTTLED_ADVERTISEMENT_PERIOD_MS
Definition: cs_AssetForwarder.h:31
void flush()
Sends the mesh messages in the outbox and clears it.
outbox_msg_t * findSimilar(outbox_msg_t &outMsg)
Returns a similar message in the outbox.
cs_ret_code_t init()
Components can implement this if they need to get references to sibling or if they need to do specifi...
bool dispatchOutboxMessage(outbox_msg_t &outMsg)
validates the message, then update throttle send over uart send over mesh
void forwardAssetToUart(const cs_mesh_model_msg_asset_report_id_t &assetMsg, stone_id_t seenByStoneId)
bool sendAssetMacToMesh(asset_record_t *record, const scanned_device_t &asset)
Prepare a CS_MESH_MODEL_TYPE_ASSET_RSSI_MAC message and put it on the outbox.
bool sendAssetIdToMesh(asset_record_t *record, const scanned_device_t &asset, const asset_id_t &assetId, uint8_t filterBitmask)
Prepare a CS_MESH_MODEL_TYPE_ASSET_INFO message and put it on the outbox.
void forwardAssetToUart(const cs_mesh_model_msg_asset_report_mac_t &assetMsg, stone_id_t seenByStoneId)
Forward an asset mesh message to UART.
Helper class to manage decoupling of components.
Definition: cs_Component.h:35
Event listener.
Definition: cs_EventListener.h:17
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 9,...
Definition: cs_Event.h:26
static constexpr uint8_t MAX_MESH_MSG_PAYLOAD_SIZE
Definition: cs_MeshModelPackets.h:59
cs_mesh_model_msg_type_t
Definition: cs_MeshModelPackets.h:61
uint8_t stone_id_t
Definition: cs_Typedefs.h:23
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21
Definition: cs_AssetForwarder.h:79
cs_mesh_model_msg_asset_report_mac_t macMsg
Definition: cs_AssetForwarder.h:84
cs_mesh_model_msg_type_t msgType
Definition: cs_AssetForwarder.h:81
bool isSimilar(const outbox_msg_t &other)
returns true if they have the same msgType and the addresses are the same.
cs_mesh_model_msg_asset_report_id_t idMsg
Definition: cs_AssetForwarder.h:83
uint8_t rawMsg[MAX_MESH_MSG_PAYLOAD_SIZE]
Definition: cs_AssetForwarder.h:85
bool isValid()
returns true if msgType is one of: CS_MESH_MODEL_TYPE_ASSET_INFO_MAC CS_MESH_MODEL_TYPE_ASSET_INFO_ID
asset_record_t * record
Definition: cs_AssetForwarder.h:80
Definition: cs_AssetFilterPackets.h:93
Definition: cs_AssetRecord.h:12
Definition: cs_MeshModelPackets.h:236
Definition: cs_MeshModelPackets.h:231
Scanned device.
Definition: cs_PacketsInternal.h:107