ESPHome  2022.9.1
Public Member Functions | Protected Member Functions
esphome::api::ProtoMessage Class Referenceabstract

#include <proto.h>

Inheritance diagram for esphome::api::ProtoMessage:
esphome::api::BinarySensorStateResponse esphome::api::BluetoothLEAdvertisementResponse esphome::api::BluetoothServiceData esphome::api::ButtonCommandRequest esphome::api::CameraImageRequest esphome::api::CameraImageResponse esphome::api::ClimateCommandRequest esphome::api::ClimateStateResponse esphome::api::ConnectRequest esphome::api::ConnectResponse esphome::api::CoverCommandRequest esphome::api::CoverStateResponse esphome::api::DeviceInfoRequest esphome::api::DeviceInfoResponse esphome::api::DisconnectRequest esphome::api::DisconnectResponse esphome::api::ExecuteServiceArgument esphome::api::ExecuteServiceRequest esphome::api::FanCommandRequest esphome::api::FanStateResponse esphome::api::GetTimeRequest esphome::api::GetTimeResponse esphome::api::HelloRequest esphome::api::HelloResponse esphome::api::HomeassistantServiceMap esphome::api::HomeassistantServiceResponse esphome::api::HomeAssistantStateResponse esphome::api::LightCommandRequest esphome::api::LightStateResponse esphome::api::ListEntitiesBinarySensorResponse esphome::api::ListEntitiesButtonResponse esphome::api::ListEntitiesCameraResponse esphome::api::ListEntitiesClimateResponse esphome::api::ListEntitiesCoverResponse esphome::api::ListEntitiesDoneResponse esphome::api::ListEntitiesFanResponse esphome::api::ListEntitiesLightResponse esphome::api::ListEntitiesLockResponse esphome::api::ListEntitiesMediaPlayerResponse esphome::api::ListEntitiesNumberResponse esphome::api::ListEntitiesRequest esphome::api::ListEntitiesSelectResponse esphome::api::ListEntitiesSensorResponse esphome::api::ListEntitiesServicesArgument esphome::api::ListEntitiesServicesResponse esphome::api::ListEntitiesSwitchResponse esphome::api::ListEntitiesTextSensorResponse esphome::api::LockCommandRequest esphome::api::LockStateResponse esphome::api::MediaPlayerCommandRequest esphome::api::MediaPlayerStateResponse esphome::api::NumberCommandRequest esphome::api::NumberStateResponse esphome::api::PingRequest esphome::api::PingResponse esphome::api::SelectCommandRequest esphome::api::SelectStateResponse esphome::api::SensorStateResponse esphome::api::SubscribeBluetoothLEAdvertisementsRequest esphome::api::SubscribeHomeassistantServicesRequest esphome::api::SubscribeHomeAssistantStateResponse esphome::api::SubscribeHomeAssistantStatesRequest esphome::api::SubscribeLogsRequest esphome::api::SubscribeLogsResponse esphome::api::SubscribeStatesRequest esphome::api::SwitchCommandRequest esphome::api::SwitchStateResponse esphome::api::TextSensorStateResponse

Public Member Functions

virtual ~ProtoMessage ()=default
 
virtual void encode (ProtoWriteBuffer buffer) const =0
 
void decode (const uint8_t *buffer, size_t length)
 
std::string dump () const
 
virtual void dump_to (std::string &out) const =0
 

Protected Member Functions

virtual bool decode_varint (uint32_t field_id, ProtoVarInt value)
 
virtual bool decode_length (uint32_t field_id, ProtoLengthDelimited value)
 
virtual bool decode_32bit (uint32_t field_id, Proto32Bit value)
 
virtual bool decode_64bit (uint32_t field_id, Proto64Bit value)
 

Detailed Description

Definition at line 273 of file proto.h.

Constructor & Destructor Documentation

◆ ~ProtoMessage()

virtual esphome::api::ProtoMessage::~ProtoMessage ( )
virtualdefault

Member Function Documentation

◆ decode()

void esphome::api::ProtoMessage::decode ( const uint8_t *  buffer,
size_t  length 
)

Definition at line 9 of file proto.cpp.

◆ decode_32bit()

virtual bool esphome::api::ProtoMessage::decode_32bit ( uint32_t  field_id,
Proto32Bit  value 
)
inlineprotectedvirtual

Reimplemented in esphome::api::MediaPlayerCommandRequest, esphome::api::MediaPlayerStateResponse, esphome::api::ListEntitiesMediaPlayerResponse, esphome::api::ButtonCommandRequest, esphome::api::ListEntitiesButtonResponse, esphome::api::LockCommandRequest, esphome::api::LockStateResponse, esphome::api::ListEntitiesLockResponse, esphome::api::SelectCommandRequest, esphome::api::SelectStateResponse, esphome::api::ListEntitiesSelectResponse, esphome::api::NumberCommandRequest, esphome::api::NumberStateResponse, esphome::api::ListEntitiesNumberResponse, esphome::api::ClimateCommandRequest, esphome::api::ClimateStateResponse, esphome::api::ListEntitiesClimateResponse, esphome::api::CameraImageResponse, esphome::api::ListEntitiesCameraResponse, esphome::api::ExecuteServiceRequest, esphome::api::ExecuteServiceArgument, esphome::api::ListEntitiesServicesResponse, esphome::api::GetTimeResponse, esphome::api::TextSensorStateResponse, esphome::api::ListEntitiesTextSensorResponse, esphome::api::SwitchCommandRequest, esphome::api::SwitchStateResponse, esphome::api::ListEntitiesSwitchResponse, esphome::api::SensorStateResponse, esphome::api::ListEntitiesSensorResponse, esphome::api::LightCommandRequest, esphome::api::LightStateResponse, esphome::api::ListEntitiesLightResponse, esphome::api::FanCommandRequest, esphome::api::FanStateResponse, esphome::api::ListEntitiesFanResponse, esphome::api::CoverCommandRequest, esphome::api::CoverStateResponse, esphome::api::ListEntitiesCoverResponse, esphome::api::BinarySensorStateResponse, and esphome::api::ListEntitiesBinarySensorResponse.

Definition at line 286 of file proto.h.

◆ decode_64bit()

virtual bool esphome::api::ProtoMessage::decode_64bit ( uint32_t  field_id,
Proto64Bit  value 
)
inlineprotectedvirtual

Definition at line 287 of file proto.h.

◆ decode_length()

virtual bool esphome::api::ProtoMessage::decode_length ( uint32_t  field_id,
ProtoLengthDelimited  value 
)
inlineprotectedvirtual

Reimplemented in esphome::api::BluetoothLEAdvertisementResponse, esphome::api::BluetoothServiceData, esphome::api::MediaPlayerCommandRequest, esphome::api::ListEntitiesMediaPlayerResponse, esphome::api::ListEntitiesButtonResponse, esphome::api::LockCommandRequest, esphome::api::ListEntitiesLockResponse, esphome::api::SelectCommandRequest, esphome::api::SelectStateResponse, esphome::api::ListEntitiesSelectResponse, esphome::api::ListEntitiesNumberResponse, esphome::api::ClimateCommandRequest, esphome::api::ClimateStateResponse, esphome::api::ListEntitiesClimateResponse, esphome::api::CameraImageResponse, esphome::api::ListEntitiesCameraResponse, esphome::api::ExecuteServiceRequest, esphome::api::ExecuteServiceArgument, esphome::api::ListEntitiesServicesResponse, esphome::api::ListEntitiesServicesArgument, esphome::api::HomeAssistantStateResponse, esphome::api::SubscribeHomeAssistantStateResponse, esphome::api::HomeassistantServiceResponse, esphome::api::HomeassistantServiceMap, esphome::api::SubscribeLogsResponse, esphome::api::TextSensorStateResponse, esphome::api::ListEntitiesTextSensorResponse, esphome::api::ListEntitiesSwitchResponse, esphome::api::ListEntitiesSensorResponse, esphome::api::LightCommandRequest, esphome::api::LightStateResponse, esphome::api::ListEntitiesLightResponse, esphome::api::ListEntitiesFanResponse, esphome::api::ListEntitiesCoverResponse, esphome::api::ListEntitiesBinarySensorResponse, esphome::api::DeviceInfoResponse, esphome::api::ConnectRequest, esphome::api::HelloResponse, and esphome::api::HelloRequest.

Definition at line 285 of file proto.h.

◆ decode_varint()

virtual bool esphome::api::ProtoMessage::decode_varint ( uint32_t  field_id,
ProtoVarInt  value 
)
inlineprotectedvirtual

Reimplemented in esphome::api::BluetoothLEAdvertisementResponse, esphome::api::BluetoothServiceData, esphome::api::MediaPlayerCommandRequest, esphome::api::MediaPlayerStateResponse, esphome::api::ListEntitiesMediaPlayerResponse, esphome::api::ListEntitiesButtonResponse, esphome::api::LockCommandRequest, esphome::api::LockStateResponse, esphome::api::ListEntitiesLockResponse, esphome::api::SelectStateResponse, esphome::api::ListEntitiesSelectResponse, esphome::api::NumberStateResponse, esphome::api::ListEntitiesNumberResponse, esphome::api::ClimateCommandRequest, esphome::api::ClimateStateResponse, esphome::api::ListEntitiesClimateResponse, esphome::api::CameraImageRequest, esphome::api::CameraImageResponse, esphome::api::ListEntitiesCameraResponse, esphome::api::ExecuteServiceArgument, esphome::api::ListEntitiesServicesArgument, esphome::api::HomeassistantServiceResponse, esphome::api::SubscribeLogsResponse, esphome::api::SubscribeLogsRequest, esphome::api::TextSensorStateResponse, esphome::api::ListEntitiesTextSensorResponse, esphome::api::SwitchCommandRequest, esphome::api::SwitchStateResponse, esphome::api::ListEntitiesSwitchResponse, esphome::api::SensorStateResponse, esphome::api::ListEntitiesSensorResponse, esphome::api::LightCommandRequest, esphome::api::LightStateResponse, esphome::api::ListEntitiesLightResponse, esphome::api::FanCommandRequest, esphome::api::FanStateResponse, esphome::api::ListEntitiesFanResponse, esphome::api::CoverCommandRequest, esphome::api::CoverStateResponse, esphome::api::ListEntitiesCoverResponse, esphome::api::BinarySensorStateResponse, esphome::api::ListEntitiesBinarySensorResponse, esphome::api::DeviceInfoResponse, esphome::api::ConnectResponse, and esphome::api::HelloResponse.

Definition at line 284 of file proto.h.

◆ dump()

std::string esphome::api::ProtoMessage::dump ( ) const

Definition at line 83 of file proto.cpp.

◆ dump_to()

virtual void esphome::api::ProtoMessage::dump_to ( std::string &  out) const
pure virtual

Implemented in esphome::api::BluetoothLEAdvertisementResponse, esphome::api::BluetoothServiceData, esphome::api::SubscribeBluetoothLEAdvertisementsRequest, esphome::api::MediaPlayerCommandRequest, esphome::api::MediaPlayerStateResponse, esphome::api::ListEntitiesMediaPlayerResponse, esphome::api::ButtonCommandRequest, esphome::api::ListEntitiesButtonResponse, esphome::api::LockCommandRequest, esphome::api::LockStateResponse, esphome::api::ListEntitiesLockResponse, esphome::api::SelectCommandRequest, esphome::api::SelectStateResponse, esphome::api::ListEntitiesSelectResponse, esphome::api::NumberCommandRequest, esphome::api::NumberStateResponse, esphome::api::ListEntitiesNumberResponse, esphome::api::ClimateCommandRequest, esphome::api::ClimateStateResponse, esphome::api::ListEntitiesClimateResponse, esphome::api::CameraImageRequest, esphome::api::CameraImageResponse, esphome::api::ListEntitiesCameraResponse, esphome::api::ExecuteServiceRequest, esphome::api::ExecuteServiceArgument, esphome::api::ListEntitiesServicesResponse, esphome::api::ListEntitiesServicesArgument, esphome::api::GetTimeResponse, esphome::api::GetTimeRequest, esphome::api::HomeAssistantStateResponse, esphome::api::SubscribeHomeAssistantStateResponse, esphome::api::SubscribeHomeAssistantStatesRequest, esphome::api::HomeassistantServiceResponse, esphome::api::HomeassistantServiceMap, esphome::api::SubscribeHomeassistantServicesRequest, esphome::api::SubscribeLogsResponse, esphome::api::SubscribeLogsRequest, esphome::api::TextSensorStateResponse, esphome::api::ListEntitiesTextSensorResponse, esphome::api::SwitchCommandRequest, esphome::api::SwitchStateResponse, esphome::api::ListEntitiesSwitchResponse, esphome::api::SensorStateResponse, esphome::api::ListEntitiesSensorResponse, esphome::api::LightCommandRequest, esphome::api::LightStateResponse, esphome::api::ListEntitiesLightResponse, esphome::api::FanCommandRequest, esphome::api::FanStateResponse, esphome::api::ListEntitiesFanResponse, esphome::api::CoverCommandRequest, esphome::api::CoverStateResponse, esphome::api::ListEntitiesCoverResponse, esphome::api::BinarySensorStateResponse, esphome::api::ListEntitiesBinarySensorResponse, esphome::api::SubscribeStatesRequest, esphome::api::ListEntitiesDoneResponse, esphome::api::ListEntitiesRequest, esphome::api::DeviceInfoResponse, esphome::api::DeviceInfoRequest, esphome::api::PingResponse, esphome::api::PingRequest, esphome::api::DisconnectResponse, esphome::api::DisconnectRequest, esphome::api::ConnectResponse, esphome::api::ConnectRequest, esphome::api::HelloResponse, and esphome::api::HelloRequest.

◆ encode()

virtual void esphome::api::ProtoMessage::encode ( ProtoWriteBuffer  buffer) const
pure virtual

Implemented in esphome::api::BluetoothLEAdvertisementResponse, esphome::api::BluetoothServiceData, esphome::api::SubscribeBluetoothLEAdvertisementsRequest, esphome::api::MediaPlayerCommandRequest, esphome::api::MediaPlayerStateResponse, esphome::api::ListEntitiesMediaPlayerResponse, esphome::api::ButtonCommandRequest, esphome::api::ListEntitiesButtonResponse, esphome::api::LockCommandRequest, esphome::api::LockStateResponse, esphome::api::ListEntitiesLockResponse, esphome::api::SelectCommandRequest, esphome::api::SelectStateResponse, esphome::api::ListEntitiesSelectResponse, esphome::api::NumberCommandRequest, esphome::api::NumberStateResponse, esphome::api::ListEntitiesNumberResponse, esphome::api::ClimateCommandRequest, esphome::api::ClimateStateResponse, esphome::api::ListEntitiesClimateResponse, esphome::api::CameraImageRequest, esphome::api::CameraImageResponse, esphome::api::ListEntitiesCameraResponse, esphome::api::ExecuteServiceRequest, esphome::api::ExecuteServiceArgument, esphome::api::ListEntitiesServicesResponse, esphome::api::ListEntitiesServicesArgument, esphome::api::GetTimeResponse, esphome::api::GetTimeRequest, esphome::api::HomeAssistantStateResponse, esphome::api::SubscribeHomeAssistantStateResponse, esphome::api::SubscribeHomeAssistantStatesRequest, esphome::api::HomeassistantServiceResponse, esphome::api::HomeassistantServiceMap, esphome::api::SubscribeHomeassistantServicesRequest, esphome::api::SubscribeLogsResponse, esphome::api::SubscribeLogsRequest, esphome::api::TextSensorStateResponse, esphome::api::ListEntitiesTextSensorResponse, esphome::api::SwitchCommandRequest, esphome::api::SwitchStateResponse, esphome::api::ListEntitiesSwitchResponse, esphome::api::SensorStateResponse, esphome::api::ListEntitiesSensorResponse, esphome::api::LightCommandRequest, esphome::api::LightStateResponse, esphome::api::ListEntitiesLightResponse, esphome::api::FanCommandRequest, esphome::api::FanStateResponse, esphome::api::ListEntitiesFanResponse, esphome::api::CoverCommandRequest, esphome::api::CoverStateResponse, esphome::api::ListEntitiesCoverResponse, esphome::api::BinarySensorStateResponse, esphome::api::ListEntitiesBinarySensorResponse, esphome::api::SubscribeStatesRequest, esphome::api::ListEntitiesDoneResponse, esphome::api::ListEntitiesRequest, esphome::api::DeviceInfoResponse, esphome::api::DeviceInfoRequest, esphome::api::PingResponse, esphome::api::PingRequest, esphome::api::DisconnectResponse, esphome::api::DisconnectRequest, esphome::api::ConnectResponse, esphome::api::ConnectRequest, esphome::api::HelloResponse, and esphome::api::HelloRequest.


The documentation for this class was generated from the following files: