BTool.SendCmds.SendUTIL C# (CSharp) Method

SendUTIL() public method

public SendUTIL ( HCICmds cmd ) : bool
cmd HCICmds
return bool
        public bool SendUTIL(HCICmds.UTILCmds.UTIL_Reset cmd)
        {
            bool success = true;
            try
            {
                byte dataLength = cmd.dataLength;
                byte[] data = new byte[dataLength + 4];
                int index = 0;
                bool dataErr = false;
                if (m_deviceFormUtils.LoadMsgHeader(ref data, ref index, 1, cmd.opCodeValue, dataLength)
                && !m_dataUtils.Load8Bits(ref data, ref index, (byte)cmd.resetType, ref dataErr))
                    TransmitCmd(cmd.cmdName, cmd.opCodeValue, data);
                if (dataErr)
                    success = HandleDataError(cmd.cmdName);
            }
            catch (Exception ex)
            {
                success = HandleException(cmd.cmdName, ex.Message);
            }
            return success;
        }