Sink devices for the testbed. Sink devices are devices that sink data (i.e SLM, DM, etc). A devsink program interfaces the hardware device and pushes images from the shared memory file to the hardware device. All sink device shared memory file headers contain the following keywords.
| Keyword | Type | Python type | Description |
|---|---|---|---|
| KIND | STRING | str | Device kind (DM/SLM) |
| SN | STRING | str | Serial number (8 char value) |
| PXMAX | DOUBLE | float | Actuator max |
| FULL.W | LONG | int | Modulator width (px) |
| FULL.H | LONG | int | Modulator height (px) |
| PORT | LONG | int | Link port (-1 if no control link) |
| RADMAX | LONG | int | Maximum Radius (px) |
| RADIUS | DOUBLE | float | Radius (px) |
| CENTER.X | DOUBLE | float | Center x (px) |
| CENTER.Y | DOUBLE | float | Center y (px) |
| FRMRATE | DOUBLE | float | Frame rate (fps) |
A devsink program also establishes a control link (a zmq interface) to send/receive additional (non-image) control data to/from the hardware.
Control data is sent as TOML and varies for each device.
The sync message will show the available control data.
Example transactions:
| Send | Receive | Description |
|---|---|---|
settings = "sync" |
[settings]
radius = 35.0
[settings.center]
y = 200.0
x = 200.0 |
Get settings |
[settings]
radius = 100 |
[settings]
radius = 100 |
Set the Radius |
[settings.nudge]
x = 0
y = 1 |
[settings.center]
y = 200.0
x = 201.0 |
Move the control region vertically or horizontally |
- stbsink: Dummy modulator data sink.
- lcdsink: LCD SLM data sink.
devsink/src$ meson setup builddir
devsink/src$ meson compile -C builddir/devsink/src$ ./builddir/stbsink/stbsink [-p 8101] [-c 360,360] [-r 160]
devsink/src$ ./builddir/lcdsink/lcdsink [-p 8102] [-c 817,898] [-r 160]You may have to suppress the "Application not responding" dialog in gnome with
gsettings set org.gnome.mutter check-alive-timeout 0