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

            return(_zigbeeEndpoint.SendTransaction(command, new ZclTransactionMatcher()));
        }
Example #2
0
 /**
  * Notify command listeners of an received {@link ZclCommand}.
  *
  * @param command the {@link ZclCommand} to notify
  */
 private void notifyCommandListener(ZclCommand command)
 {
     foreach (IZclCommandListener listener in _commandListeners)
     {
         //    NotificationService.execute(new Runnable() {
         //            @Override
         //            public void run()
         //    {
         //        listener.commandReceived(command);
         //    }
         //});
     }
 }
Example #3
0
 /// <summary>
 /// Processes a command received in this cluster. This is called from the node so we already know that the command is
 /// addressed to this endpoint and this cluster.
 ///
 /// <param name="command">the received ZclCommand</param>
 /// </summary>
 public void HandleCommand(ZclCommand command)
 {
     NotifyCommandListener(command);
 }