Multi-ZeroMQ IO Interface¶
-
class
larpix.io.multizmq_io.
MultiZMQ_IO
(config_filepath=None, miso_map=None, mosi_map=None)[source]¶ The MultiZMQ_IO object interfaces with a network of Bern LArPix v2 modules using Igor’s 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.
By default, when creating a MultiZMQ_IO object, the
io/default.json
configuration will attempt to be loaded unless otherwise specified. The path relative to the pwd is checked first, followed by the path of the larpix-control installation.-
send
(packets)[source]¶ Function for sending larpix packet objects
Parameters: packets – list
of larpixPacket
objects to send via IOReturns: None
-
empty_queue
()[source]¶ Process any awaiting messages from all ZMQ connections. Will continue to read until the hwm is reached or there are no more awaiting messages.
Returns: 2-tuple containing a list of received packets and the full bytestream
-
reset
(addresses=None)[source]¶ Send a reset pulse to the LArPix ASICs.
Parameters: addresses – list
of daq board addresses to reset, ifNone
reset all addresses
-
set_clock
(freq_khz, addresses=None)[source]¶ Set the LArPix CLK2X freqency (in kHz).
Parameters: - freq_khz – CLK2X freq in khz to set
- addresses –
list
of daq board addresses to change frequency, ifNone
modifies all addresses
-
set_testpulse_freq
(divisor, address)[source]¶ Set the testpulse frequency, computed by dividing the CLK2X frequency by
divisor
.Parameters: - divisor – test pulse frequency divisor
- address – daq board addresses to change test pulse freq
-
get_packet_count
(io_channel, address)[source]¶ Get the number of packets received, as determined by the number of UART “start” bits processed.
Parameters: - io_channel – IO channel to check
- address – address of daq board
-