23#include <pybind11/pybind11.h>
24#include <pybind11/stl.h>
28namespace py = pybind11;
38 py::class_<timing::IONode, uhal::Node>(m,
"IONode");
40 py::class_<timing::FMCIONode, timing::IONode, uhal::Node>(m,
"FMCIONode")
41 .def(py::init<const uhal::Node&>())
56 py::class_<timing::PC059IONode, timing::IONode, uhal::Node>(m,
"PC059IONode")
57 .def(py::init<const uhal::Node&>())
74 py::class_<timing::FIBIONode, timing::IONode, uhal::Node>(m,
"FIBIONode")
75 .def(py::init<const uhal::Node&>())
92 py::class_<timing::FIBV2IONode, timing::IONode, uhal::Node>(m,
"FIBV2IONode")
93 .def(py::init<const uhal::Node&>())
108 py::class_<timing::TLUIONode, timing::IONode, uhal::Node>(m,
"TLUIONode")
109 .def(py::init<const uhal::Node&>())
122 .def(
"configure_dac",
125 py::arg(
"dac_value"),
126 py::arg(
"internal_ref") =
false)
129 py::class_<timing::SIMIONode, timing::IONode, uhal::Node>(m,
"SIMIONode")
130 .def(py::init<const uhal::Node&>())
145 py::class_<timing::MIBIONode, timing::IONode, uhal::Node>(m,
"MIBIONode")
146 .def(py::init<const uhal::Node&>())
163 py::class_<timing::SwitchyardNode, uhal::Node>(m,
"SwitchyardNode")
168 py::class_<timing::MIBV2IONode, timing::IONode, uhal::Node>(m,
"MIBV2IONode")
169 .def(py::init<const uhal::Node&>())
187 py::class_<timing::GIBIONode, timing::IONode, uhal::Node>(m,
"GIBIONode")
188 .def(py::init<const uhal::Node&>())
215 py::class_<timing::GIBV2IONode, timing::IONode, uhal::Node>(m,
"GIBV2IONode")
216 .def(py::init<const uhal::Node&>())
243 py::class_<timing::GIBV3IONode, timing::IONode, uhal::Node>(m,
"GIBV3IONode")
244 .def(py::init<const uhal::Node&>())
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
void reset(const std::string &clock_config_file) const override
Reset FIB node.
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
reset on-board SFP flags using I2C IO expanders
uint32_t read_active_sfp_mux_channel() const override
Read the active SFP mux channel.
void switch_sfp_mux_channel(uint32_t mux_channel) const override
Switch the SFP mux channel.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
std::string get_pll_status(bool print_out=false) const override
Print status of on-board PLL.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
Switch on or off the SFP tx laser via the I2C IO expander controlling the sfp tx disable pin....
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
void reset(const ClockSource &clock_source) const override
Reset IO, with clock file look up.
float read_board_temperature() const
Read data from on-board temperature monitor.
Class for the timing FMC board.
std::string get_clock_frequencies_table(bool print_out=false) const override
Print frequencies of on-board clocks.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
void reset(const std::string &clock_config_file) const override
Reset FMC IO.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP
Class for the timing FMC board.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
virtual uint8_t read_sfps_fault() const
Retrive SFP fault status for all SFPs.
void set_i2c_mux_channels(uint8_t mux_channel_bitmask) const
Fill hardware monitoring structure.
void reset(const std::string &clock_config_file) const override
Reset GIB IO.
void set_up_io_infrastructure() const override
Set up i2c buses, enable ICs.
std::unique_ptr< const SI534xSlave > get_pll() const override
GET PLL I2C interface.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
virtual uint32_t read_io_expanders() const
Read the contents of the IO expanders.
std::string get_hardware_info(bool print_out) const override
Print hardware information.
void reset_pll() const override
Reset PLL.
void configure_expander() const
Configure the GIB expander.
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
virtual uint8_t read_sfps_los() const
Retrive SFP LOS status for all SFPs.
bool clocks_ok() const override
Clocks ready?
Class for the timing FMC board.
uint8_t read_sfps_fault() const override
Retrive SFP fault status for all SFPs.
uint8_t read_sfps_los() const override
Retrive SFP LOS status for all SFPs.
bool clocks_ok() const override
Clocks ready?
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
Class for the timing FMC board.
uint32_t read_io_expanders() const override
Read the contents of the IO expanders.
uint8_t read_sfps_los() const override
Retrive SFP LOS status for all SFPs.
uint8_t read_sfps_fault() const override
Retrive SFP fault status for all SFPs.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
virtual void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const
control tx laser of on-board SFP softly (I2C command)
virtual std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const
Print status of on-board SFP.
virtual std::string get_hardware_info(bool print_out=false) const
Print hardware information.
virtual void soft_reset() const
Reset timing node.
virtual std::string get_full_clock_config_file_path(const ClockSource &clock_source) const
Get the full config path.
virtual std::unique_ptr< const SI534xSlave > get_pll() const
Get the PLL chip.
virtual uint32_t read_firmware_frequency() const
Read the word identifying the frequency [units of Hz] of the firmware in the FPGA.
virtual void configure_pll(const std::string &clock_config_file="") const
Configure clock chip.
virtual std::string get_clock_frequencies_table(bool print_out=false) const
Print frequencies of on-board clocks.
virtual std::string get_pll_status(bool print_out=false) const
Print status of on-board PLL.
Class for the timing FMC board.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Switch the SFP mux channel.
void reset(const std::string &clock_config_file) const override
Reset MIB IO.
void switch_sfp_tx(uint32_t, bool) const override
control tx laser of on-board SFP
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
std::string get_pll_status(bool print_out=false) const override
Print status of on-board PLL.
Class for the timing FMC board.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
void reset(const std::string &clock_config_file) const override
Reset MIB v2 IO.
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP
Class for the PC059 board.
uint32_t read_active_sfp_mux_channel() const override
Read the active SFP mux channel.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
void switch_sfp_mux_channel(uint32_t mux_channel) const override
Switch the SFP mux channel.
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
control tx laser of on-board SFP softly (I2C command)
void reset(const std::string &clock_config_file) const override
Reset pc059 node.
Class for the timing simulation IO.
std::string get_clock_frequencies_table(bool print_out=false) const override
Print frequencies of on-board clocks.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
Control tx laser of on-board SFP softly (I2C command)
std::string get_pll_status(bool print_out=false) const override
Print status of on-board PLL.
std::string get_hardware_info(bool print_out=false) const override
Print hardware information.
void reset(const std::string &clock_config_file) const override
Reset IO.
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
Control tx laser of on-board SFP softly (I2C command)
void configure_endpoint_source(uint8_t endpoint_source, bool dispatch=true) const
Configure endpoint source.
void configure_master_source(uint8_t master_source, bool dispatch=true) const
Configure master source.
std::string get_status(bool print_out=false) const override
Print the status of the timing node.
void reset(const std::string &clock_config_file) const override
Reset IO node.
void switch_sfp_tx(uint32_t, bool) const override
Control tx laser of on-board SFP softly (I2C command)
void configure_dac(uint32_t dac_id, uint32_t dac_value, bool internal_ref=false) const
Configure on-board DAC.
std::string get_status(bool print_out=false) const
Print the status of the timing node.
void switch_sfp_soft_tx_control_bit(uint32_t, bool) const override
Control tx laser of on-board SFP softly (I2C command)
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
void register_io(py::module &m)