ControlExpressionUnits Class

Helper class to extract all time series and sensors, and their units, from an expression.

Definition

Namespace: DHI.Mike1D.ControlModule
Assembly: DHI.Mike1D.ControlModule (in DHI.Mike1D.ControlModule.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class ControlExpressionUnits : ExpressionBaseVisitor<Object>
Inheritance
Object    ExpressionBaseVisitorObject    ControlExpressionUnits

Constructors

ControlExpressionUnits Default constructor

Properties

AsBaseExpression
(Inherited from ExpressionBaseVisitorObject)
InCondition Bool indicating if we are searching in a boolean condition

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FindExprUnits Find all unit related sensors and ts functions of the expr

For TsFileLookup, a new TimeSeriesInfo class is created and added to the TsInfos list

FindTsUnits Find effective units of all time series stored in the TsInfos, and store in TsUnit. If file or could not be found or some other error occurs, the entry in the TsUnit will be null.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)
Visit
(Inherited from ExpressionBaseVisitorObject)
VisitBinaryOperator
(Inherited from ExpressionBaseVisitorObject)
VisitConstant
(Inherited from ExpressionBaseVisitorObject)
VisitExpression``1
(Inherited from ExpressionBaseVisitorObject)
VisitFunction Internal method to find and extract all TSLookup and TSFileLookup functions, store in TsInfos
(Overrides ExpressionBaseVisitor.VisitFunction(IFunction))
VisitIfThenElseOperator Handle "If" special: The condition is marked as InCondition = true
(Overrides ExpressionBaseVisitor.VisitIfThenElseOperator(IIfThenElseOperator))
VisitUnaryOperator
(Inherited from ExpressionBaseVisitorObject)
VisitVariable Internal method to identify sensors with a unit
(Overrides ExpressionBaseVisitor.VisitVariable(IVariable))

Fields

ConditionUnits 
ExpressionUnits 
Sensors Sensors with units found in expression
TsInfos Time series found in expression

See Also