|
pflib v3.9.5-18-g30f792c
Pretty Fine HGCROC Interaction Library
|
Public Member Functions | |
| ECON (std::shared_ptr< I2C > i2c, uint8_t econ_base_addr, const std::string &type_version) | |
| ECON (const ECON &)=delete | |
| ECON & | operator= (const ECON &)=delete |
| const std::string & | type () const |
| void | setRunMode (bool active=true, int edgesel=-1, int fcmd_invert=-1) |
| int | getPUSMRunValue () |
| int | getPUSMStateValue () |
| bool | isRunMode () |
| int | nLinks () |
| get the number of readout links that are enabled | |
| std::vector< uint8_t > | getValues (int reg_addr, int nbytes) |
| void | setValue (int reg_addr, uint64_t value, int nbytes) |
| void | setValues (int reg_addr, const std::vector< uint8_t > &values) |
| void | setRegisters (const std::map< int, std::map< int, uint8_t > > ®isters) |
| void | loadParameters (const std::string &file_path, bool prepend_defaults) |
| std::map< int, std::map< int, uint8_t > > | getRegisters (const std::map< int, std::map< int, uint8_t > > &selected) |
| std::map< int, std::map< int, uint8_t > > | applyParameters (const std::map< std::string, std::map< std::string, uint64_t > > ¶meters) |
| void | applyParameter (const std::string &page, const std::string ¶m, const uint64_t &val) |
| std::map< std::string, std::map< std::string, uint64_t > > | readParameters (const std::map< std::string, std::map< std::string, uint64_t > > ¶meters, bool print_values=true) |
| std::map< std::string, std::map< std::string, uint64_t > > | readParameters (const std::string &file_path) |
| uint64_t | readParameter (const std::string &page, const std::string ¶m, bool print_values=false) |
| void | dumpSettings (const std::string &filename, bool should_decompile) |
| TempParameters< ECON >::Builder | testParameters () |
Private Attributes | |
| std::shared_ptr< I2C > | i2c_ |
| uint8_t | econ_base_ |
| Compiler | compiler_ |
| std::string | type_ |
| std::map< uint16_t, size_t > | econ_reg_nbytes_lut_ |
| mutable::pflib::logging::logger | the_log_ {::pflib::logging::get("econ")} |
| std::map< int, std::map< int, uint8_t > > pflib::ECON::applyParameters | ( | const std::map< std::string, std::map< std::string, uint64_t > > & | parameters | ) |
| void pflib::ECON::dumpSettings | ( | const std::string & | filename, |
| bool | should_decompile ) |
decompile while being careful since we knowingly are attempting to read ALL of the parameters on the chip
| void pflib::ECON::loadParameters | ( | const std::string & | file_path, |
| bool | prepend_defaults ) |
If we prepend defaults, then ALL of the parameters will be touched and so we do NOT need to bother reading the current values and overlaying the new ones, instead we jump straight to setting the registers.
If we don't prepend the defaults, then we use the other applyParameters function to overlay the parameters we passed on top of the ones currently on the chip after extracting them from the YAML file.
| int pflib::ECON::nLinks | ( | ) |
get the number of readout links that are enabled
We avoid using the compiler in order to inspect the ERX.NN.ENABLE parameters because the compiler is slow. https://github.com/LDMX-Software/pflib/issues/266