12#ifndef TIMING_INCLUDE_TIMING_SI534XNODE_HPP_
13#define TIMING_INCLUDE_TIMING_SI534XNODE_HPP_
28#include <boost/tuple/tuple.hpp>
33 " SI534xConfigError: " << message,
34 ((std::string)message)
38 " Missing configuration section: " << tag,
43 " Failed to write Si53xx reg: " << reg << "with data: " << data,
44 ((
std::
string)reg)((
std::
string)data)
48 "Retry " << attempt << " for reg " << reg,
49 ((
std::
string)attempt)((
std::
string)reg)
60class SI534xSlave :
public SIChipSlave
63 SI534xSlave(
const I2CMasterNode* i2c_master, uint8_t i2c_device_address);
64 virtual ~SI534xSlave();
66 void configure(
const std::string&
filename)
const;
68 std::map<uint16_t, uint8_t> registers()
const;
70 std::string read_config_id()
const;
72 void get_info(timinghardwareinfo::TimingPLLMonitorData& mon_data)
const;
77 std::string get_status(
bool print_out=
false)
const;
80 typedef boost::tuple<uint16_t, uint8_t> RegisterSetting_t;
82 std::string seek_header(std::ifstream& file)
const;
83 std::vector<RegisterSetting_t> read_config_section(std::ifstream& file, std::string tag)
const;
85 void upload_config(
const std::vector<SI534xSlave::RegisterSetting_t>& config)
const;
100 UHAL_DERIVEDNODE(SI534xNode)
102 explicit SI534xNode(
const uhal::Node& node);
103 SI534xNode(
const SI534xNode& node);
104 virtual ~SI534xNode();
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
OpenCode I2C interface to a ipbus node.
SI534xMissingConfigSectionError
< Namespace
Missing configuration std::string tag SI534xRegWriteRetry
< Namespace