⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hcieventproc.h

📁 蓝牙协议HCI层指令发送,主要用于测试HCI以下的代码及RF部分测试.
💻 H
字号:

//--------------------------------------------------------------- %FILH_BEG% --
//
//  Project:		$$ProjectName
//
//  File name:		HCIEventProc.h
//  Author:			
//  Description:	  
//
//  Revision History:
//  $Log: $
//
//  Rev 1.00  15 July 2000 Initial release
//    
//
//  Copyright (c) TelenComm Corporation  2000   -   All rights reserved    
//--------------------------------------------------------------- %FILH_END% 
#ifndef HCI_EVENT_PROC_H
#define HCI_EVENT_PROC_H

//------------------------------------------------------------------------------
//
//  Includes
//
//------------------------------------------------------------------------------

#include "..\..\Common\Common.h"
#include "HCIEventProcFunctions.h"




class CHCIEventProcessor:public HCI_EventsInterfaceProcFunctions
{
public:

  typedef uint8 (*tHCIEventFunction)(CHCI_EventPacket& HCI_EventPacket);
  enum tEventParseStatus { ePARSING_OK, eUNKNOWN_EVENT,ePARAMETER_SIZE_MISMATCH};
  CHCIEventProcessor();
  bool ValidateHCIEventTable(void);
  void PrintHCIEventTable();
  int FindHCIEventType(uint8 OpCode);
  tEventParseStatus  ParseHCIEvent(CHCI_EventPacket& HCI_EventPacket);


  struct  tHCIEventTableItem
  {
    tHCIEventOpCode           OpCode;
    tHCIEventParameterLength  ParameterTotalLength;
    tHCIEventFunction         EventFunction;
    #ifdef BT_DEBUG
      tHCIEventSpecSection    SpecSection;
      tHCIEventName           Name;
    #endif 
  };
public:

  static tHCIEventTableItem m_HCIEventTable[];
  static uint32  s_NoOfEvents;
  static uint16  m_ListOfOCFWithVariableParams[];
  static int     s_NoOfOCFWithVariableParams;

};

struct sConnectionRequestEventParams
{
  sBD_ADDR        sDevAddr;
  sCLASS_OF_DEVICE    sClassOfDevice;
  tLINK_TYPE      tLinkType;
};


//------------------------------------------------------------------------------
//
//  Macros
//
//------------------------------------------------------------------------------
// HCI Event opcode  Parameter Table 

#define DECLARE_NO_OF_EVENTS   uint32 CHCIEventProcessor::s_NoOfEvents = sizeof(CHCIEventProcessor::m_HCIEventTable) / sizeof (CHCIEventProcessor::tHCIEventTableItem);

#define BEGIN_HCI_EVENT_TABLE() struct CHCIEventProcessor::tHCIEventTableItem  CHCIEventProcessor::m_HCIEventTable[] = {

#define END_HCI_EVENT_TABLE()    }; DECLARE_NO_OF_EVENTS;

#define HCI_EVENT_TABLE_ITEM(OpCode, SpecSection, Function, ParameterLength) {OpCode, ParameterLength, Function, #SpecSection, #Function },


#endif HCI_EVENT_PROC_H

//------------------------------------------------------------------------------
// End of HCIEventProc.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -