Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
mctools::digitization::simple_linear_adc Class Reference

A simple linear ADC (Analog/Digital Converter) More...

#include <bayeux/mctools/digitization/simple_linear_adc.h>

Inheritance diagram for mctools::digitization::simple_linear_adc:
mctools::digitization::i_adc datatools::i_tree_dumpable

Public Member Functions

 simple_linear_adc ()
 Default constructor. More...
 
virtual ~simple_linear_adc ()
 Destructor. More...
 
void set_v_ref_low (const double)
 Set the low voltage reference value. More...
 
double get_v_ref_low () const
 Return the low voltage reference value. More...
 
void set_v_ref_high (const double)
 Set the high voltage reference value. More...
 
double get_v_ref_high () const
 Return the high voltage reference value. More...
 
void set_nbits (const uint16_t)
 Set the number of encoding bits. More...
 
uint16_t get_nbits () const
 Return the number of encoding bits. More...
 
void set_signed (bool)
 Set the signed codes flag. More...
 
void set_no_underflow (bool n_)
 Set the no underflow flag. More...
 
bool is_no_underflow () const
 Check the no underflow flag. More...
 
void set_no_overflow (bool n_)
 Set the no overflow flag. More...
 
bool is_no_overflow () const
 Check the no overflow flag. More...
 
void set_underflow_channel (int32_t)
 Set the underflow channel. More...
 
int32_t get_underflow_channel () const
 Return the underflow code. More...
 
void set_overflow_channel (int32_t)
 Set the overflow channel. More...
 
int32_t get_overflow_channel () const
 Return the overflow code. More...
 
bool is_signed () const
 Check the signed codes flag. More...
 
bool is_initialized () const
 Check the initialization flag. More...
 
void initialize_simple ()
 Initialization. More...
 
void initialize (const datatools::properties &config_)
 Initialization. More...
 
void reset ()
 Reset. More...
 
double compute_sampled_voltage (int32_t channel_, bool ignore_out_=false) const
 Compute the sampled voltage associated to a channel. More...
 
virtual int32_t quantize (const double vinput_) const
 Quantize. More...
 
int32_t get_min_channel () const
 Return the minimum channel. More...
 
int32_t get_max_channel () const
 Return the maximum channel. More...
 
uint32_t get_number_of_voltage_intervals () const
 Return the number of voltage intervals. More...
 
double get_voltage_resolution () const
 Return the voltage resolution. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
- Public Member Functions inherited from mctools::digitization::i_adc
 i_adc ()
 Default constructor. More...
 
virtual ~i_adc ()
 Destructor. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Static Public Attributes

static const int32_t INVALID_CHANNEL = std::numeric_limits<int32_t>::min()
 

Protected Member Functions

void _set_defaults ()
 Reflection interface. More...
 
void _compute_working_data ()
 Compute working data. More...
 

Additional Inherited Members

- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Detailed Description

A simple linear ADC (Analog/Digital Converter)

Constructor & Destructor Documentation

◆ simple_linear_adc()

mctools::digitization::simple_linear_adc::simple_linear_adc ( )

Default constructor.

◆ ~simple_linear_adc()

virtual mctools::digitization::simple_linear_adc::~simple_linear_adc ( )
virtual

Destructor.

Member Function Documentation

◆ _compute_working_data()

void mctools::digitization::simple_linear_adc::_compute_working_data ( )
protected

Compute working data.

◆ _set_defaults()

void mctools::digitization::simple_linear_adc::_set_defaults ( )
protected

Reflection interface.

Set default attributes values

◆ compute_sampled_voltage()

double mctools::digitization::simple_linear_adc::compute_sampled_voltage ( int32_t  channel_,
bool  ignore_out_ = false 
) const

Compute the sampled voltage associated to a channel.

◆ get_max_channel()

int32_t mctools::digitization::simple_linear_adc::get_max_channel ( ) const

Return the maximum channel.

◆ get_min_channel()

int32_t mctools::digitization::simple_linear_adc::get_min_channel ( ) const

Return the minimum channel.

◆ get_nbits()

uint16_t mctools::digitization::simple_linear_adc::get_nbits ( ) const

Return the number of encoding bits.

◆ get_number_of_voltage_intervals()

uint32_t mctools::digitization::simple_linear_adc::get_number_of_voltage_intervals ( ) const

Return the number of voltage intervals.

◆ get_overflow_channel()

int32_t mctools::digitization::simple_linear_adc::get_overflow_channel ( ) const

Return the overflow code.

◆ get_underflow_channel()

int32_t mctools::digitization::simple_linear_adc::get_underflow_channel ( ) const

Return the underflow code.

◆ get_v_ref_high()

double mctools::digitization::simple_linear_adc::get_v_ref_high ( ) const

Return the high voltage reference value.

◆ get_v_ref_low()

double mctools::digitization::simple_linear_adc::get_v_ref_low ( ) const

Return the low voltage reference value.

◆ get_voltage_resolution()

double mctools::digitization::simple_linear_adc::get_voltage_resolution ( ) const

Return the voltage resolution.

◆ initialize()

void mctools::digitization::simple_linear_adc::initialize ( const datatools::properties config_)

Initialization.

◆ initialize_simple()

void mctools::digitization::simple_linear_adc::initialize_simple ( )

Initialization.

◆ is_initialized()

bool mctools::digitization::simple_linear_adc::is_initialized ( ) const

Check the initialization flag.

◆ is_no_overflow()

bool mctools::digitization::simple_linear_adc::is_no_overflow ( ) const

Check the no overflow flag.

◆ is_no_underflow()

bool mctools::digitization::simple_linear_adc::is_no_underflow ( ) const

Check the no underflow flag.

◆ is_signed()

bool mctools::digitization::simple_linear_adc::is_signed ( ) const

Check the signed codes flag.

◆ quantize()

virtual int32_t mctools::digitization::simple_linear_adc::quantize ( const double  vinput_) const
virtual

Quantize.

Implements mctools::digitization::i_adc.

◆ reset()

void mctools::digitization::simple_linear_adc::reset ( )

Reset.

◆ set_nbits()

void mctools::digitization::simple_linear_adc::set_nbits ( const uint16_t  )

Set the number of encoding bits.

◆ set_no_overflow()

void mctools::digitization::simple_linear_adc::set_no_overflow ( bool  n_)

Set the no overflow flag.

◆ set_no_underflow()

void mctools::digitization::simple_linear_adc::set_no_underflow ( bool  n_)

Set the no underflow flag.

◆ set_overflow_channel()

void mctools::digitization::simple_linear_adc::set_overflow_channel ( int32_t  )

Set the overflow channel.

◆ set_signed()

void mctools::digitization::simple_linear_adc::set_signed ( bool  )

Set the signed codes flag.

◆ set_underflow_channel()

void mctools::digitization::simple_linear_adc::set_underflow_channel ( int32_t  )

Set the underflow channel.

◆ set_v_ref_high()

void mctools::digitization::simple_linear_adc::set_v_ref_high ( const double  )

Set the high voltage reference value.

◆ set_v_ref_low()

void mctools::digitization::simple_linear_adc::set_v_ref_low ( const double  )

Set the low voltage reference value.

◆ tree_dump()

virtual void mctools::digitization::simple_linear_adc::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.

Member Data Documentation

◆ INVALID_CHANNEL

const int32_t mctools::digitization::simple_linear_adc::INVALID_CHANNEL = std::numeric_limits<int32_t>::min()
static

The documentation for this class was generated from the following file: