コード例 #1
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);
        }
コード例 #2
0
 public DoubleByte(ZToolCMD cmd)
     : this((ushort)cmd)
 {
 }