mxcubecore.ipc.server¶
IPCServer: a HardwareObject that exposes a whitelist of other HardwareObjects’ methods to a single external client, over either a JSON-RPC/TCP or a NanoMQ (MQTT) transport.
Configured like any other beamline object (see mxcubecore/configuration/ mockup/ipc-server-mockup.yml for an example) and resolves whitelisted targets through the standard mxcubecore.HardwareRepository.beamline singleton, exactly like any other role lookup in this codebase.
Classes
|
Beamline-configured IPC server. |
- class mxcubecore.ipc.server.IPCServer(name: str)[source]¶
Bases:
HardwareObjectBeamline-configured IPC server. See IPC_FORMAT.md for the wire format and mxcubecore/ipc/whitelist.py for the whitelist rules.
- Parameters:
name (str)
- class HOConfig(*, transport: str = 'jsonrpc', host: str = '127.0.0.1', port: int = 9999, tls_cert_path: str | None = None, tls_key_path: str | None = None, broker_host: str = 'localhost', broker_port: int = 1883, topic_prefix: str = 'mxcube/ipc', tls_ca_cert_path: str | None = None, auth_token: str | None = None, allowed_methods: List[str] = [], events: List[Dict[str, Any]] = [], allow_debug_calls: bool = False, **extra_data: Any)[source]¶
Bases:
HOConfig- Parameters:
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].