Protocol Module#
SPDX-FileCopyrightText: 2024 DESY and the Constellation authors SPDX-License-Identifier: EUPL-1.2
Module implementing the Constellation communication protocols.
- class core.protocol.MessageHeader(name: str, protocol: Protocol)#
Bases:
object
Class implementing a Constellation message header.
- decode(header: Any) Tuple[str, Timestamp, dict[str, Any] | None] | Tuple[str, int, int, dict[str, Any] | None] #
Decode header string and return host, timestamp and meta map.
- encode(meta: dict[str, Any] | None = None, **kwargs: Any) memoryview #
Generate and return a header as list.
Additional keyword arguments are required for protocols specifying additional fields.