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

📄 hcieventprocfunctions.h

📁 蓝牙协议HCI层指令发送,主要用于测试HCI以下的代码及RF部分测试.
💻 H
字号:
//--------------------------------------------------------------- %FILH_BEG% --
//
//  Project:		$$ProjectName
//
//  File name:		HCIEventProcFunction.h	
//
//  Author:			 
//  Description:	  
//
//  Revision History:
//  $Log: $
//
//  rev 1.04  05/17/01 Ek .Changed u8CommandOpcode to uint8 from uint16 in "struct sCommandCompleteEvent"
//						   to be sure it is align correctly when code is compiled under Release
//                         compiler to reduce code size.
//
//                         Note: Elements of structure align correctly for Debug compile but not for 
//                         Release configuration unless compiler option \O2 which is used for speed
//                         optimization is removed or care should be taken to declare elements of 
//                         all of the structures in uint8 to be safe.
//  rev 1.03  04/16/01 EK .Changed sReturnLinkKeysEvent	structure to include an array of BdAddr and linkKey's
//                         with a size of 1 Byte.
//  Rev 1.02  10/06/00  EK Added DebugInformationEvent to the HCI_EventsInterfaceProcFunctions class
//                         and sDebugInformationEvent to the list of structures.
//  Rev 1.00  15 July 2000 Initial release
//    
//
//  Copyright (c) TelenComm Corporation  2000   -   All rights reserved    
//--------------------------------------------------------------- %FILH_END% // BTHostDoc.cpp : implementation of the CBTHostDoc class
//
#ifndef HCI_EVENT_PROC_FUNCTIONS_H
#define HCI_EVENT_PROC_FUNCTIONS_H

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

#include "..\..\Common\Common.h"
#include "HCIEventPacket.h"

//------------------------------------------------------------------------------
//
//   HCI  Interface Functions for processing Event packets.
//
//------------------------------------------------------------------------------
class HCI_EventsInterfaceProcFunctions
{
public:
  static   uint8    InquiryCompleteEvent                      (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    InquiryResultEvent                        (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ConnectionCompleteEvent                   (CHCI_EventPacket& HCI_EventPacket);  
  static   uint8    ConnectionRequestEvent                    (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    DisconnectionCompleteEvent                (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    AuthenticationCompleteEvent               (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    RemoteNameRequestCompleteEvent            (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    EncryptionChangeEvent                     (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ChangeConnectionLinkKeyCompleteEvent      (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    MasterLinkKeyCompleteEvent                (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ReadRemoteSupportedFeaturesCompleteEvent  (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ReadRemoteVersionInformationCompleteEvent (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    QosSetupCompleteEvent                     (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    CommandCompleteEvent                      (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    CommandStatusEvent                        (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    HardwareErrorEvent                        (CHCI_EventPacket& HCI_EventPacket);
  static   uint8    FlushOccuredEvent                         (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    RoleChangeEvent                           (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    NumberOfCompletedPacketsEvent             (CHCI_EventPacket& HCI_EventPacket);
  static   uint8    ModeChangeEvent                           (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ReturnLinkKeysEvent                       (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    PinCodeRequestEvent                       (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    LinkKeyRequestEvent                       (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    LinkKeyNotificationEvent                  (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    LoopbackCommandEvent                      (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    DataBufferOverflowEvent                   (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    MaxSlotsChangeEvent                       (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ReadClockOffsetCompleteEvent              (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    ChangeConnectionPacketTypeEvent           (CHCI_EventPacket& HCI_EventPacket);
  static   uint8    QosViolationEvent                         (CHCI_EventPacket& HCI_EventPacket);
  static   uint8    PageScanModeChangeEvent                   (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    PageScanRepeatationModeChangeEvent        (CHCI_EventPacket& HCI_EventPacket); 
  static   uint8    DebugInformationEvent                     (CHCI_EventPacket& HCI_EventPacket);

  //static void ParamListForOutput();

  struct sInquiryCompleteEvent
  {
	 uint8				Status ;						//teHCI_EVENT_ERROR_CODE teStatus;
	 uint8				u8NumResponses ;
  };

  struct sInquiryResultEvent
  {
   uint8                NUM_RESPONSES;
   sBD_ADDR             asDevAddr;						//[i]
   uint8                atPageScanRepetitionMode;		//[i]
   tPAGE_SCAN_PERIOD_MODE    atPageScanPeriodMode;		//[i]
   uint8                atPageScanMode;					//[i]
   sCLASS_OF_DEVICE     asClassOfDevice;				//[i]
   tCLOCK_OFFSET        atClockOffset;					//[i]
  };

  struct sConnectionCompleteEvent
  { 
    uint8				Status;
    tConnectionHandle   ConnectionHandle;
    sBD_ADDR			sDevAddr;
    tLINK_TYPE			tLinkType;
    tENCRYPTION_MODE    tEncryptionMode;
  };

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

  struct sDisconnectionCompleteEvent
  {
    uint8				Status;
    tConnectionHandle	ConnectionHandle;
	tREASON				tReason;
  };

  struct sAuthenticationCompleteEvent
  {
    uint8				Status;
	tConnectionHandle   ConnectionHandle;
  };


  struct sRemoteNameRequestCompleteEvent
  {
	uint8				Status;
    sBD_ADDR			sDevAddr;
    char				RemoteName[248];			//[i]
  };

  struct sEncryptionChangeEvent
  {
    uint8				 Status;
    tConnectionHandle    ConnectionHandle;
    uint8				 u8EncryptionEnable;
  };

  struct sChangeConnectionLinkKeyCompleteEvent
  {
	uint8				Status;
    tConnectionHandle   ConnectionHandle;
  };

  struct sMasterLinkKeyCompleteEvent
  {
	uint8				Status;
    tConnectionHandle   ConnectionHandle;
    uint8		        u8KeyFlag;
  };

  struct sReadRemoteSupportedFeaturesCompleteEvent
  {
	uint8				Status;
    tConnectionHandle   ConnectionHandle;
    sLMP_FEATURES       sLMP_Features;
  };

  struct sReadRemoteVersionInformationCompleteEvent
  {
	  uint8					Status;
      tConnectionHandle		ConnectionHandle;
      uint8					u8LMP_Version;
      uint16				u16ManufacturerName;
      uint16				u16LMP_Subversion;
  };

  struct sQosSetupCompleteEvent
  {
	uint8					Status;
    tConnectionHandle		ConnectionHandle;
    uint8					u8Flags;
    uint8					u8ServiceType;
    uint32				    u32TokenRate;
    uint32					u32PeakBW;
    uint32					u32Latency;
    uint32					u32DelayVariation;
  };

   //struct    CommandCompleteEvent( uint8    u8Flags,
  struct sCommandCompleteEvent
  {
    uint8					NumHCI_CmdPkts;
    uint8					u8CommandOpcode[2];
    //uint8					u8RetParameters;
  };

  struct sCommandStatusEvent
  {
	uint8					Status;
    uint8					u8NumHCICommandPackets;
    uint16					u16CommandOpcode;
  };

  struct sHardwareErrorEvent
  {
    uint8					HardwareCode;
  };

  
  struct sFlushOccuredEvent
  {
    tConnectionHandle		ConnectionHandle;
  };
  struct sRoleChangeEvent
  {
	uint8					Status;
    sBD_ADDR				sDevAddr;
    uint8					u8NewRole;
  };

  struct sNumberOfCompletedPacketsEvent
  {
	uint8			        NumOfHandles;
    tConnectionHandle		ConnectionHandle;
    uint16					HCNumOfCompletedPackets;	//[i]
  };

  struct sModeChangeEvent
  {
    uint8					Status;
    tConnectionHandle		aConnectionHandle;
    uint8			        u8CurrentMode;
    tINTERVAL		        tInterval;
  };
/*
  struct sReturnLinkKeysEvent
  {
	uint8			        NumKeys;
    sBD_ADDR				asDevAddr;//[255];		//[i]
    uint8					au8LinkKey;//[255];		//[i]
  };
  */
  struct sReturnLinkKeysEvent
  {
	uint8			        NumKeys;
	struct{
		sBD_ADDR				asDevAddr;//[255];		//[i]
		uint8					au8LinkKey[16];//[255];		//[i]
	} sLKeys[255] ;
  };

  struct sPinCodeRequestEvent
  {
    sBD_ADDR				sDevAddr ;
  };

  struct sLinkKeyRequestEvent
  {
    sBD_ADDR				sDevAddr;
  };

  struct sLinkKeyNotificationEvent
  {
	sBD_ADDR				sDevAddr;
    uint8					u8LinkKey;
  };
   
  struct sLoopbackCommandEvent
  {
    puint8				   pu8HCICommandPackets;
  };

  struct sDataBufferOverflowEvent
  {
	tLINK_TYPE				tLinkType; 
  };

  struct sMaxSlotsChangeEvent
  {
	tConnectionHandle		ConnectionHandle;
    uint8					LMP_MaxSlots;
  };
  struct sReadClockOffsetCompleteEvent
  {
    uint8					Status;
    tConnectionHandle		ConnectionHandle;
    tCLOCK_OFFSET			tClockOffset;
  };
  
  struct sChangeConnectionPacketTypeEvent
  {
    uint8					Status;
    tConnectionHandle		ConnectionHandle;
    eBaseBandPacketType     tPacketType;
  };

  struct sQosViolationEvent
  {
	tConnectionHandle		ConnectionHandle;
  };
  struct sPageScanModeChangeEvent
  {
    sBD_ADDR			    sDevAddr;
    ePageScanMode			atPageScanMode;
  };

  struct sPageScanRepeatationModeChangeEvent
  {
	sBD_ADDR		        sDevAddr;
    ePageScanRepMode		tPageScanRepetitionMode;
  };

  struct sDebugInformationEvent
  {
    uint8					TelenCommEvent;
    char				    DebugMessage[0xFF -1];
  };
};
  

//------------------------------------------------------------------------------
//
//  Declarations
//
//------------------------------------------------------------------------------


#endif HCI_EVENT_PROC_FUNCTIONS_H

//------------------------------------------------------------------------------
// End of HCIEvnet.h

⌨️ 快捷键说明

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