libmuscle.mcp.protocol module

class libmuscle.mcp.protocol.AgentCommandType(*values)[source]

Bases: Enum

Identifier for different types of commands

These are requested from the manager by the agent, and tell it what to do. Part of the MUSCLE Agent Protocol, used in the response to RequestType.GET_COMMAND.

CANCEL_ALL = 2
SHUTDOWN = 3
START = 1
class libmuscle.mcp.protocol.RequestType(*values)[source]

Bases: Enum

Identifier for different types of request

The MUSCLE Communication Protocol (MCP) defines a simple Remote Procedure Call protocol in which a request is sent to the server and a response is sent back to the calling client. In MCP, both of these are chunks of bytes.

The MUSCLE Manager Protocol, MUSCLE Peer Protocol and MUSCLE Agent Protocol define the encoded messages sent in those chunks, using MsgPack encoding. To distinguish different kinds of requests, a request type identifier is used, as represented by this class.

DEREGISTER_INSTANCE = 3
GET_CHECKPOINT_INFO = 8
GET_COMMAND = 42
GET_NEXT_MESSAGE = 21
GET_PEERS = 2
GET_SETTINGS = 4
IS_DEADLOCKED = 11
REGISTER_INSTANCE = 1
REPORT_RESOURCES = 41
REPORT_RESULT = 43
SUBMIT_LOG_MESSAGE = 5
SUBMIT_PROFILE_EVENTS = 6
SUBMIT_SNAPSHOT = 7
WAITING_FOR_RECEIVE = 9
WAITING_FOR_RECEIVE_DONE = 10
class libmuscle.mcp.protocol.ResponseType(*values)[source]

Bases: Enum

Identifier for different types of response

MCP Responses may be of different kinds, as described by this class. These are currently only used by the MUSCLE Manager Protocol.

ERROR = 1
PENDING = 2
SUCCESS = 0