CSCP Module#

SPDX-FileCopyrightText: 2024 DESY and the Constellation authors SPDX-License-Identifier: EUPL-1.2

Module implementing the Constellation Satellite Control Protocol.

class core.cscp.CommandTransmitter(name: str, socket: Socket)#

Bases: object

Class implementing Constellation Satellite Control Protocol.

close() None#
get_message(flags: int = 0) CSCP1Message | None#

Retrieve and return a CSCP1Message.

Returns None if no request is waiting and flags==zmq.NOBLOCK.

Raises RuntimeError if message verb is malformed.

request_get_response(command: str, payload: Any = None, tags: dict[str, Any] | None = None) CSCP1Message#

Send a command request to a Satellite and return response.

send_reply(response: str, type: Type, payload: Any = None, tags: dict[str, Any] | None = None) None#

Send a reply to a previous command with an optional payload.

send_request(command: str, payload: Any = None, tags: dict[str, Any] | None = None) None#

Send a command request to a Satellite with an optional payload.