C# Class ElectricityMeter.Calculators.ElectricityCalculator

Inheritance: IElectricityCalculator, IAnalogReader
Show file Open project: HouseOfTheFuture/IoT-Device

Public Methods

Method Description
AnalogRead ( uint pin ) : int
ElectricityCalculator ( bool isArm ) : System
GetSupplyVoltage ( ) : long
calcIrms ( uint numberOfSamples ) : double
calcVI ( uint crossings, uint timeout ) : void
current ( uint _inPinI, double _ICAL ) : void
currentTX ( uint _channel, double _ICAL ) : void
readVcc ( ) : long
serialprint ( ) : void
voltage ( uint _inPinV, double _VCAL, double _PHASECAL ) : void
voltageTX ( double _VCAL, double _PHASECAL ) : void

Private Methods

Method Description
ADCBits ( bool isArm ) : int
ADCCounts ( bool isArm ) : int

Method Details

AnalogRead() public method

public AnalogRead ( uint pin ) : int
pin uint
return int

ElectricityCalculator() public method

public ElectricityCalculator ( bool isArm ) : System
isArm bool
return System

GetSupplyVoltage() public method

public GetSupplyVoltage ( ) : long
return long

calcIrms() public method

public calcIrms ( uint numberOfSamples ) : double
numberOfSamples uint
return double

calcVI() public method

public calcVI ( uint crossings, uint timeout ) : void
crossings uint
timeout uint
return void

current() public method

public current ( uint _inPinI, double _ICAL ) : void
_inPinI uint
_ICAL double
return void

currentTX() public method

public currentTX ( uint _channel, double _ICAL ) : void
_channel uint
_ICAL double
return void

readVcc() public method

public readVcc ( ) : long
return long

serialprint() public method

public serialprint ( ) : void
return void

voltage() public method

public voltage ( uint _inPinV, double _VCAL, double _PHASECAL ) : void
_inPinV uint
_VCAL double
_PHASECAL double
return void

voltageTX() public method

public voltageTX ( double _VCAL, double _PHASECAL ) : void
_VCAL double
_PHASECAL double
return void