1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00
This commit is contained in:
J. Nick Koston
2025-07-11 11:05:28 -10:00
parent 42be5d892a
commit e472a345c9

View File

@@ -1,5 +1,4 @@
#pragma once
#include <cassert>
#include <cstdint>
#include <deque>
#include <limits>
@@ -46,10 +45,7 @@ struct PacketInfo {
uint32_t message_type : 8; // 8 bits: 0-255
// Total: 32 bits = 4 bytes exactly
PacketInfo(uint8_t type, uint16_t off, uint16_t size) : offset(off), payload_size(size), message_type(type) {
assert(off <= MAX_OFFSET);
assert(size <= MAX_PAYLOAD_SIZE);
}
PacketInfo(uint8_t type, uint16_t off, uint16_t size) : offset(off), payload_size(size), message_type(type) {}
};
enum class APIError : uint16_t {