A request parser to simplify communication with physics-lab devices
Project description
LabAutomation Communication Request Manager
In the context of a physics lab automation project, this package aims to simplify communication with different devices. Communication is based on 0mq and json-based messages. This package is meant to be used in combination with a 0mq-based device server.
Sending a request
The only relevant function to use is ReqParser.request(): Parameters:
- device: to be addressed device name as string (defined in Device Server)
- action: requested action as string ("connect", "disconnect", "test", arbitrary)
- payload: values to be passed for arbitrary action
Returns:
- status: True (successful) or False (communication request failed)
- info: string of more detailed information
Including / Replacing Communication Manager
By using the following import line, the package can be used: from la_com_request_parser.com_request_parser import ReqParser
If you previously used the Communication Manager and it is deeply rooted in the project you can just import the following line to maintain full functionality: from la_com_request_parser.com_request_parser import ReqParser as CommunicationManager
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for la_com_request_parser-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d614bfe020253fbe99bc25eb0b4c64316c3ccf7598e3cf5f3169968c3121bec |
|
MD5 | c3f66dec02ece727ad255c5eca6db4ca |
|
BLAKE2b-256 | 92d6bd9851d7e64977376ffb0b4005e7a5b92e45d24b6ed76973f4d97c10eb5d |
Hashes for la_com_request_parser-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc1a29c5930223abbd211f6e68a6516b1c51a47cea96641ab4ecbbd0768918dc |
|
MD5 | c011ac487e4b4bc06ce222ef5d4bbed9 |
|
BLAKE2b-256 | 03934dbc29dcc4781dfe01a9ca97eb6a5ab11e204e41cec8fea4a6b4e08bc944 |