DUNE: Uniform Navigational Environment  2019.02.0
Sensors::Keller::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceAcquisition (void)
 
bool openSocket (void)
 
void onEntityResolution (void)
 
void onResourceRelease (void)
 
void onResourceInitialization (void)
 
void consume (const IMC::GpsFix *msg)
 
void consume (const IMC::VehicleMedium *msg)
 
void calibrate (void)
 
bool write (uint8_t *bfr, int len)
 
bool read (void)
 
ParserResults parse (uint8_t *bfr, uint8_t len)
 
bool interpret (void)
 
void initialize (void)
 
void zero (void)
 
void reportEntityState (void)
 
void task (void)
 

Public Attributes

IO::Handle * m_handle
 
bool m_echo
 
uint8_t m_msg_read_pressure [5]
 
uint8_t m_msg_read_temperature [5]
 
IMC::Pressure m_pressure
 
IMC::Depth m_depth
 
IMC::Temperature m_temperature
 
bool m_calibrated
 
int m_entity_id
 
ParserStates m_parser_state
 
uint8_t m_parser_cmd
 
uint8_t m_parser_data [c_parser_data_size]
 
uint8_t m_parser_data_len
 
uint16_t m_parser_data_crc
 
uint16_t m_parser_packet_crc
 
float m_channel_readout
 
Time::Counter< float > m_wdog
 
unsigned m_crc_err_count
 
Counter< double > m_state_timer
 
size_t m_sample_count
 
size_t m_faults_count
 
size_t m_timeout_count
 
unsigned m_gps_eid
 
Arguments m_args
 

Static Public Attributes

static const unsigned c_parser_data_size
 
static const unsigned c_max_crc_err
 

Constructor & Destructor Documentation

Member Function Documentation

void Sensors::Keller::Task::calibrate ( void  )
inline

Calibrate device.

References m_calibrated, and zero().

Referenced by consume().

void Sensors::Keller::Task::consume ( const IMC::GpsFix *  msg)
inline

References calibrate(), and m_gps_eid.

void Sensors::Keller::Task::consume ( const IMC::VehicleMedium *  msg)
inline

References calibrate().

void Sensors::Keller::Task::onEntityResolution ( void  )
inline
void Sensors::Keller::Task::onResourceAcquisition ( void  )
inline
void Sensors::Keller::Task::onResourceInitialization ( void  )
inline

References initialize(), and m_crc_err_count.

void Sensors::Keller::Task::onResourceRelease ( void  )
inline

References m_handle.

Referenced by onResourceAcquisition().

bool Sensors::Keller::Task::openSocket ( void  )
inline
bool Sensors::Keller::Task::write ( uint8_t *  bfr,
int  len 
)
inline
void Sensors::Keller::Task::zero ( void  )
inline

Member Data Documentation

const unsigned Sensors::Keller::Task::c_max_crc_err
static

Referenced by read().

const unsigned Sensors::Keller::Task::c_parser_data_size
static

Referenced by parse().

bool Sensors::Keller::Task::m_calibrated

Referenced by calibrate(), and Task().

float Sensors::Keller::Task::m_channel_readout

Referenced by interpret(), and task().

unsigned Sensors::Keller::Task::m_crc_err_count

Referenced by onResourceInitialization(), and read().

IMC::Depth Sensors::Keller::Task::m_depth

Referenced by task().

bool Sensors::Keller::Task::m_echo
int Sensors::Keller::Task::m_entity_id
size_t Sensors::Keller::Task::m_faults_count

Faults count.

Referenced by read(), reportEntityState(), and write().

unsigned Sensors::Keller::Task::m_gps_eid

GPS source entity.

Referenced by consume(), and onEntityResolution().

IO::Handle* Sensors::Keller::Task::m_handle
uint8_t Sensors::Keller::Task::m_msg_read_pressure[5]

Referenced by onUpdateParameters(), and task().

uint8_t Sensors::Keller::Task::m_msg_read_temperature[5]

Referenced by onUpdateParameters(), and task().

uint8_t Sensors::Keller::Task::m_parser_cmd

Referenced by interpret(), and parse().

uint8_t Sensors::Keller::Task::m_parser_data[c_parser_data_size]

Referenced by interpret(), and parse().

uint16_t Sensors::Keller::Task::m_parser_data_crc

Referenced by parse().

uint8_t Sensors::Keller::Task::m_parser_data_len

Referenced by parse().

uint16_t Sensors::Keller::Task::m_parser_packet_crc

Referenced by parse().

ParserStates Sensors::Keller::Task::m_parser_state

Referenced by parse(), and read().

IMC::Pressure Sensors::Keller::Task::m_pressure

Referenced by task().

size_t Sensors::Keller::Task::m_sample_count

Sample count.

Referenced by reportEntityState(), and task().

Counter<double> Sensors::Keller::Task::m_state_timer

Entity state timer.

Referenced by reportEntityState().

IMC::Temperature Sensors::Keller::Task::m_temperature

Referenced by task().

size_t Sensors::Keller::Task::m_timeout_count

Timeout count.

Referenced by reportEntityState(), and write().

Time::Counter<float> Sensors::Keller::Task::m_wdog
Collaboration diagram for Sensors::Keller::Task:
Collaboration graph