LSH-Core
A robust C++ framework for Arduino-based home automation nodes
Loading...
Searching...
No Matches
static_payloads.hpp File Reference

Defines pre-serialized static message payloads stored in Flash. More...

#include <etl/array.h>
#include <stdint.h>
Include dependency graph for static_payloads.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  constants
 namespace for constants.
 

Enumerations

enum class  constants::payloads::StaticType : uint8_t { BOOT , PING_ }
 Defines the types of pre-serialized static payloads. More...
 

Variables

constexpr etl::array< const uint8_t, 8 > constants::payloads::JSON_BOOT_BYTES = {'{', '"', 'p', '"', ':', '4', '}', '\n'}
 Pre-serialized BOOT payload in JSON format.
 
constexpr etl::array< const uint8_t, 4 > constants::payloads::MSGPACK_BOOT_BYTES = {0x81, 0xA1, 0x70, 0x04}
 Pre-serialized BOOT payload in MsgPack format.
 
constexpr etl::array< const uint8_t, 8 > constants::payloads::JSON_PING_BYTES = {'{', '"', 'p', '"', ':', '5', '}', '\n'}
 Pre-serialized PING payload in JSON format.
 
constexpr etl::array< const uint8_t, 4 > constants::payloads::MSGPACK_PING_BYTES = {0x81, 0xA1, 0x70, 0x05}
 Pre-serialized PING payload in MsgPack format.
 

Detailed Description

Defines pre-serialized static message payloads stored in Flash.

Author
Jacopo Labardi (labodj)

Copyright 2025 Jacopo Labardi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Enumeration Type Documentation

◆ StaticType

enum class constants::payloads::StaticType : uint8_t
strong

Defines the types of pre-serialized static payloads.

Enumerator
BOOT 

Corresponds to {"p":4}.

PING_ 

Corresponds to {"p":5}.