- Overview
- decode_entity_location_protobuf
decode_entity_location_protobuf
Part of Protobuf helpers in the Python API reference.
Related guidance: how-to/protobuf-decode, reference/wire-formats.
Runnable examples: decode_public_protobuf.py.
from picogrid_ecn_client import decode_entity_location_protobufDecode one entity-location update from the supported protobuf subset.
def decode_entity_location_protobuf( payload: bytes, *, integration: str, maximum_payload_size: int = 1048576,) -> LocationEventParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| payload | bytes | — | Serialized protobuf payload containing the entity UUID and location. |
| integration | str | — | Integration name carried by the source topic. |
| maximum_payload_size | int | 1048576 | Inclusive payload limit in bytes, from 1024 through 16777216. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| LocationEvent | The decoded typed location event. |
Raises
Section titled “Raises”| Exception | Description |
|---|---|
| ProtocolError | If the payload is malformed, lacks required fields, or carries an invalid entity UUID. |
| ResourceLimitError | If the payload exceeds maximum_payload_size bytes. |
| ValidationError | If an input or decoded public field is invalid. |
Version 0.2.0 · branch main
