Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_UartCommandHandler.h
Go to the documentation of this file.
1/*
2 * Author: Crownstone Team
3 * Copyright: Crownstone (https://crownstone.rocks)
4 * Date: Sep 20, 2020
5 * License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
6 */
7
8#pragma once
11
13public:
27 UartOpcodeRx opCode,
28 cs_data_t commandData,
29 EncryptionAccessLevel accessLevel,
30 bool wasEncrypted,
31 cs_data_t resultBuffer);
32
33private:
35
42 void dispatchEventForCommand(CS_TYPE type, cs_data_t commandData);
43
44 void handleCommandHello(cs_data_t commandData);
46 void handleCommandHeartBeat(cs_data_t commandData, bool wasEncrypted);
47 void handleCommandStatus(cs_data_t commandData);
49 cs_data_t commandData,
50 const cmd_source_with_counter_t source,
51 const EncryptionAccessLevel accessLevel,
52 cs_data_t resultBuffer);
54 cs_data_t commandData,
55 const cmd_source_with_counter_t source,
56 const EncryptionAccessLevel accessLevel,
57 cs_data_t resultBuffer);
60 void handleCommandGetId(cs_data_t commandData);
63};
Definition: cs_UartCommandHandler.h:12
void handleCommandSessionNonce(cs_data_t commandData)
void handleCommandStatus(cs_data_t commandData)
void handleCommandEnableMesh(cs_data_t commandData)
void dispatchEventForCommand(CS_TYPE type, cs_data_t commandData)
Dispatch event.
void handleCommandGetId(cs_data_t commandData)
void handleCommandHello(cs_data_t commandData)
void handleCommand(UartOpcodeRx opCode, cs_data_t commandData, EncryptionAccessLevel accessLevel, bool wasEncrypted, cs_data_t resultBuffer)
Handle UART command.
void handleCommandInjectEvent(cs_data_t commandData)
void handleCommandHeartBeat(cs_data_t commandData, bool wasEncrypted)
EncryptionAccessLevel getRequiredAccessLevel(const UartOpcodeRx opCode)
void handleCommandEnableAdvertising(cs_data_t commandData)
void handleCommandGetMacAddress(cs_data_t commandData)
void handleCommandHubDataReply(cs_data_t commandData, const cmd_source_with_counter_t source, const EncryptionAccessLevel accessLevel, cs_data_t resultBuffer)
void handleCommandControl(cs_data_t commandData, const cmd_source_with_counter_t source, const EncryptionAccessLevel accessLevel, cs_data_t resultBuffer)
EncryptionAccessLevel
Packets (structs) that are used over the air, over uart, or stored in flash.
Definition: cs_Packets.h:36
CS_TYPE
Types:
Definition: cs_Types.h:79
UartOpcodeRx
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Jun 18,...
Definition: cs_UartOpcodes.h:15
Struct that tells where a command originated from.
Definition: cs_CmdSource.h:54
Packets (structs) that are used internally in the firmware, and can be changed freely.
Definition: cs_PacketsInternal.h:27