AP&C API Reference
Public Member Functions | Protected Member Functions | Properties | List of all members
Apac.Data.MeasurementFormula Class Referenceabstract

Provides a base implementation of a measurement formula that reflects against the subclass's attributes to provide values for common properties. More...

Inheritance diagram for Apac.Data.MeasurementFormula:
Apac.Configuration.Plugin< MeasurementFormulaAttribute, FormulaDescriptor > Apac.Data.IMeasurementFormula Apac.Dallas.OneWire.OneWireDevice10.TempCalculatorC Apac.Dallas.OneWire.OneWireDevice10.TempCalculatorF Apac.Dallas.OneWire.OneWireDevice26.RelativeHumidity Apac.Dallas.OneWire.OneWireDevice26.TempCalculatorC Apac.Dallas.OneWire.OneWireDevice26.TempCalculatorF Apac.Dallas.OneWire.OneWireDevice28.TempCalculatorC Apac.Dallas.OneWire.OneWireDevice28.TempCalculatorF Apac.Plugins.Formulae.AmpsToKilowattsFormula Apac.Plugins.Formulae.BinarizationFormula Apac.Plugins.Formulae.DiscretizationFormula Apac.Plugins.Formulae.MockTempF Apac.Plugins.Formulae.TempDeltaFlowBtuFormula

Public Member Functions

decimal ProcessMeasurement (Apac.Monitoring.Measurement measurement, decimal resolution, Apac.Settings.Configuration config)
 Processes the measurement. More...
 
void GetObjectData (SerializationInfo info, StreamingContext context)
 
- Public Member Functions inherited from Apac.Data.IMeasurementFormula
decimal ProcessMeasurement (Monitoring.Measurement measurement, decimal resolution, Apac.Settings.Configuration config)
 Should process the measurement at the given resolution and return a value according to the encoded formula. More...
 

Protected Member Functions

 MeasurementFormula (Monitoring.MeasurementUnit units)
 Initializes a new instance of the MeasurementFormula<T> class. More...
 
 MeasurementFormula (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the MeasurementFormula<T> class. More...
 
abstract decimal OnProcessMeasurement (Apac.Monitoring.Measurement measurement, decimal resolution, Apac.Settings.Configuration config)
 Called when the formula should process the incoming measurement (readings). More...
 

Properties

Apac.Monitoring.MeasurementUnit Units [get]
 Gets the units. More...
 
- Properties inherited from Apac.Configuration.Plugin< MeasurementFormulaAttribute, FormulaDescriptor >
virtual log4net.ILog Log [get]
 Gets the log. It lazy loads as necessary. More...
 
Guid Id [get]
 Gets the id of the formula from the subclass's PluginAttribute. More...
 
string Name [get]
 Gets the name of the formula from the subclass's PluginAttribute. More...
 
string Description [get]
 Gets the description from the subclass's PluginAttribute. More...
 
string Instructions [get]
 Gets the instructions from the subclass's PluginAttribute. More...
 
Descriptor [get]
 Gets the descriptor so it can be serialized to remote clients.. More...
 
Attribute [get]
 Gets the attribute, lazy loads it as necessary. More...
 
- Properties inherited from Apac.Data.IMeasurementFormula
Apac.Monitoring.MeasurementUnit Units [get]
 Indicates the units to be applied to the result of ProcessMeasurement. More...
 
Configuration.FormulaDescriptor Descriptor [get]
 Presents the metadata about this formula for use during configuration and troubleshooting scenarios. More...
 

Detailed Description

Provides a base implementation of a measurement formula that reflects against the subclass's attributes to provide values for common properties.

Template Parameters
TThe type of reading values.

Constructor & Destructor Documentation

◆ MeasurementFormula() [1/2]

Apac.Data.MeasurementFormula.MeasurementFormula ( Monitoring.MeasurementUnit  units)
inlineprotected

Initializes a new instance of the MeasurementFormula<T> class.

Parameters
unitsThe units.

◆ MeasurementFormula() [2/2]

Apac.Data.MeasurementFormula.MeasurementFormula ( SerializationInfo  info,
StreamingContext  context 
)
inlineprotected

Initializes a new instance of the MeasurementFormula<T> class.

Parameters
infoThe info.
contextThe context.

Member Function Documentation

◆ OnProcessMeasurement()

abstract decimal Apac.Data.MeasurementFormula.OnProcessMeasurement ( Apac.Monitoring.Measurement  measurement,
decimal  resolution,
Apac.Settings.Configuration  config 
)
protectedpure virtual

Called when the formula should process the incoming measurement (readings).

Parameters
measurementThe measurement.
resolutionThe resolution.
configThe config.
Returns
Returns the result of the formula.

Implemented in Apac.Plugins.Formulae.DemoAmpsToKilowattsFormula, Apac.Dallas.OneWire.OneWireDevice10.TempCalculatorF, and Apac.Dallas.OneWire.OneWireDevice10.TempCalculatorC.

◆ ProcessMeasurement()

decimal Apac.Data.MeasurementFormula.ProcessMeasurement ( Apac.Monitoring.Measurement  measurement,
decimal  resolution,
Apac.Settings.Configuration  config 
)
inline

Processes the measurement.

Parameters
measurementThe measurement.
resolutionThe resolution.
configThe config.
Returns

Property Documentation

◆ Units

Apac.Monitoring.MeasurementUnit Apac.Data.MeasurementFormula.Units
get

Gets the units.


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