Exemple #1
0
 public Value GetValue(ZWValueID zwv)
 {
     foreach (Value value in m_values)
     {
         if (value.CommandClassID == zwv.GetCommandClassId().ToString() && value.Index == zwv.GetIndex().ToString())
         {
             return value;
         }
     }
     return new Value();
 }
Exemple #2
0
 public Value GetValue(ZWValueID zwv)
 {
     foreach (Value value in m_values)
     {
         if (value.CommandClassID == zwv.GetCommandClassId().ToString() && value.Index == zwv.GetIndex().ToString())
         {
             return(value);
         }
     }
     return(new Value());
 }
Exemple #3
0
        public void RemoveValueId(ZWValueID valueId)
        {
            ZWValueID valueIdForRemoval = _valueIds.SingleOrDefault(v => v.GetCommandClassId() == valueId.GetCommandClassId() && v.GetIndex() == valueId.GetIndex());

            if (valueIdForRemoval != null)
            {
                _valueIds.Remove(valueIdForRemoval);
            }
        }
        //private readonly ZWValueID _valueId;
        //private readonly ZWManager _manager;
        public ZWaveValueProperties(ZWValueID valueId, ZWManager manager)
        {
            //_manager = manager;
            //_valueId = valueId;

            _commandClassId = (Enums.CommandClass) valueId.GetCommandClassId();
            _genre = valueId.GetGenre();
            _value = valueId.GetValue(manager);
            _help = manager.GetValueHelp(valueId);
            _pollingEnabled = manager.IsValuePolled(valueId);
            _homeId = valueId.GetHomeId();
            _id = valueId.GetId();
            _index = valueId.GetIndex();
            _instance = valueId.GetInstance();
            _label = manager.GetValueLabel(valueId);
            _nodeId = valueId.GetNodeId();
            _type = valueId.GetType();
            _units = manager.GetValueUnits(valueId);
        }