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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2069ab17ae03a7c43aed3a4a1d2e6406db9b46dc28b1e44331681aa124bcb465 |
|
MD5 | 437452e709bc8cd454d78d2794a79435 |
|
BLAKE2b-256 | 20eb17064c63f74ba21167d8eadd51c8c22fb0c1e11c9eef0fd5d1178becc746 |
Hashes for la_com_request_parser-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3d8c39e26a75c14214c4cf0132f0f21d091df8e4b2d5e5a57a7ec7a320e6dcd |
|
MD5 | 53652b4243b9ae60630ce77a5ed95a7f |
|
BLAKE2b-256 | 9d183a22c2a81be30f2c0f3c081ad4ec724b3af32e468af2386580c3b48e7e81 |