ZeroMQ IO Interface

class larpix.io.zmq_io.ZMQ_IO(config_filepath=None, **kwargs)[source]

The ZMQ_IO object interfaces with the Bern LArPix v2 module using the ZeroMQ communications protocol. This class wraps the io.multizmq_io.MultiZMQ_IO class, and enables a slightly simpler chip key formatting in the special case that you are only interfacing with a single daq board.

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

load(filepath=None)[source]

Loads a specified IO configuration

Parameters:filepath – path to io configuration file (JSON)
decode(msgs, **kwargs)[source]

Convert a list ZMQ messages into packets

reset()[source]

Send a reset pulse to the LArPix ASICs.

set_clock(freq_khz)[source]

Set the LArPix CLK2X freqency (in kHz).

Parameters:freq_khz – CLK2X freq in khz to set
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’.