/// <summary>
        /// Clone Lego Command
        /// </summary>
        public virtual object Clone()
        {
            LegoCommand target = new LegoCommand();

            target.ExpectedResponseSize = this.ExpectedResponseSize;

            // copy System.Byte[] CommandData
            if (this.CommandData != null)
            {
                target.CommandData = new System.Byte[this.CommandData.GetLength(0)];
                System.Buffer.BlockCopy(this.CommandData, 0, target.CommandData, 0, this.CommandData.GetLength(0));
            }
            target.RequireResponse = this.RequireResponse;
            target.TryCount = this.TryCount;
            target.TimeStamp = this.TimeStamp;
            return target;
        }
 /// <summary>
 /// LegoLSWrite
 /// </summary>
 /// <param name="cmd"></param>
 public LegoLSWrite(LegoCommand cmd)
     : base(3, LegoCommand.NxtDirectCommand, (byte)LegoCommandCode.LSWrite, 0x00, 0x00, 0x00)
 {
     this.CommandData = cmd.CommandData;
 }