Base class every generated message derives from.
More...
#include <proto_message.hpp>
Base class every generated message derives from.
◆ ProtoMessage() [1/3]
| esphome::api::ProtoMessage::ProtoMessage |
( |
| ) |
|
|
default |
◆ ProtoMessage() [2/3]
| esphome::api::ProtoMessage::ProtoMessage |
( |
const ProtoMessage & |
| ) |
|
|
default |
◆ ProtoMessage() [3/3]
| esphome::api::ProtoMessage::ProtoMessage |
( |
ProtoMessage && |
| ) |
|
|
default |
◆ ~ProtoMessage()
| virtual esphome::api::ProtoMessage::~ProtoMessage |
( |
| ) |
|
|
virtualdefault |
◆ ByteSizeLong()
| std::size_t esphome::api::ProtoMessage::ByteSizeLong |
( |
| ) |
const |
|
inline |
◆ calculate_size()
| virtual std::size_t esphome::api::ProtoMessage::calculate_size |
( |
| ) |
const |
|
pure virtual |
Exact number of bytes encode() will write.
◆ clone()
| virtual std::unique_ptr< ProtoMessage > esphome::api::ProtoMessage::clone |
( |
| ) |
const |
|
pure virtual |
A deep copy of this message as a new owning pointer.
◆ decode()
| virtual bool esphome::api::ProtoMessage::decode |
( |
ProtoReader & |
reader | ) |
|
|
pure virtual |
Decode wire bytes into this message.
Returns false on truncation / malformed input. Unknown fields are skipped (forward-compat).
◆ encode()
| virtual void esphome::api::ProtoMessage::encode |
( |
ProtoWriter & |
writer | ) |
const |
|
pure virtual |
Serialize this message's fields to writer (ascending field number).
◆ message_id()
| virtual std::uint32_t esphome::api::ProtoMessage::message_id |
( |
| ) |
const |
|
pure virtual |
The protocol message id (the proto (id) option), or 0 if the message carries none.
◆ message_name()
| virtual const char * esphome::api::ProtoMessage::message_name |
( |
| ) |
const |
|
pure virtual |
The proto message name (e.g. "ListEntitiesLightResponse").
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ParseFromArray()
| bool esphome::api::ProtoMessage::ParseFromArray |
( |
const void * |
data, |
|
|
const int |
size |
|
) |
| |
|
inline |
Parse wire bytes into this message. Returns false on malformed input.
◆ SerializeAsString()
| std::string esphome::api::ProtoMessage::SerializeAsString |
( |
| ) |
const |
|
inline |
Serialize to a freshly allocated string.
◆ SerializeToArray()
| bool esphome::api::ProtoMessage::SerializeToArray |
( |
void * |
data, |
|
|
const int |
size |
|
) |
| const |
|
inline |
Serialize into a caller-provided buffer of exactly size bytes.
Returns false if the message does not encode to exactly size bytes.
The documentation for this class was generated from the following file: