BTool.SendCmds.SendHCIExt C# (CSharp) Méthode

SendHCIExt() public méthode

public SendHCIExt ( HCICmds cmd ) : bool
cmd HCICmds
Résultat bool
        public bool SendHCIExt(HCICmds.HCIExtCmds.HCIExt_SetRxGain 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.rxGain, 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;
        }