Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

NewSimulatorSensorThreshold Class Reference

Class for simulating threshold sensors. More...

#include <new_sim_sensor_threshold.h>

Inheritance diagram for NewSimulatorSensorThreshold:

Inheritance graph
[legend]
Collaboration diagram for NewSimulatorSensorThreshold:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NewSimulatorSensorThreshold (NewSimulatorResource *res)
 Constructor.
 NewSimulatorSensorThreshold (NewSimulatorResource *res, SaHpiRdrT rdr, SaHpiSensorReadingT data, SaHpiEventStateT event_state, SaHpiEventStateT event_amask, SaHpiEventStateT event_dmask, SaHpiSensorThresholdsT thresholds, SaHpiBoolT enabled, SaHpiBoolT event_enabled)
 Fully qualified constructor to fill an object with the parsed data.
virtual ~NewSimulatorSensorThreshold ()
 Destructor.
virtual void HandleNew (NewSimulatorDomain *domain)
 TBD: Check where and whether it is needed.
virtual void Dump (NewSimulatorLog &dump) const
 Dump the sensor information.
bool Cmp (const NewSimulatorSensor &s2) const
 TBD: Check where and whether it is needed TODO: Change it properly due to new data structure.
virtual bool CreateRdr (SaHpiRptEntryT &resource, SaHpiRdrT &rdr)
 A rdr structure is filled with the internally data.
SaErrorT GetSensorReading (SaHpiSensorReadingT &data, SaHpiEventStateT &state)
 HPI function saHpiSensorReadingGet().
SaErrorT GetThresholds (SaHpiSensorThresholdsT &thres)
 HPI function saHpiSensorThresholdsGet().
SaErrorT SetThresholds (const SaHpiSensorThresholdsT &thres)
 HPI function saHpiSensorThresholdsSet().

Detailed Description

Class for simulating threshold sensors.


Member Function Documentation

bool NewSimulatorSensorThreshold::Cmp const NewSimulatorSensor s2  )  const [virtual]
 

TBD: Check where and whether it is needed TODO: Change it properly due to new data structure.

TODO Should be changed due to other private variables

if ( m_sensor_init_thresholds != t->m_sensor_init_thresholds ) return false;

if ( m_sensor_init_hysteresis != t->m_sensor_init_hysteresis ) return false;

if ( m_hysteresis_support != t->m_hysteresis_support ) return false;

if ( m_threshold_access != t->m_threshold_access ) return false;

if ( m_assertion_event_mask != t->m_assertion_event_mask ) return false;

if ( m_deassertion_event_mask != t->m_deassertion_event_mask ) return false;

if ( m_reading_mask != t->m_reading_mask ) return false;

if ( m_threshold_readable != t->m_threshold_readable ) return false;

if ( m_threshold_settable != t->m_threshold_settable ) return false;

if ( m_rate_unit != t->m_rate_unit ) return false;

if ( m_modifier_unit_use != t->m_modifier_unit_use ) return false;

if ( m_percentage != t->m_percentage ) return false;

if ( m_base_unit != t->m_base_unit ) return false;

if ( m_modifier_unit != t->m_modifier_unit ) return false;

bool sf1 = m_sensor_factors ? true : false; bool sf2 = t->m_sensor_factors ? true : false;

if ( sf1 != sf2 ) return false;

if ( m_sensor_factors ) if ( m_sensor_factors->Cmp( *t->m_sensor_factors ) == false ) return false;

if ( m_normal_min_specified != t->m_normal_min_specified ) return false;

if ( m_normal_max_specified != t->m_normal_max_specified ) return false;

if ( m_nominal_reading_specified != t->m_nominal_reading_specified ) return false;

if ( m_nominal_reading != t->m_nominal_reading ) return false;

if ( m_normal_max != t->m_normal_max ) return false;

if ( m_normal_min != t->m_normal_min ) return false;

if ( m_sensor_max != t->m_sensor_max ) return false;

if ( m_sensor_min != t->m_sensor_min ) return false; if ( m_upper_non_recoverable_threshold != t->m_upper_non_recoverable_threshold ) return false;

if ( m_upper_critical_threshold != t->m_upper_critical_threshold ) return false;

if ( m_upper_non_critical_threshold != t->m_upper_non_critical_threshold ) return false;

if ( m_lower_non_recoverable_threshold != t->m_lower_non_recoverable_threshold ) return false;

if ( m_lower_critical_threshold != t->m_lower_critical_threshold ) return false;

if ( m_lower_non_critical_threshold != t->m_lower_non_critical_threshold ) return false;

if ( m_positive_going_threshold_hysteresis != t->m_positive_going_threshold_hysteresis ) return false;

if ( m_negative_going_threshold_hysteresis != t->m_negative_going_threshold_hysteresis ) return false;

Reimplemented from NewSimulatorSensor.

bool NewSimulatorSensorThreshold::CreateRdr SaHpiRptEntryT &  resource,
SaHpiRdrT &  rdr
[virtual]
 

A rdr structure is filled with the internally data.

This method is called by method NewSimulatorRdr::Populate().

Parameters:
resource Address of resource structure
rdr Address of rdr structure
Returns:
true

Reimplemented from NewSimulatorSensor.

void NewSimulatorSensorThreshold::Dump NewSimulatorLog dump  )  const [virtual]
 

Dump the sensor information.

Parameters:
dump Address of the log

Reimplemented from NewSimulatorSensor.

SaErrorT NewSimulatorSensorThreshold::GetSensorReading SaHpiSensorReadingT &  data,
SaHpiEventStateT &  state
[virtual]
 

HPI function saHpiSensorReadingGet().

See also the description of the function inside the specification or header file. Copying the internal reading values (if a read is allowed).

Parameters:
data sensor reading variable in which the data should be copied
state sensor event state variable in which the states should be copied
Returns:
error code

Implements NewSimulatorSensor.

SaErrorT NewSimulatorSensorThreshold::GetThresholds SaHpiSensorThresholdsT &  thres  ) 
 

HPI function saHpiSensorThresholdsGet().

See also the description of the function inside the specification or header file. Copy of the internal threshold values (if a read is allowed).

Parameters:
thres Threshold structure in which the internal data should be copied
Returns:
error code

SaErrorT NewSimulatorSensorThreshold::SetThresholds const SaHpiSensorThresholdsT &  thres  ) 
 

HPI function saHpiSensorThresholdsSet().

See also the description of the function inside the specification or header file. The checks are done in the methods
NewSimulatorSensorThreshold::checkThresholdValue()
NewSimulatorSensorThreshold::checkHysteresisValue()
NewSimulatorSensorThreshold::checkOrdering().

Parameters:
thres Threshold structure with data which should be set internally
Returns:
error code


The documentation for this class was generated from the following files:
Generated on Mon Apr 26 14:39:48 2010 for New Simulator by  doxygen 1.4.4