Beispiel #1
0
        /// <summary>
        /// Get an array of bytes to use as the default arguments for a
        /// command when no arguments are given; we have to specify the
        /// expected data/response size as the arguments instead.
        /// </summary>
        /// <param name="command">Command</param>
        /// <returns>byte[]</returns>
        public static byte[] GetCommandDefaultArgumentsBytes(CommandEnum command)
        {
            ByteStream bytes = new ByteStream();

            bytes.BinaryWriter.Write(CommandHelper.GetCommandDataSize(command));
            return(bytes.GetBytes());
        }
Beispiel #2
0
 /// <summary>
 /// Get the expected data/response size for the command.
 /// </summary>
 /// <returns>int</returns>
 public int GetCommandDataSize()
 {
     return(CommandHelper.GetCommandDataSize(this.Command));
 }