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.
-
send
(packets)[source]¶ Function for sending larpix packet objects
Parameters: packets – list
of larpixPacket
objects to send via IOReturns: None
-
classmethod
is_valid_chip_key
(key)[source]¶ Valid chip keys must be strings formatted as:
'<io_chain>-<chip_id>'
-
classmethod
parse_chip_key
(key)[source]¶ Decodes a chip key into
'chip_id'
andio_chain
Returns: dict
with keys('chip_id', 'io_chain')
-
classmethod
generate_chip_key
(**kwargs)[source]¶ Generates a valid
ZMQ_IO
chip keyParameters: - chip_id –
int
corresponding to internal chip id - io_chain –
int
corresponding to daisy chain number
- chip_id –
-
empty_queue
()[source]¶ Read and remove the current items in the internal queue. The details of the queue implementation is left up to the specific IO class. Generally returns all packets that have been read since last call to
start_listening
orempty_queue
, whichever was most recent.Returns: tuple
of (list
ofPacket
objects, raw bytestream)
-
set_testpulse_freq
(divisor)[source]¶ Set the testpulse frequency, computed by dividing the CLK2X frequency by
divisor
.
-