C# Class OpenHardwareMonitor.DAL.DataManager

Afficher le fichier Open project: pklinef/open-hardware-monitor

Méthodes publiques

Méthode Description
AddHardware ( OpenHardwareMonitor.Hardware.Hardware hardware ) : void
AggregateHistoricalData ( object unused ) : void
BeginTransaction ( ) : void
EndTransaction ( ) : void
GetAggregateData ( long componentSensorId, double &min, double &max, double &avg, double &stddev, string &componentType, SensorType &sensorName ) : bool
GetAlerts ( ) : List
GetComponentId ( string name, string type ) : long
GetComponentSensorId ( String fullSensorPath ) : long
GetComputerComponentId ( long componentId, long parentComponentId ) : long
GetComputerId ( long macAddress ) : long
GetData ( string name, string type, SensorType sensorType, double &average, double &min, double &max, double &stddev ) : bool

Gets the data from the server to return to the client. Null is allowed for the name only

GetDataForSensor ( long componentSensorId, System.DateTime startTime, System.TimeSpan timeRange, DateRangeType minResolution, DateRangeType maxResolution, double &average, double &min, double &max, double &stddev ) : List
GetEmailSettings ( string &SMTPServer, string &EmailAddress ) : void
GetLastAccessTime ( ) : System.DateTime
GetSensorTypeId ( string name, string units ) : long
Initialize ( ) : void
InsertData ( List dataToInsert ) : bool

Inserts data into the server database. Nothing is allowed to be null

InsertSensorData ( String computerComponentId, String sensorID, int sensorTypeID, double value ) : void
InsertUser ( string userName, string name ) : void
RegisterSensor ( string computerComponentId, string sensorId, string sensorName, int sensorTypeId ) : void
SetEmailSettings ( string SMTPServer, string EmailAddress ) : void
UpdateLastAccessTime ( ) : void

Private Methods

Méthode Description
CreateTables ( ) : void
DataManager ( ) : System
GetComponentId ( OpenHardwareMonitor.Hardware.Hardware hardware ) : System.Int64
GetComponentSensorList ( ) : List
GetDataInRegistry ( string registryKey ) : string
GetTimeSpanFromDateRangeType ( DateRangeType drt ) : System.TimeSpan
InitializeSensorTypeTable ( ) : void
InsertHistoricalData ( long componentSensorId, System.DateTime measureTime, DateRangeType dateRangeType, long count, double sum, double sumOfSquares, double min, double max ) : void
RoundDownToDateRangeType ( System.DateTime dt, DateRangeType drt ) : System.DateTime
RoundDownToDay ( System.DateTime dt ) : System.DateTime
RoundDownToHour ( System.DateTime dt ) : System.DateTime
RoundDownToMinute ( System.DateTime dt ) : System.DateTime
RoundDownToSecond ( System.DateTime dt ) : System.DateTime
SetDataInRegistry ( string registryKey, string registryValue ) : void

Method Details

AddHardware() public static méthode

public static AddHardware ( OpenHardwareMonitor.Hardware.Hardware hardware ) : void
hardware OpenHardwareMonitor.Hardware.Hardware
Résultat void

AggregateHistoricalData() public static méthode

public static AggregateHistoricalData ( object unused ) : void
unused object
Résultat void

BeginTransaction() public static méthode

public static BeginTransaction ( ) : void
Résultat void

EndTransaction() public static méthode

public static EndTransaction ( ) : void
Résultat void

GetAggregateData() public static méthode

public static GetAggregateData ( long componentSensorId, double &min, double &max, double &avg, double &stddev, string &componentType, SensorType &sensorName ) : bool
componentSensorId long
min double
max double
avg double
stddev double
componentType string
sensorName SensorType
Résultat bool

GetAlerts() public static méthode

public static GetAlerts ( ) : List
Résultat List

GetComponentId() public static méthode

public static GetComponentId ( string name, string type ) : long
name string
type string
Résultat long

GetComponentSensorId() public static méthode

public static GetComponentSensorId ( String fullSensorPath ) : long
fullSensorPath String
Résultat long

GetComputerComponentId() public static méthode

public static GetComputerComponentId ( long componentId, long parentComponentId ) : long
componentId long
parentComponentId long
Résultat long

GetComputerId() public static méthode

public static GetComputerId ( long macAddress ) : long
macAddress long
Résultat long

GetData() public static méthode

Gets the data from the server to return to the client. Null is allowed for the name only
public static GetData ( string name, string type, SensorType sensorType, double &average, double &min, double &max, double &stddev ) : bool
name string
type string
sensorType SensorType
average double
min double
max double
stddev double
Résultat bool

GetDataForSensor() public static méthode

public static GetDataForSensor ( long componentSensorId, System.DateTime startTime, System.TimeSpan timeRange, DateRangeType minResolution, DateRangeType maxResolution, double &average, double &min, double &max, double &stddev ) : List
componentSensorId long
startTime System.DateTime
timeRange System.TimeSpan
minResolution DateRangeType
maxResolution DateRangeType
average double
min double
max double
stddev double
Résultat List

GetEmailSettings() public static méthode

public static GetEmailSettings ( string &SMTPServer, string &EmailAddress ) : void
SMTPServer string
EmailAddress string
Résultat void

GetLastAccessTime() public static méthode

public static GetLastAccessTime ( ) : System.DateTime
Résultat System.DateTime

GetSensorTypeId() public static méthode

public static GetSensorTypeId ( string name, string units ) : long
name string
units string
Résultat long

Initialize() public static méthode

public static Initialize ( ) : void
Résultat void

InsertData() public static méthode

Inserts data into the server database. Nothing is allowed to be null
public static InsertData ( List dataToInsert ) : bool
dataToInsert List
Résultat bool

InsertSensorData() public static méthode

public static InsertSensorData ( String computerComponentId, String sensorID, int sensorTypeID, double value ) : void
computerComponentId String
sensorID String
sensorTypeID int
value double
Résultat void

InsertUser() public static méthode

public static InsertUser ( string userName, string name ) : void
userName string
name string
Résultat void

RegisterSensor() public static méthode

public static RegisterSensor ( string computerComponentId, string sensorId, string sensorName, int sensorTypeId ) : void
computerComponentId string
sensorId string
sensorName string
sensorTypeId int
Résultat void

SetEmailSettings() public static méthode

public static SetEmailSettings ( string SMTPServer, string EmailAddress ) : void
SMTPServer string
EmailAddress string
Résultat void

UpdateLastAccessTime() public static méthode

public static UpdateLastAccessTime ( ) : void
Résultat void