Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public DoubleByte(ZToolCMD cmd)
     : this((ushort)cmd)
 {
 }