ZeroMQ IO Interface

class larpix.io.zmq_io.ZMQ_IO(address)[source]

The ZMQ_IO object interfaces with the Bern LArPix v2 module using the ZeroMQ communications protocol.

This object handles the required communications, and also has extra methods for additional functionality, including system reset, packet count, clock frequency, and more.

static decode(msgs)[source]

Convert a list ZMQ messages into packets

static encode(packets)[source]

Encode a list of packets into ZMQ messages

reset()[source]

Send a reset pulse to the LArPix ASICs.

set_clock(freq_khz)[source]

Set the LArPix CLK2X freqency (in kHz).

set_testpulse_freq(divisor)[source]

Set the testpulse frequency, computed by dividing the CLK2X frequency by divisor.

get_packet_count(io_channel)[source]

Get the number of packets received, as determined by the number of UART “start” bits processed.

ping()[source]

Send a ping to the system and return True if the first two bytes of the response are b’OK’.