Middlewares
Small helpers to parse the binary frames in the workers.
Contrast
parse(data)
Parses a contrast packet, which returns a dict, depending on the status of contrast
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
StreamData
|
a frame comming from contrast |
required |
Returns:
Type | Description |
---|---|
UnionType
|
a ContrastPacket containing a.o. the current status |
Source code in dranspose/middlewares/contrast.py
Xspress3
parse(data)
Parses a Xspress3 packet, which either gives a start/end message or a tuple with a spectra array
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
StreamData
|
a frame comming from the Xspress3 tango device |
required |
Returns:
Type | Description |
---|---|
UnionType
|
an XspressPacket |