コード例 #1
0
        public override bool SaveToDevice(ref FaHDevice faHDevice, out bool moreIndices)
        {
            if (this.resultCode == KNXHelpers.knxPropertyReturnValues.MoreIndices)
            {
                faHDevice.WritePropertyMoreIncides(ObjectID, PropertyID, (ushort)(this.FieldID + 1));
            }

            moreIndices = faHDevice.WritePropertyValue(this.ObjectID, this.PropertyID, this.FieldID, this.FPSRpayload);
            return(true);
        }
コード例 #2
0
        public KNXmessage Process(FaHDevice atHomeDevice)
        {
            if (PropertyControl != FAHFunctionPropertyCommand.PropertyControlTypes.WriteValue)
            {
                throw new InvalidCastException();
            }

            int ChannelIndex = ObjectID;
            int propIndex    = PropertyID;
            int lFieldID     = (int)FieldID;
            //TODO check to keep fieldID in value to store??/
            bool       hasMoreIndices = atHomeDevice.WritePropertyValue(ChannelIndex, propIndex, lFieldID, RemainderBytesAsPayload(5));
            KNXmessage k = CreateEmptySuccessMessage(hasMoreIndices);

            k.Payload.AppendPayload(new byte[] { (byte)FieldID });
            return(k);
        }