This is the Parameter service to use as a Crosslab SOA service. It allows to transmit variouse numeric parameters / values between different devices.
Parameter Producer
service = ParameterService__Producer(
"position",
[
{"name": "x", "unit": "m", "minimum": -1.2, "maximum": 1.2},
{"name": "y", "unit": "m", "minimum": -1.2, "maximum": 1.2},
{"name": "z", "unit": "m", "minimum": 0, "maximum": 0.5},
],
)
deviceHandler.add_service(service)
When any parameter changes (or is initialized) the service inform the service via:
await service.updateParameter("x", 0.5)
Parameter Consumer
service = ParameterService__Consumer(
"position",
[
{"name": "x", "unit": "m"},
{"name": "y", "unit": "m"},
{"name": "z", "unit": "m", "minimum": 0, "maximum": 1},
{"name": "ANY", "unit": "ANY"},
],
)
deviceHandler.add_service(service)
The special name / unit “ANY” allows to receive any parameter. When a new parameter gets connected / disconnect the service will emit the following callback:
def parameterListChanged(event: ParameterListChangedEvent):
print(event)
# event.parameters is a list of all parameters
service.on("parameterListChanged", parameterListChanged)
When a parameter changes the service will emit the following callback:
def parameterChanged(event: ParameterChangedEvent):
print(event)
# event.parameter is the changed parameter
service.on("parameterChanged", parameterChanged)
Metadata
Release files for crosslab-soa-service-parameter 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crosslab_soa_service_parameter-0.4.0.tar.gz | 3.5 kB | Without provenance | Details for crosslab_soa_service_parameter-0.4.0.tar.gz |
Release files / crosslab_soa_service_parameter-0.4.0.tar.gz
| Download URL | crosslab_soa_service_parameter-0.4.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ccb0fa21aed4d72651069202b45a2d765a3d9541507b7d0af9da8497dbf50e4
|
|
BLAKE2b-256 checksum How to use checksums |
ffe670ed3fb854a2dddc3f9876a4c418705ec9f572e0110fab9015a78e4622c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for crosslab-soa-service-parameter 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.