Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_Event.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <common/cs_Types.h>
11
12#include <cstdint>
13
26class event_t {
27public:
30
33
36
38
39 event_t(CS_TYPE type) : event_t(type, nullptr, 0) {}
40
41 // Type of event.
43
44 // Event data.
45 void* data;
46
47 // Size of the event data.
49
54
62
66 inline uint8_t* getData() { return static_cast<uint8_t*>(data); }
67
73 void dispatch();
74};
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 9,...
Definition: cs_Event.h:26
event_t(CS_TYPE type, void *data, size16_t size, const cs_result_t &result)
Definition: cs_Event.h:34
void dispatch()
Utility function so that not every file needs to include the eventdispatcher.
cs_result_t result
Result of the event (optional).
Definition: cs_Event.h:61
event_t(CS_TYPE type, void *data, size16_t size, const cmd_source_with_counter_t &source, const cs_result_t &result)
Definition: cs_Event.h:28
event_t(CS_TYPE type, void *data, size16_t size)
Definition: cs_Event.h:37
void * data
Definition: cs_Event.h:45
uint8_t * getData()
Utility function to get the data as uint8_t*.
Definition: cs_Event.h:66
size16_t size
Definition: cs_Event.h:48
CS_TYPE type
Definition: cs_Event.h:42
event_t(CS_TYPE type)
Definition: cs_Event.h:39
cmd_source_with_counter_t source
Source of the command (optional).
Definition: cs_Event.h:53
event_t(CS_TYPE type, void *data, size16_t size, const cmd_source_with_counter_t &source)
Definition: cs_Event.h:31
uint16_t size16_t
Definition: cs_Typedefs.h:25
CS_TYPE
Types:
Definition: cs_Types.h:79
Struct that tells where a command originated from.
Definition: cs_CmdSource.h:54
Definition: cs_PacketsInternal.h:46