C# Class Gor.Devices.Sensor

Exibir arquivo Open project: gamondue/GOR-4H-16

Public Properties

Property Type Description
logger System.Logger

Protected Properties

Property Type Description
calibration Calibration_2Points
firstValue bool
isCalibrating bool
voltage double

Public Methods

Method Description
CalibrationPoint ( double value ) : double
EndCalibration ( ) : void
Initialization ( ) : void
Measure ( ) : List

Method that returns the "finished" measurement (or measurements), including calibration correction (if any) N.B. Measure has to set the LastMeasurement List before returning

Read ( ) : string

Raw reading from the sensor, when it is in string format If the sensor uses this method then it will override it. If not overridden the method signals error by returning a "Nope!" string

ReadDouble ( ) : double

Raw reading from the sensor, when it is a floating point number If the sensor uses this method then it will override it. If not overridden the method signals error by returning MaxValue

ReadInt ( ) : int

Raw reading from the sensor, when it is an integer number If the sensor uses this method then it will override it. If not overridden the method signals error by returning MaxValue

Sensor ( string Name, bool Simulation, System.Logger Logger ) : System
StandardDeviation ( int readNumber = 10 ) : double
StartCalibration ( ) : void
ToString ( ) : string

Private Methods

Method Description
SetFirstValue ( ) : List
SimulateSensor ( ) : Measurement

Method Details

CalibrationPoint() public method

public CalibrationPoint ( double value ) : double
value double
return double

EndCalibration() public method

public EndCalibration ( ) : void
return void

Initialization() public abstract method

public abstract Initialization ( ) : void
return void

Measure() public abstract method

Method that returns the "finished" measurement (or measurements), including calibration correction (if any) N.B. Measure has to set the LastMeasurement List before returning
public abstract Measure ( ) : List
return List

Read() public method

Raw reading from the sensor, when it is in string format If the sensor uses this method then it will override it. If not overridden the method signals error by returning a "Nope!" string
public Read ( ) : string
return string

ReadDouble() public method

Raw reading from the sensor, when it is a floating point number If the sensor uses this method then it will override it. If not overridden the method signals error by returning MaxValue
public ReadDouble ( ) : double
return double

ReadInt() public method

Raw reading from the sensor, when it is an integer number If the sensor uses this method then it will override it. If not overridden the method signals error by returning MaxValue
public ReadInt ( ) : int
return int

Sensor() public method

public Sensor ( string Name, bool Simulation, System.Logger Logger ) : System
Name string
Simulation bool
Logger System.Logger
return System

StandardDeviation() public method

public StandardDeviation ( int readNumber = 10 ) : double
readNumber int
return double

StartCalibration() public method

public StartCalibration ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

calibration protected_oe property

protected Calibration_2Points calibration
return Calibration_2Points

firstValue protected_oe property

protected bool firstValue
return bool

isCalibrating protected_oe property

protected bool isCalibrating
return bool

logger public_oe property

public Logger,System logger
return System.Logger

voltage protected_oe property

protected double voltage
return double