Esempio n. 1
0
 private void PostHardwareEnabled()
 {
     //if (!_messageListeners.Contains(_afMessageListenerFilter))
     //{
     _commandInterface.AddAsynchronousCommandListener(_afMessageListenerFilter);
     //}
     // if (!announceListeners.contains(announceListenerFilter)) {
     _commandInterface.AddAsynchronousCommandListener(_announceListenerFilter);
     // }
 }
Esempio n. 2
0
        /// <summary>
        /// The constructor for setting expected command ID and command interface.
        /// Sets self as listener for command in command interface.
        ///
        /// <param name="commandId">the command ID</param>
        /// <param name="commandInterface">the command interface</param>
        /// </summary>
        public BlockingCommandReceiver(ZToolCMD commandId, ICommandInterface commandInterface)
        {
            _getCommandLockObject = new object();

            _commandId        = commandId;
            _commandInterface = commandInterface;
            Log.Verbose("Waiting for asynchronous response message {}.", commandId);
            _commandInterface.AddAsynchronousCommandListener(this);
        }