Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit.
More...
#include <proto.h>
|
| static optional< ProtoVarInt > | parse (const uint8_t *buffer, uint32_t len, uint32_t *consumed) |
| | Parse a varint from buffer. consumed must be a valid pointer (not null).
|
| |
Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit.
Definition at line 102 of file proto.h.
◆ ProtoVarInt() [1/2]
| esphome::api::ProtoVarInt::ProtoVarInt |
( |
| ) |
|
|
inline |
◆ ProtoVarInt() [2/2]
| esphome::api::ProtoVarInt::ProtoVarInt |
( |
uint64_t | value | ) |
|
|
inlineexplicit |
◆ as_bool()
| bool esphome::api::ProtoVarInt::as_bool |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_int32()
| int32_t esphome::api::ProtoVarInt::as_int32 |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_int64()
| int64_t esphome::api::ProtoVarInt::as_int64 |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_sint32()
| int32_t esphome::api::ProtoVarInt::as_sint32 |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_sint64()
| int64_t esphome::api::ProtoVarInt::as_sint64 |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_uint16()
| uint16_t esphome::api::ProtoVarInt::as_uint16 |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_uint32()
| uint32_t esphome::api::ProtoVarInt::as_uint32 |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_uint64()
| uint64_t esphome::api::ProtoVarInt::as_uint64 |
( |
| ) |
const |
|
inlineconstexpr |
◆ parse()
| static optional< ProtoVarInt > esphome::api::ProtoVarInt::parse |
( |
const uint8_t * | buffer, |
|
|
uint32_t | len, |
|
|
uint32_t * | consumed ) |
|
inlinestatic |
Parse a varint from buffer. consumed must be a valid pointer (not null).
Definition at line 108 of file proto.h.
◆ parse_wide()
| optional< ProtoVarInt > esphome::api::ProtoVarInt::parse_wide |
( |
const uint8_t * | buffer, |
|
|
uint32_t | len, |
|
|
uint32_t * | consumed, |
|
|
uint32_t | result32 ) |
|
staticprotected |
Continue parsing varint bytes 4-9 with 64-bit arithmetic.
Separated to keep 64-bit shift code (__ashldi3 on 32-bit platforms) out of the common path.
Definition at line 11 of file proto.cpp.
◆ value_ [1/2]
| uint64_t esphome::api::ProtoVarInt::value_ |
|
protected |
◆ value_ [2/2]
| uint32_t esphome::api::ProtoVarInt::value_ |
|
protected |
The documentation for this class was generated from the following files: