Ejemplo n.º 1
0
        public KNXmessage Process(FaHDevice atHomeDevice)
        {
            if (payloadReference.PayloadByteData.Length == 7)
            {
                Console.WriteLine("Odd Size");
                return(CreateEmptySuccessMessage(false));
            }

            if (PropertyControl != FAHFunctionPropertyCommand.PropertyControlTypes.DeleteConn)
            {
                throw new InvalidCastException();
            }

            int  ChannelIndex = ObjectID;
            int  propIndex    = PropertyID;
            bool hasMoreIndices;

            if (atHomeDevice.RemoveChannelConnection(ChannelIndex, propIndex, ConnectionID, GroupValueAddress, out hasMoreIndices))
            {
                return(CreateEmptySuccessMessage(hasMoreIndices));
            }
            else
            {
                //For now we simply accept all delete commands, succesfull or not.
                return(CreateEmptySuccessMessage(hasMoreIndices));
            }
            //return CreateCommandNotSupportedMessage();
        }