Example #1
0
        /// <summary>
        /// Read a number of attributes given a list of attribute IDs. Care must be taken not to request too many attributes
        /// so as to exceed the allowable frame length
        ///
        /// <param name="attributes">List of attribute identifiers to read</param>
        /// <returns>command Task</returns>
        /// </summary>
        public Task <CommandResult> Read(List <ushort> attributes)
        {
            ReadAttributesCommand command = new ReadAttributesCommand();

            command.ClusterId          = _clusterId;
            command.Identifiers        = attributes;
            command.DestinationAddress = _zigbeeEndpoint.GetEndpointAddress();

            return(Send(command));
        }
Example #2
0
        protected Task <CommandResult> Send(ZclCommand command)
        {
            command.DestinationAddress = _zigbeeEndpoint.GetEndpointAddress();
            if (IsClient())
            {
                command.CommandDirection = ZclCommandDirection.SERVER_TO_CLIENT;
            }

            return(_zigbeeManager.SendTransaction(command, new ZclTransactionMatcher()));
        }