コード例 #1
0
        public byte[] ToByteArray()
        {
            var commandBytes = new List <byte> {
                MasterValveDelay
            };

            commandBytes.AddRange(ZWaveValue.GetValueBytes(PressureHighThreshold, 0x00));
            commandBytes.AddRange(ZWaveValue.GetValueBytes(PressureLowThreshold, 0x00));
            commandBytes.Add((byte)SensorPolarity);
            return(commandBytes.ToArray());
        }
コード例 #2
0
        public static ZWaveMessage Set(ZWaveNode node, Value ptype, double temperature)
        {
            List <byte> message = new List <byte>();

            message.AddRange(new byte[] {
                (byte)CommandClass.ThermostatSetPoint,
                (byte)Command.ThermostatSetPointSet,
                (byte)ptype
            });
            var setPoint = ThermostatSetPoint.GetSetPointData(node);

            message.AddRange(ZWaveValue.GetValueBytes(temperature, setPoint.Precision, setPoint.Scale, setPoint.Size));
            return(node.SendDataRequest(message.ToArray()));
        }
コード例 #3
0
        public byte[] ToByteArray()
        {
            var commandBytes = new List <byte>
            {
                Convert.ToByte(UseMasterValve),
                UseMasterValve ? (byte)1 : ValveId,
                NominalCurrentHighThreshold,
                NominalCurrentLowThreshold
            };

            commandBytes.AddRange(ZWaveValue.GetValueBytes(MaximumFlow, 0x00));
            commandBytes.AddRange(ZWaveValue.GetValueBytes(FlowHighThreshold, 0x00));
            commandBytes.AddRange(ZWaveValue.GetValueBytes(FlowLowThreshold, 0x00));
            commandBytes.Add((byte)(Convert.ToByte(UseRainSensor) + (Convert.ToByte(UseMoistureSensor) << 1)));
            return(commandBytes.ToArray());
        }