?? hcieventpacketform.cpp
字號:
//#include "HCIPacket.h"
#include "..\..\Inc\HCIError.h"
#include "..\..\Inc\HCIErrorStrTable.h"
#include "..\Inc\HCIEventPacket.h"
#include "..\Inc\HCIEventFormFunctions.h"
#include "..\Inc\HCIEventProcFunctions.h"
//------------------------------------------------------------------------------
//
// 5.2.1 Inquiry Complete Event
//
//------------------------------------------------------------------------------
BTLogicalIODevice* g_pBTLogicalIODevice;
void HCI_EventsInterfaceFormFunctions::InquiryCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,uint8 u8NumResponses )
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_INQUIRY_COMPLETE_EVENT )
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(u8NumResponses)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::InquiryResultEvent( uint8 u8NumResponses,
sBD_ADDR asDevAddr[],
ePageScanRepMode atPageScanRepetitionMode[],
tPAGE_SCAN_PERIOD_MODE atPageScanPeriodMode[],
ePageScanMode atPageScanMode[],
sCLASS_OF_DEVICE asClassOfDevice[],
tCLOCK_OFFSET atClockOffset[]
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_INQUIRY_RESULT_EVENT)
ADD_STD_PARAMETER(u8NumResponses)
FOR_LOOP(i,0,u8NumResponses)
{
ADD_STRUCT_PARAMETER(asDevAddr[i])
ADD_STD_PARAMETER((uint8)atPageScanRepetitionMode[i])
ADD_STD_PARAMETER(atPageScanPeriodMode[i])
ADD_STD_PARAMETER((uint8)atPageScanMode[i])
ADD_STRUCT_PARAMETER(asClassOfDevice[i])
ADD_STD_PARAMETER(atClockOffset[i])
}
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::ConnectionCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
sBD_ADDR sDevAddr,
tLINK_TYPE tLinkType,
tENCRYPTION_MODE tEncryptionMode
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_CONNECTION_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STRUCT_PARAMETER(sDevAddr)
ADD_STD_PARAMETER(tLinkType)
ADD_STD_PARAMETER(tEncryptionMode)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::ConnectionRequestEvent( sBD_ADDR sDevAddr,
sCLASS_OF_DEVICE sClassOfDevice,
tLINK_TYPE tLinkType
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_CONNECTION_REQUEST_EVENT)
ADD_STRUCT_PARAMETER(sDevAddr)
ADD_STRUCT_PARAMETER(sClassOfDevice)
ADD_STD_PARAMETER(tLinkType)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::DisconnectionCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
tREASON tReason
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_DISCONNECTION_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STD_PARAMETER(tReason)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::AuthenticationCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_AUTHENTICATION_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::RemoteNameRequestCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
sBD_ADDR sDevAddr,
char RemoteName[]
)
{
uint8 c;
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_REMOTE_NAME_REQUEST_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STRUCT_PARAMETER(sDevAddr)
FOR_LOOP(i,0,REMOTE_NAME_MAX_SIZE)
{
c = RemoteName[i];
if(!c ) break;
ADD_STD_PARAMETER(c)
}
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::EncryptionChangeEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
uint8 u8EncryptionEnable
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_ENCRYPTION_CHANGE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STD_PARAMETER(u8EncryptionEnable)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::ChangeConnectionLinkKeyCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_CHANGE_CONNECTION_LINK_KEY_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::MasterLinkKeyCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
uint8 u8KeyFlag
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_MASTER_LINK_KEY_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STD_PARAMETER(u8KeyFlag)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::ReadRemoteSupportedFeaturesCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
sLMP_FEATURES LMP_Features
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STRUCT_PARAMETER(LMP_Features)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::ReadRemoteVersionInformationCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
uint8 u8LMP_Version,
uint32 u32ManufacturerName,
uint8 u8LMP_Subversion
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_READ_REMOTE_VERSION_INFORMATION_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STD_PARAMETER(u8LMP_Version)
ADD_STD_PARAMETER(u32ManufacturerName)
ADD_STD_PARAMETER(u8LMP_Subversion)
TRANSMIT_HCI_EVENT_PACKET()
}
void HCI_EventsInterfaceFormFunctions::QosSetupCompleteEvent( teHCI_EVENT_ERROR_CODE teStatus,
tConnectionHandle ConnectionHandle,
uint8 u8Flags,
uint8 u8ServiceType,
uint32 u32TokenRate,
uint32 u32PeakBW,
uint32 u32Latency,
uint32 u32DelayVariation
)
{
BEGIN_HCI_EVENT_PACKET(eHCI_OPCODE_QOS_SETUP_COMPLETE_EVENT)
ADD_ENUM_PARAMETER(teStatus)
ADD_STD_PARAMETER(ConnectionHandle)
ADD_STD_PARAMETER(u8Flags)
ADD_STD_PARAMETER(u8ServiceType)
ADD_STD_PARAMETER(u32TokenRate)
ADD_STD_PARAMETER(u32PeakBW)
ADD_STD_PARAMETER(u32Latency)
ADD_STD_PARAMETER(u32DelayVariation)
TRANSMIT_HCI_EVENT_PACKET()
}
//------------------------------------------------------------------------------
//
// 5.2.14 Command Complete Event
//
//------------------------------------------------------------------------------
void HCI_EventsInterfaceFormFunctions::CommandCompleteEvent( //uint8 u8Flags,
uint16 u16CommandOpcode,
uint8 u8RetParameters
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -