public static TmAlarmZonal CreateTmAlarmZonalFromDto(TmAlarmDto dto, TmAnalog tmAnalog) { return(new TmAlarmZonal(TmAlarmType.Zonal, dto.AlarmId, dto.AlarmName, dto.Importance, dto.InUse, dto.Active, tmAnalog, dto.Expr)); }
public TmAlarmZonal(TmAlarmType type, short id, string name, short importance, short isInUse, bool isActive, TmAnalog tmAnalog, string expression) : base(type, id, name, importance, isInUse, isActive, tmAnalog) { ThresholdName = expression; }
public static TmAlarmAnalog CreateTmAlarmAnalogFromDto(TmAlarmDto dto, TmAnalog tmAnalog) { return(new TmAlarmAnalog(TmAlarmType.Analog, dto.AlarmId, dto.AlarmName, dto.Importance, dto.InUse, dto.Active, tmAnalog, dto.Expr, dto.CmpSign)); }
public static TmAlarmValue CreateTmAlarmValueFromDto(TmAlarmDto dto, TmAnalog tmAnalog) { return(new TmAlarmValue(TmAlarmType.Value, dto.AlarmId, dto.AlarmName, dto.Importance, dto.InUse, dto.Active, tmAnalog, dto.CmpVal, dto.CmpSign)); }
public TmAlarmExpression(TmAlarmType type, short id, string name, short importance, short isInUse, bool isActive, TmAnalog tmAnalog, string expression, short compareSign) : base(type, id, name, importance, isInUse, isActive, tmAnalog) { Expression = expression; _isCompareGreaterThan = (compareSign == 0); }
public TmAlarmValue(TmAlarmType type, short id, string name, short importance, short isInUse, bool isActive, TmAnalog tmAnalog, float compareValue, short compareSign) : base(type, id, name, importance, isInUse, isActive, tmAnalog) { CompareValue = compareValue; _isCompareGreaterThan = (compareSign == 0); }
public TmAlarm(TmAlarmType type, short id, string name, short importance, short isInUse, bool isActive, TmAnalog tmAnalog) { Type = type; Id = id; Name = name; Importance = importance; IsInUse = (isInUse > 0); IsActive = isActive; TmAnalog = tmAnalog; }
public static TmAlarm CreateFromDto(TmAlarmDto dto, TmAnalog tmAnalog) { switch ((TmAlarmType)dto.Typ) { case TmAlarmType.Value: return(TmAlarmValue.CreateTmAlarmValueFromDto(dto, tmAnalog)); case TmAlarmType.Expression: return(TmAlarmExpression.CreateTmAlarmExpressionFromDto(dto, tmAnalog)); case TmAlarmType.Analog: return(TmAlarmAnalog.CreateTmAlarmAnalogFromDto(dto, tmAnalog)); case TmAlarmType.Zonal: return(TmAlarmZonal.CreateTmAlarmZonalFromDto(dto, tmAnalog)); default: return(null); } }