Programming interface ===================== The native programming interface between drasi and a readout is realised through a set of callback functions. .. Caution:: This section is under construction. Readout callback setup ---------------------- .. c:function:: void lwroc_readout_pre_setup_functions() Function defined by readout code. Should initialize :c:data:`_lwroc_readout_functions`. .. c:type:: lwroc_readout_functions .. c:member:: lwroc_init_func init Readout callback functions -------------------------- .. c:function:: void lwroc_init_func() Callback function called on startup. .. c:function:: void lwroc_uninit_func(int start_no_stop) Callback function called on shutdown. :param start_no_stop: Heh? .. c:function:: void lwroc_start_stop_loop_func(int start) Callback function called on start or stop. :param start: Call is for start. .. c:function:: void lwroc_idle_read_func() Callback function called when no trigger has been found (a few times). .. c:function:: void lwroc_read_event_func(uint64_t cycle, uint16_t trig) Callback function called for each trigger. :param cycle: Event counter. :param trig: Trigger number. .. c:function:: void lwroc_untriggered_loop_func(int *start_no_stop) Callback function driving the readout. .. c:function:: void lwroc_cmdline_usage() Callback function to print usage (help) info about command line options accepted by the readout :c:data:`lwroc_parse_cmdline_arg`. .. c:function:: void lwroc_parse_cmdline_arg(const char *arg) Callback function to parse a command line argument. :param arg: Command line argument. :return: 1 if the argument was recognised and parsed.