C# Class PowerCalculations.PowerMultiCalculator.PowerCalculationConfigurationValidation

Implements validations for power calculations in the power calculation adapter
Datei anzeigen Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
ValidateDatabaseDefinitions ( ) : void

Validates that data operation and adapter instance exist within database.

ValidatePowerCalculationConfigurations ( AdoDataConnection database, string nodeIDQueryString, ulong trackingVersion, string arguments, Action statusMessage, Action processException ) : void

Data operation to validate power calculation configuration. This method checks that input measurements and non-null output measurements exist, are enabled, and have the correct signal type. If null output measurements are found in the configuration, this method will create the output measurements and update the configuration.

Private Methods

Method Description
AdapterInstanceExists ( AdoDataConnection database ) : bool

Returns true if a data operation exists to run this class. Returns false otherwise.

CheckInputMeasurementsAreEnabled ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void

Verifies that input measurements are enabled. Power calculations are disabled where input measurements are disabled.

CheckInputMeasurementsExist ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void

Verifies that input measurements exist. Power calculations are disabled where input measurements do not exist.

CheckInputMeasurementsSignalType ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void

Validates that input measurements have the correct signal type. Power calculations are disabled where inputs have the wrong signal types.

CheckOutputMeasurementsAreEnabled ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void

Verifies that output measurements are enabled. Power calculations will be disabled where outputs are disabled.

CheckOutputMeasurementsExist ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void

Verifies that output measurements exist in the measurement table. Power calculations are disabled where the configured outputs do not exist.

CheckOutputMeasurementsSignalType ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void

Verifies that output measurements are set to calculated signal type. Calculations are disabled if output measurements are not configured correctly.

CreateAdapterInstance ( AdoDataConnection database ) : void

Creates a data operation to run the validations in this class.

CreateDataOperation ( AdoDataConnection database ) : void

Creates a data operation to run the validations in this class.

CreateMeasurement ( string companyAcronym, string deviceAcronym, string vendorAcronym, string signalTypeAcronym, string circuitDescription, int deviceID, int historianID, string descriptionSuffix ) : PowerCalculations.PowerMultiCalculator.PowerMeasurement

Creates a new measurement object for power calculation output measurements

CreateOutputMeasurementsWhereNull ( AdoDataConnection database, string nodeIDQueryString, Action statusMessage ) : void
DataOperationExists ( AdoDataConnection database ) : bool

Returns true if a data operation exists to run this class. Returns false otherwise.

RunDatabaseValidation ( AdoDataConnection database, Action statusMessage, string query, string failureMessage ) : void
UpdatePowerCalculation ( AdoDataConnection database, int powerCalculationID, System.Guid activePowerOutputSignalID = null, System.Guid reactivePowerOutputSignalID = null, System.Guid apparentPowerOutputSignalID = null ) : void

Method Details

ValidateDatabaseDefinitions() public static method

Validates that data operation and adapter instance exist within database.
public static ValidateDatabaseDefinitions ( ) : void
return void

ValidatePowerCalculationConfigurations() public static method

Data operation to validate power calculation configuration. This method checks that input measurements and non-null output measurements exist, are enabled, and have the correct signal type. If null output measurements are found in the configuration, this method will create the output measurements and update the configuration.
public static ValidatePowerCalculationConfigurations ( AdoDataConnection database, string nodeIDQueryString, ulong trackingVersion, string arguments, Action statusMessage, Action processException ) : void
database AdoDataConnection Database connection for configuration information
nodeIDQueryString string Node ID for database queries
trackingVersion ulong Not used
arguments string Not used
statusMessage Action Delegate for method to communicate status updates
processException Action Exception handling delegate
return void