LArPix IO¶
-
class
larpix.io.
IO
[source]¶ Base class for IO objects that explicitly describes the necessary functions required by any IO class implementation. Additional functions are not used by the larpix core classes.
-
__init__
()[source]¶ Declaration of IO object
Variables: is_listening – flag for start_listening
andstop_listening
commands
-
classmethod
encode
(packets)[source]¶ Encodes a list of packets into a list of IO message objects
Parameters: packets – list
of larpixPacket
objects to encode into IO messagesReturns: list
of IO messages
-
classmethod
decode
(msgs)[source]¶ Decodes a list of IO message objects into respective larpix
Packet
objectsParameters: msgs – list
of IO messagesReturns: list
of larpixPacket
objects
-
classmethod
is_valid_chip_key
(key)[source]¶ Check if provided key is valid for IO implementation. Chip key should be an immutable python type and not
tuple
Parameters: key – key to check validity Returns: True
if valid key
-
classmethod
parse_chip_key
(key)[source]¶ Translate a chip key into a dict of contained information
Parameters: key – chip key to parse Returns: dict
of IO information contained in key
-
classmethod
generate_chip_key
(**kwargs)[source]¶ Create a chip key based on supplied info, raise an error if not enough information is provided
Returns: chip key of an immutable python type and not tuple
-
send
(packets)[source]¶ Function for sending larpix packet objects
Parameters: packets – list
of larpixPacket
objects to send via IOReturns: None
-
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)
-
Implementations¶
Here is the documentation for various implemented IO classes.