<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Communication layer on Quatm</title><link>https://www.quatm.com/en/docs/communication/</link><description>Recent content in Communication layer on Quatm</description><generator>Hugo</generator><language>en</language><atom:link href="https://www.quatm.com/en/docs/communication/index.xml" rel="self" type="application/rss+xml"/><item><title>Clients</title><link>https://www.quatm.com/en/docs/communication/clients/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.quatm.com/en/docs/communication/clients/</guid><description>Overview quatm/servers/clients.py provides the communication clients: the connection target is determined by the central configuration (Data / Image / Command Hub). GenericClient offers the standard send/receive interface and is suited to small data (&amp;lt;10k); use ImageClient for large payloads such as images.
Client classes Class Connection Description GenericClient Determined by configuration General send/receive (including numpy arrays), subscribe/unsubscribe DataClient Data Hub Publish and subscribe ordinary data ImageClient Image Hub Sending large image-scale data (send takes a numpy array directly) CommandClient Command Hub Sends control commands to drivers (the command name is folded into the topic) NpEncoder — JSON serialization of numpy types Key methods (GenericClient) Method Description send(datadict, arr=None) Publish data (optionally with one numpy array) recv() Receive one frame: (topic, dict[, array]); returns None on timeout subscribe / unsubscribe Subscribe / unsubscribe a channel has_new_data Non-blocking check for new data close Close the PUB/SUB socket (idempotent) Usage from quatm.</description></item><item><title>Property tree</title><link>https://www.quatm.com/en/docs/communication/properties/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.quatm.com/en/docs/communication/properties/</guid><description>Overview quatm/servers/properties.py provides the property tree (Properties): it manages the configuration and properties of the control centre and maintains a synchronized copy of the property dictionary. A local set / get publishes to the Property Hub, and central changes are pushed back to the local copy. Properties are addressed like a file system (for example Drivers/xxx, or an absolute path starting with /).
Key methods Method Description set(key, value) Set a property and publish the change to the Property Hub get(key, default=.</description></item><item><title>Data management</title><link>https://www.quatm.com/en/docs/communication/datasummary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.quatm.com/en/docs/communication/datasummary/</guid><description>Overview quatm/servers/datamgr.py provides data management (DataSummary): it aggregates the data streams of several input channels and assembles them into a complete dictionary for each run. Incoming data is first accumulated in incompleteData, and once the data of all subscribed channels has arrived the whole record is moved to completeData; if some data is still missing when the run ends and times out, the missing parts are filled with zeros.</description></item><item><title>Messaging</title><link>https://www.quatm.com/en/docs/communication/messageclient/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.quatm.com/en/docs/communication/messageclient/</guid><description>Overview quatm/servers/messageclient.py provides the messaging system: MessageClient is the standardized message stream client, sending messages with a timestamp and originating file to the Message Hub (PUB). Everyday code should generally not construct it directly but use the module-level send functions instead.
Send functions Function Description send_info(msg) Info level: enters the message stream as an ordinary notification send_warning(msg) Warning level: enters the message stream and raises a warning notification send_error(msg) Error level: enters the message stream and raises an error notification send_debug(msg) Debug level: shown only on the debug channel Usage from quatm.</description></item><item><title>Configuration and property persistence</title><link>https://www.quatm.com/en/docs/communication/configuration-and-property-persistence/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.quatm.com/en/docs/communication/configuration-and-property-persistence/</guid><description>Modules Module Function configreader.ConfigReader Read-only wrapper: reads configfile.json (getConfiguration()) configreader.Config() Reads configfile.json and returns the configuration dictionary configreader.Properties() Reads the properties file properties.json and returns a dictionary propertylogger.run_propertylogger() Property tree persistence + INIT acknowledgement (Property Logger service) datalogger.DataStreamLogger Monitors active data streams and writes them into the property tree imagelogger.ImageStreamLogger Monitors active image streams and writes them into the property tree Usage from quatm.servers.configreader import ConfigReader cfg = ConfigReader() config = cfg.</description></item><item><title>Peripheral service modules</title><link>https://www.quatm.com/en/docs/communication/peripheral-service-modules/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.quatm.com/en/docs/communication/peripheral-service-modules/</guid><description>Service list Module Function influxdb InfluxDB client wrapper: hardware status writes (data2db) and historical queries (query_data); can run as an RPC service notifications Notification push: configuration service, push_message push, post_to_mattermost compatibility entry point image_network_server Image network service: flushes the latest frame of each image stream to a Web figure webhub Server entry point of the Web remote control platform (quatm.web; takes host/port from the Servers section of configfile) xsub_xpub XSUB/XPUB forwarding server (run_server) experiment_status Experiment status monitoring / early-warning notifications propertylogger / datalogger / imagelogger Property tree persistence and monitoring of active data/image streams (see Configuration system) Usage from quatm.</description></item></channel></rss>