Exemple #1
0
 public OpenZWaveDeviceValue Find(IOpenZWaveDeviceValueMatcher matcher)
 {
     lock (this)
     {
         return(_values.FirstOrDefault(matcher.Matches));
     }
 }
Exemple #2
0
        public bool Contains(IOpenZWaveDeviceValueMatcher matcher)
        {
            var match  = Find(matcher);
            var result = match != null;

            return(result);
        }
        public static IEnumerable<OpenZWaveDeviceValue> Matches(this IEnumerable<OpenZWaveDeviceValue> values, IOpenZWaveDeviceValueMatcher matcher)
        {
            var results = values.Where(matcher.Matches);

            return results;
        }
        public static OpenZWaveDeviceValue Match(this IEnumerable<OpenZWaveDeviceValue> values, IOpenZWaveDeviceValueMatcher matcher)
        {
            var result = values.Matches(matcher).FirstOrDefault();

            return result;
        }
 protected MeasurementNodeDataEntry(OpenZWaveDevice device, IOpenZWaveDeviceValueMatcher unitsMatcher)
     : base(device, CreateMatcher(device, unitsMatcher))
 {
 }
        private static IOpenZWaveDeviceValueMatcher CreateMatcher(OpenZWaveDevice device, IOpenZWaveDeviceValueMatcher unitsMatcher)
        {
            var result = new CompositeMatcher(
                new IdMatcher(device.Id),
                new CommandClassMatcher(CommandClass.SensorMultilevel),
                unitsMatcher
                );

            return(result);
        }
        public static IEnumerable <OpenZWaveDeviceValue> Matches(this IEnumerable <OpenZWaveDeviceValue> values, IOpenZWaveDeviceValueMatcher matcher)
        {
            var results = values.Where(matcher.Matches);

            return(results);
        }
        public static OpenZWaveDeviceValue Match(this IEnumerable <OpenZWaveDeviceValue> values, IOpenZWaveDeviceValueMatcher matcher)
        {
            var result = values.Matches(matcher).FirstOrDefault();

            return(result);
        }
Exemple #9
0
 protected NodeDataEntry(OpenZWaveDevice device, IOpenZWaveDeviceValueMatcher matcher, bool?initialValueIsValid = null)
 {
     Device  = device;
     Matcher = matcher;
     _initialValueIsValid = initialValueIsValid ?? true;
 }