This commit is contained in:
J. Nick Koston 2025-07-20 19:57:32 -10:00
parent 04953db51e
commit ad52d80281
No known key found for this signature in database
2 changed files with 5 additions and 7 deletions

View File

@ -991,7 +991,7 @@ class NoiseEncryptionSetKeyRequest : public ProtoDecodableMessage {
#ifdef HAS_PROTO_MESSAGE_DUMP #ifdef HAS_PROTO_MESSAGE_DUMP
const char *message_name() const override { return "noise_encryption_set_key_request"; } const char *message_name() const override { return "noise_encryption_set_key_request"; }
#endif #endif
std::string key{}; // Storage for decoded data std::string key{};
#ifdef HAS_PROTO_MESSAGE_DUMP #ifdef HAS_PROTO_MESSAGE_DUMP
void dump_to(std::string &out) const override; void dump_to(std::string &out) const override;
#endif #endif
@ -1914,7 +1914,7 @@ class BluetoothGATTWriteRequest : public ProtoDecodableMessage {
uint64_t address{0}; uint64_t address{0};
uint32_t handle{0}; uint32_t handle{0};
bool response{false}; bool response{false};
std::string data{}; // Storage for decoded data std::string data{};
#ifdef HAS_PROTO_MESSAGE_DUMP #ifdef HAS_PROTO_MESSAGE_DUMP
void dump_to(std::string &out) const override; void dump_to(std::string &out) const override;
#endif #endif
@ -1948,7 +1948,7 @@ class BluetoothGATTWriteDescriptorRequest : public ProtoDecodableMessage {
#endif #endif
uint64_t address{0}; uint64_t address{0};
uint32_t handle{0}; uint32_t handle{0};
std::string data{}; // Storage for decoded data std::string data{};
#ifdef HAS_PROTO_MESSAGE_DUMP #ifdef HAS_PROTO_MESSAGE_DUMP
void dump_to(std::string &out) const override; void dump_to(std::string &out) const override;
#endif #endif
@ -2283,7 +2283,7 @@ class VoiceAssistantAudio : public ProtoDecodableMessage {
#endif #endif
const uint8_t *data_ptr_{nullptr}; const uint8_t *data_ptr_{nullptr};
size_t data_len_{0}; size_t data_len_{0};
std::string data{}; // Storage for decoded data std::string data{};
void set_data(const uint8_t *data, size_t len) { void set_data(const uint8_t *data, size_t len) {
this->data_ptr_ = data; this->data_ptr_ = data;
this->data_len_ = len; this->data_len_ = len;

View File

@ -625,9 +625,7 @@ class BytesType(TypeInfo):
# Add std::string storage if message needs decoding # Add std::string storage if message needs decoding
if self.needs_decode: if self.needs_decode:
content.append( content.append(f"std::string {self.field_name}{{}};")
f"std::string {self.field_name}{{}}; // Storage for decoded data"
)
# Add setter method if message needs encoding # Add setter method if message needs encoding
if self.needs_encode: if self.needs_encode: