public static IValueDisplay ResolveDisplay(this CType ctype) { // [NOTE] This method may be suitable to have a string as a second parameter, // which is actually a component description (led, pir, button, ...), if // necessary to distinguish certain components if (ctype == ComponentTypes.DigitalSensor) { return(YesNoDisplay.Resolve()); } if (ctype == ComponentTypes.DigitalElement) { return(OnOffDisplay.Resolve()); } return(DirectDisplay.Resolve()); }
public DigitalState(bool value) : this(value, DirectDisplay.Resolve()) { }
public AnalogValue(double value, string unit) : this(value, unit, DirectDisplay.Resolve()) { }