VDIFPacker — Pipeline
Architecture
graph TD
recv["mkrecv\n(SPEAD2 capture)"]
ibuf["Input DADA\nring buffer"]
packer["vdif_packer binary\n(FFT + VDIF pack)"]
mq["POSIX message queue\n(mq_control)"]
disk["Disk writer"]
udp["UDP sender\n(jive5ab)"]
recv -->|"float-32 heaps"| ibuf
ibuf --> packer
mq -->|"start/stop recording"| packer
packer --> disk
packer --> udp
The pipeline runs two processes sharing one PSRDADA ring buffer:
mkrecv captures
DigitalDownConverter:1SPEAD2 heaps from the network and writes them into the input ring buffer.vdif_packer reads blocks from the input buffer, applies a polyphase FFT (
nfftpoints,naccumulateaverages), and packs the result into VDIF frames. Recording is gated by a POSIX message queue (mq_control); the Field System Interface sends start/stop messages to this queue during an observation.
Output is directed to disk, to a UDP destination (e.g. jive5ab on port 4991), or both,
depending on output_type.
Per-channel mean and standard deviation are sampled from the vdif_packer message server and exposed as KATCP sensors for signal quality monitoring.
KATCP State Machine
stateDiagram-v2
[*] --> idle
idle --> configuring : configure
configuring --> configured : success
configuring --> error : failure
configured --> capturing : capture_start
capturing --> running : internal
running --> capturing : capture_stop
capturing --> configured : stop
configured --> idle : deconfigure
error --> idle : reset
Configuration
Key |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
|
|
str |
|
|
|
str |
|
|
|
list |
|
Options are ‘disk’ and/or ‘network’. 1. Use ‘disk’ to store the data. 2. Use ‘network’ to stream UDP VDIF frames. Note: When not specified the pipeline is processing without output |
|
str |
`` |
|
|
bool |
|
|
|
str |
|
Comma-separated list of VDIF thread IDs, e.g. “10,11,12”. All threads carry NCHANS / nthreads channels (evenly distributed). Passed as –thread_ids to the binary. |
|
int |
|
|
|
str |
|
POSIX message queue name for start/stop recording control, e.g. “/vdif_control_message_server”. |
|
float |
|
|
|
dict |
|
|
|
int |
|
|
|
int |
|
|
|
bool |
|
|
|
dict |
|
|
|
int |
|
Notes
thread_idsmust be a comma-separated string of VDIF thread IDs matching the number of input channels divided by the number of threads.mq_controlis the POSIX message queue name; the Field System Interface writes to this queue to gate recording.output_typeaccepts"disk","network", or both.udp.dest_portdefaults to4991, which is jive5ab’s standard VDIF UDP receive port.nfftandnaccumulatecontrol the spectral transform applied before VDIF packing.
KATCP Sensors
Sensor |
Type |
Description |
|---|---|---|
|
string |
State machine state |
|
string |
Active configuration as JSON |
|
string |
Package version |
|
string |
edd-core package version |
|
string |
Per-channel mean (JSON array) |
|
string |
Per-channel standard deviation (JSON array) |
|
string |
|
|
string |
|
|
string |
List of currently open output files |