GM6000 Digital Heater Controller Build: 16 (Branch = develop)
SDX-1330
List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
Eros::Test::Thermistor::Api Class Reference

This concrete class implements MApp the monitors the output of the specialized Eros Thermistor driver and periodically writes the temperature and ADC-bits values to the trace output. More...

Detailed Description

This concrete class implements MApp the monitors the output of the specialized Eros Thermistor driver and periodically writes the temperature and ADC-bits values to the trace output.

The MApp also collects some metrics

#include <Api.h>

Inheritance diagram for Eros::Test::Thermistor::Api:
[legend]
Collaboration diagram for Eros::Test::Thermistor::Api:
[legend]

Public Member Functions

 Api (Cpl::Container::SList< MAppApi > &mappList, Cpl::Dm::MailboxServer &myMbox, Cpl::Dm::Mp::ArrayInt32< 2 > &mpDriverSamples, const char *name=DEFAULT_NAME)
 Constructor.
 
- Public Member Functions inherited from Cpl::MApp::MApp_
const char * getName () const noexcept
 See Cpl::MApp::Api.
 
const char * getDescription () const noexcept
 See Cpl::MApp::Api.
 
const char * getUsage () const noexcept
 See Cpl::MApp::Api.
 
- Public Member Functions inherited from Cpl::MApp::MAppApi
virtual ~MAppApi ()
 Virtual destructor.
 
- Public Member Functions inherited from Cpl::Container::Item
bool insert_ (void *newContainerPtr)
 Helper method to trap when inserting an item in multiple containers.
 
bool isInContainer_ (const void *containerPtr) const noexcept
 Returns 'true' if the instance is in the specified container.
 

Static Public Attributes

static constexpr const char * DEFAULT_NAME = "thermistor"
 The default MApp Name.
 
static constexpr const char * USAGE
 Usage string (recommended that lines do not exceed 80 chars) 1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890.
 
static constexpr const char * DESCRIPTION = "Periodically Samples temperature and displays sample/metric values."
 Description string (recommended that lines do not exceed 80 chars) 1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890.
 

Protected Member Functions

void intialize_ () noexcept
 See Cpl::MApp::Api.
 
bool start_ (char *args) noexcept
 See Cpl::MApp::Api.
 
void stop_ () noexcept
 See Cpl::MApp::Api.
 
void shutdown_ () noexcept
 See Cpl::MApp::Api.
 
bool parse (char *args) noexcept
 Helper method to parse the 'command line' options.
 
void changedADCSample (Cpl::Dm::Mp::ArrayInt32< 2 > &mpThatChanged, Cpl::Dm::SubscriberApi &clientObserver) noexcept
 Change notification for new ADC Sample available.
 
- Protected Member Functions inherited from Cpl::MApp::MApp_
 MApp_ (Cpl::Container::SList< MAppApi > &mappList, const char *mappName, const char *description, const char *usage)
 Constructor.
 
- Protected Member Functions inherited from Cpl::Container::Item
 Item ()
 Constructor.
 
 Item (const char *)
 Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated.
 

Protected Attributes

Cpl::Dm::Mp::ArrayInt32< 2 > & m_mpSample
 Model point that contains the ADC samples.
 
Cpl::Dm::SubscriberComposer< Api, Cpl::Dm::Mp::ArrayInt32< 2 > > m_obSample
 Observer for change notifications.
 
int64_t m_sumTemp
 Cumulative sum Temp.
 
uint64_t m_sumADCBits
 Cumulative sum ADC-Bits.
 
int32_t m_maxTemp
 Maximum Temp. sampled.
 
int32_t m_minTemp
 Minimum Temp. sampled.
 
uint32_t m_maxADCBits
 Maximum ADC-Bits. sampled.
 
uint32_t m_minADCBits
 Minimum ADC-Bits. sampled.
 
uint32_t m_numSamples
 Number of samples.
 
uint32_t m_displayMs
 Display interval time.
 
uint32_t m_timeMarkerMs
 Time marker of last display action.
 
bool m_invalidData
 Track my invalid data state.
 
- Protected Attributes inherited from Cpl::MApp::MApp_
const char * m_name
 Command name.
 
const char * m_description
 Description.
 
const char * m_usage
 Usage.
 
bool m_started
 Started state.
 

Additional Inherited Members

- Static Public Member Functions inherited from Cpl::Container::Item
static void remove_ (Item *itemPtr) noexcept
 Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container.
 
- Public Attributes inherited from Cpl::Container::Item
voidm_nextPtr_
 The link field.
 
voidm_inListPtr_
 Debug field.
 

Constructor & Destructor Documentation

◆ Api()

Eros::Test::Thermistor::Api::Api ( Cpl::Container::SList< MAppApi > & mappList,
Cpl::Dm::MailboxServer & myMbox,
Cpl::Dm::Mp::ArrayInt32< 2 > & mpDriverSamples,
const char * name = DEFAULT_NAME )

Constructor.

Member Function Documentation

◆ changedADCSample()

void Eros::Test::Thermistor::Api::changedADCSample ( Cpl::Dm::Mp::ArrayInt32< 2 > & mpThatChanged,
Cpl::Dm::SubscriberApi & clientObserver )
protectednoexcept

Change notification for new ADC Sample available.

◆ intialize_()

void Eros::Test::Thermistor::Api::intialize_ ( )
protectedvirtualnoexcept

See Cpl::MApp::Api.

Implements Cpl::MApp::MAppApi.

◆ parse()

bool Eros::Test::Thermistor::Api::parse ( char * args)
protectednoexcept

Helper method to parse the 'command line' options.

◆ shutdown_()

void Eros::Test::Thermistor::Api::shutdown_ ( )
protectedvirtualnoexcept

See Cpl::MApp::Api.

Implements Cpl::MApp::MAppApi.

◆ start_()

bool Eros::Test::Thermistor::Api::start_ ( char * args)
protectedvirtualnoexcept

See Cpl::MApp::Api.

Implements Cpl::MApp::MAppApi.

◆ stop_()

void Eros::Test::Thermistor::Api::stop_ ( )
protectedvirtualnoexcept

See Cpl::MApp::Api.

Implements Cpl::MApp::MAppApi.

Member Data Documentation

◆ DEFAULT_NAME

constexpr const char* Eros::Test::Thermistor::Api::DEFAULT_NAME = "thermistor"
staticconstexpr

The default MApp Name.

◆ DESCRIPTION

constexpr const char* Eros::Test::Thermistor::Api::DESCRIPTION = "Periodically Samples temperature and displays sample/metric values."
staticconstexpr

Description string (recommended that lines do not exceed 80 chars) 1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890.

◆ m_displayMs

uint32_t Eros::Test::Thermistor::Api::m_displayMs
protected

Display interval time.

◆ m_invalidData

bool Eros::Test::Thermistor::Api::m_invalidData
protected

Track my invalid data state.

◆ m_maxADCBits

uint32_t Eros::Test::Thermistor::Api::m_maxADCBits
protected

Maximum ADC-Bits. sampled.

◆ m_maxTemp

int32_t Eros::Test::Thermistor::Api::m_maxTemp
protected

Maximum Temp. sampled.

◆ m_minADCBits

uint32_t Eros::Test::Thermistor::Api::m_minADCBits
protected

Minimum ADC-Bits. sampled.

◆ m_minTemp

int32_t Eros::Test::Thermistor::Api::m_minTemp
protected

Minimum Temp. sampled.

◆ m_mpSample

Cpl::Dm::Mp::ArrayInt32<2>& Eros::Test::Thermistor::Api::m_mpSample
protected

Model point that contains the ADC samples.

◆ m_numSamples

uint32_t Eros::Test::Thermistor::Api::m_numSamples
protected

Number of samples.

◆ m_obSample

Cpl::Dm::SubscriberComposer<Api, Cpl::Dm::Mp::ArrayInt32<2> > Eros::Test::Thermistor::Api::m_obSample
protected

Observer for change notifications.

◆ m_sumADCBits

uint64_t Eros::Test::Thermistor::Api::m_sumADCBits
protected

Cumulative sum ADC-Bits.

◆ m_sumTemp

int64_t Eros::Test::Thermistor::Api::m_sumTemp
protected

Cumulative sum Temp.

◆ m_timeMarkerMs

uint32_t Eros::Test::Thermistor::Api::m_timeMarkerMs
protected

Time marker of last display action.

◆ USAGE

constexpr const char* Eros::Test::Thermistor::Api::USAGE
staticconstexpr
Initial value:
= "args: [<displayms>]\n"
" <displayms> milliseconds between outputs. Default is 10000ms"

Usage string (recommended that lines do not exceed 80 chars) 1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890.


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