DUNE: Uniform Navigational Environment  2020.01.0
Sensors::SADC::DriverSADC Class Reference

Detailed Description

Message Parser for SADC.

Author
Pedro Gonçalves

Classes

struct  SADCState
 

Public Types

Public Member Functions

 DriverSADC (void)
 
 ~DriverSADC (void)
 
bool parse (uint8_t byte)
 
bool translate (void)
 
std::string translate_feadback (void)
 
char * enable_output (void)
 
char * disable_output (void)
 
char * disable_channel (int channel)
 
char * enable_channel (int channel)
 
char * enable_auto_gain (int channel)
 
char * set_sample_ps (int value)
 
char * set_number_sample_sw (int value)
 
char * set_min_change_gain (int channel, float value)
 
char * set_max_change_gain (int channel, float value)
 
char * fix_gain (int channel, int value)
 

Public Attributes

SADCState m_sadc
 

Member Enumeration Documentation

State machine.

Enumerator
PS_PREAMBLE 

Read preamble.

PS_DATA 

Data received.

PS_CS 

Read checksum.

Constructor & Destructor Documentation

Sensors::SADC::DriverSADC::DriverSADC ( void  )
inline
Sensors::SADC::DriverSADC::~DriverSADC ( void  )
inline

Member Function Documentation

char* Sensors::SADC::DriverSADC::disable_channel ( int  channel)
inline

Disable Channel ADC.

Referenced by Sensors::SADC::Task::config_SADC().

char* Sensors::SADC::DriverSADC::disable_output ( void  )
inline
char* Sensors::SADC::DriverSADC::enable_auto_gain ( int  channel)
inline

Enable auto-gain in Channel ADC.

Referenced by Sensors::SADC::Task::config_SADC().

char* Sensors::SADC::DriverSADC::enable_channel ( int  channel)
inline

Enable Channel ADC.

Referenced by Sensors::SADC::Task::config_SADC().

char* Sensors::SADC::DriverSADC::enable_output ( void  )
inline
char* Sensors::SADC::DriverSADC::fix_gain ( int  channel,
int  value 
)
inline

Disable auto-gain in channel, define static gain.

Referenced by Sensors::SADC::Task::config_SADC().

bool Sensors::SADC::DriverSADC::parse ( uint8_t  byte)
inline

Parse message received.

References PS_CS, PS_DATA, and PS_PREAMBLE.

Referenced by Sensors::SADC::Task::checkSerialPort().

char* Sensors::SADC::DriverSADC::set_max_change_gain ( int  channel,
float  value 
)
inline

Set maximum voltage to switch auto-gain.

Referenced by Sensors::SADC::Task::config_SADC().

char* Sensors::SADC::DriverSADC::set_min_change_gain ( int  channel,
float  value 
)
inline

Set minimum voltage to switch auto-gain.

Referenced by Sensors::SADC::Task::config_SADC().

char* Sensors::SADC::DriverSADC::set_number_sample_sw ( int  value)
inline

Set number of sample before switch auto-gain.

Referenced by Sensors::SADC::Task::config_SADC().

char* Sensors::SADC::DriverSADC::set_sample_ps ( int  value)
inline

Set number of sample/second.

Referenced by Sensors::SADC::Task::config_SADC().

bool Sensors::SADC::DriverSADC::translate ( void  )
inline
std::string Sensors::SADC::DriverSADC::translate_feadback ( void  )
inline

Member Data Documentation

SADCState Sensors::SADC::DriverSADC::m_sadc
Collaboration diagram for Sensors::SADC::DriverSADC:
Collaboration graph