예제 #1
0
 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());
 }
예제 #2
0
 public DigitalState(bool value) : this(value, DirectDisplay.Resolve())
 {
 }
예제 #3
0
 public AnalogValue(double value, string unit) : this(value, unit, DirectDisplay.Resolve())
 {
 }