From 38ea5acca82e3e48e202fb549d96b936c2397902 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Wed, 8 May 2019 16:15:01 -0700 Subject: [PATCH] HCI: Rename ErrorCodes and consolidate Enable Test: bluetooth_gd_test --gtest_filter=*HciTest* Change-Id: Ic957968b5f0de1eac486b4e2ba103ec749819b0e --- gd/hci/hci_packets.pdl | 288 ++++++++++++++++++++++--------------------------- 1 file changed, 128 insertions(+), 160 deletions(-) diff --git a/gd/hci/hci_packets.pdl b/gd/hci/hci_packets.pdl index 218bc3853..58aa5cb41 100644 --- a/gd/hci/hci_packets.pdl +++ b/gd/hci/hci_packets.pdl @@ -319,12 +319,10 @@ packet CommandPacket { // Packets for interfaces packet DiscoveryCommand : CommandPacket { _payload_, } -packet CreateConnectionCommand : CommandPacket { _payload_, } packet ConnectionManagementCommand : CommandPacket { _payload_, } packet SecurityCommand : CommandPacket { _payload_, } packet ScoConnectionCommand : CommandPacket { _payload_, } packet LeAdvertisingCommand : CommandPacket { _payload_, } -packet LeCreateConnectionCommand : CommandPacket { _payload_, } packet LeConnectionManagementCommand : CommandPacket { _payload_, } packet LeSecurityCommand : CommandPacket { _payload_, } packet VendorCommand : CommandPacket { _payload_, } @@ -423,7 +421,7 @@ enum FeatureFlag : 1 { SUPPORTED = 1, } -enum ErrorCodes : 8 { +enum ErrorCode: 8 { SUCCESS = 0x00, UNKNOWN_HCI_COMMAND = 0x01, UNKNOWN_CONNECTION = 0x02, @@ -469,7 +467,7 @@ packet CommandComplete : EventPacket (event_code = COMMAND_COMPLETE){ } packet CommandStatus : EventPacket (event_code = COMMAND_STATUS){ - status : ErrorCodes, // SUCCESS means PENDING + status : ErrorCode, // SUCCESS means PENDING num_hci_command_packets : 8, command_op_code : OpCode, _payload_, @@ -490,7 +488,7 @@ packet InquiryCancel : DiscoveryCommand (op_code = INQUIRY_CANCEL) { } packet InquiryCancelComplete : CommandComplete (command_op_code = INQUIRY_CANCEL) { - status : ErrorCodes, + status : ErrorCode, } packet PeriodicInquiryMode : DiscoveryCommand (op_code = PERIODIC_INQUIRY_MODE) { @@ -498,14 +496,14 @@ packet PeriodicInquiryMode : DiscoveryCommand (op_code = PERIODIC_INQUIRY_MODE) } packet PeriodicInquiryModeComplete : CommandComplete (command_op_code = PERIODIC_INQUIRY_MODE) { - status : ErrorCodes, + status : ErrorCode, } packet ExitPeriodicInquiryMode : DiscoveryCommand (op_code = EXIT_PERIODIC_INQUIRY_MODE) { } packet ExitPeriodicInquiryModeComplete : CommandComplete (command_op_code = EXIT_PERIODIC_INQUIRY_MODE) { - status : ErrorCodes, + status : ErrorCode, } enum PageScanRepetitionMode : 8 { @@ -524,7 +522,7 @@ enum CreateConnectionRoleSwitch : 8 { ALLOW_ROLE_SWITCH = 0x01, } -packet CreateConnection : CreateConnectionCommand (op_code = CREATE_CONNECTION) { +packet CreateConnection : ConnectionManagementCommand (op_code = CREATE_CONNECTION) { bd_addr : Address, packet_type : 16, page_scan_repetition_mode : PageScanRepetitionMode, @@ -556,12 +554,12 @@ packet Disconnect : ConnectionManagementCommand (op_code = DISCONNECT) { packet DisconnectStatus : CommandStatus (command_op_code = DISCONNECT) { } -packet CreateConnectionCancel : CreateConnectionCommand (op_code = CREATE_CONNECTION_CANCEL) { +packet CreateConnectionCancel : ConnectionManagementCommand (op_code = CREATE_CONNECTION_CANCEL) { bd_addr : Address, } packet CreateConnectionCancelComplete : CommandComplete (command_op_code = CREATE_CONNECTION_CANCEL) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -570,7 +568,7 @@ enum AcceptConnectionRequestRole : 8 { REMAIN_SLAVE = 0x01, } -packet AcceptConnectionRequest : CreateConnectionCommand (op_code = ACCEPT_CONNECTION_REQUEST) { +packet AcceptConnectionRequest : ConnectionManagementCommand (op_code = ACCEPT_CONNECTION_REQUEST) { bd_addr : Address, role : AcceptConnectionRequestRole, } @@ -584,7 +582,7 @@ enum RejectConnectionReason : 8 { UNACCEPTABLE_BD_ADDR = 0x0F, } -packet RejectConnectionRequest : CreateConnectionCommand (op_code = REJECT_CONNECTION_REQUEST) { +packet RejectConnectionRequest : ConnectionManagementCommand (op_code = REJECT_CONNECTION_REQUEST) { bd_addr : Address, reason : RejectConnectionReason, } @@ -599,7 +597,7 @@ packet LinkKeyRequestReply : SecurityCommand (op_code = LINK_KEY_REQUEST_REPLY) } packet LinkKeyRequestReplyComplete : CommandComplete (command_op_code = LINK_KEY_REQUEST_REPLY) { - status : ErrorCodes, + status : ErrorCode, } packet LinkKeyRequestNegativeReply : SecurityCommand (op_code = LINK_KEY_REQUEST_NEGATIVE_REPLY) { @@ -607,7 +605,7 @@ packet LinkKeyRequestNegativeReply : SecurityCommand (op_code = LINK_KEY_REQUEST } packet LinkKeyRequestNegativeReplyComplete : CommandComplete (command_op_code = LINK_KEY_REQUEST_NEGATIVE_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -633,7 +631,7 @@ packet PinCodeRequestReply : SecurityCommand (op_code = PIN_CODE_REQUEST_REPLY) } packet PinCodeRequestReplyComplete : CommandComplete (command_op_code = PIN_CODE_REQUEST_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -642,7 +640,7 @@ packet PinCodeRequestNegativeReply : SecurityCommand (op_code = PIN_CODE_REQUEST } packet PinCodeRequestNegativeReplyComplete : CommandComplete (command_op_code = PIN_CODE_REQUEST_NEGATIVE_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -708,7 +706,7 @@ packet RemoteNameRequestCancel : DiscoveryCommand (op_code = REMOTE_NAME_REQUEST } packet RemoteNameRequestCancelComplete : CommandComplete (command_op_code = REMOTE_NAME_REQUEST_CANCEL) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -751,7 +749,7 @@ packet ReadLmpHandle : ConnectionManagementCommand (op_code = READ_LMP_HANDLE) { } packet ReadLmpHandleComplete : CommandComplete (command_op_code = READ_LMP_HANDLE) { - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, lmp_handle : 8, @@ -801,7 +799,7 @@ packet IoCapabilityRequestReply : SecurityCommand (op_code = IO_CAPABILITY_REQUE } packet IoCapabilityRequestReplyComplete : CommandComplete (command_op_code = IO_CAPABILITY_REQUEST_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -810,7 +808,7 @@ packet UserConfirmationRequestReply : SecurityCommand (op_code = USER_CONFIRMATI } packet UserConfirmationRequestReplyComplete : CommandComplete (command_op_code = USER_CONFIRMATION_REQUEST_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -819,7 +817,7 @@ packet UserConfirmationRequestNegativeReply : SecurityCommand (op_code = USER_CO } packet UserConfirmationRequestNegativeReplyComplete : CommandComplete (command_op_code = USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -829,7 +827,7 @@ packet UserPasskeyRequestReply : SecurityCommand (op_code = USER_PASSKEY_REQUEST } packet UserPasskeyReplyComplete : CommandComplete (command_op_code = USER_PASSKEY_REQUEST_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -838,7 +836,7 @@ packet UserPasskeyRequestNegativeReply : SecurityCommand (op_code = USER_PASSKEY } packet UserPasskeyRequestNegativeReplyComplete : CommandComplete (command_op_code = USER_PASSKEY_REQUEST_NEGATIVE_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -847,7 +845,7 @@ packet RemoteOobDataRequestReply : SecurityCommand (op_code = REMOTE_OOB_DATA_RE } packet RemoteOobDataRequestReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_DATA_REQUEST_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -856,17 +854,17 @@ packet RemoteOobDataRequestNegativeReply : SecurityCommand (op_code = REMOTE_OOB } packet RemoteOobDataRequestNegativeReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } packet IoCapabilityRequestNegativeReply : SecurityCommand (op_code = IO_CAPABILITY_REQUEST_NEGATIVE_REPLY) { bd_addr : Address, - reason : ErrorCodes, + reason : ErrorCode, } packet IoCapabilityRequestNegativeReplyComplete : CommandComplete (command_op_code = IO_CAPABILITY_REQUEST_NEGATIVE_REPLY) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -935,14 +933,14 @@ packet SetEventMask : CommandPacket (op_code = SET_EVENT_MASK) { } packet SetEventMaskComplete : CommandComplete (command_op_code = SET_EVENT_MASK) { - status : ErrorCodes, + status : ErrorCode, } packet Reset : CommandPacket (op_code = RESET) { } packet ResetComplete : CommandComplete (command_op_code = RESET) { - status : ErrorCodes, + status : ErrorCode, } packet SetEventFilter : CommandPacket (op_code = SET_EVENT_FILTER) { @@ -976,7 +974,7 @@ packet ReadStoredLinkKey : SecurityCommand (op_code = READ_STORED_LINK_KEY) { } packet ReadStoredLinkKeyComplete : CommandComplete (command_op_code = READ_STORED_LINK_KEY) { - status : ErrorCodes, + status : ErrorCode, max_num_keys : 16, num_keys_read : 16, } @@ -986,7 +984,7 @@ packet WriteStoredLinkKey : SecurityCommand (op_code = WRITE_STORED_LINK_KEY) { } packet WriteStoredLinkKeyComplete : CommandComplete (command_op_code = WRITE_STORED_LINK_KEY) { - status : ErrorCodes, + status : ErrorCode, num_keys_written : 8, } @@ -1001,7 +999,7 @@ packet DeleteStoredLinkKey : SecurityCommand (op_code = DELETE_STORED_LINK_KEY) } packet DeleteStoredLinkKeyComplete : CommandComplete (command_op_code = DELETE_STORED_LINK_KEY) { - status : ErrorCodes, + status : ErrorCode, num_keys_deleted : 8, } @@ -1010,22 +1008,22 @@ packet WriteLocalName : CommandPacket (op_code = WRITE_LOCAL_NAME) { } packet WriteLocalNameComplete : CommandComplete (command_op_code = WRITE_LOCAL_NAME) { - status : ErrorCodes, + status : ErrorCode, } packet ReadLocalName : CommandPacket (op_code = READ_LOCAL_NAME) { } packet ReadLocalNameComplete : CommandComplete (command_op_code = READ_LOCAL_NAME) { - status : ErrorCodes, + status : ErrorCode, _payload_, } -packet ReadConnectionAcceptTimeout : CreateConnectionCommand (op_code = READ_CONNECTION_ACCEPT_TIMEOUT) { +packet ReadConnectionAcceptTimeout : ConnectionManagementCommand (op_code = READ_CONNECTION_ACCEPT_TIMEOUT) { _payload_, // placeholder (unimplemented) } -packet WriteConnectionAcceptTimeout : CreateConnectionCommand (op_code = WRITE_CONNECTION_ACCEPT_TIMEOUT) { +packet WriteConnectionAcceptTimeout : ConnectionManagementCommand (op_code = WRITE_CONNECTION_ACCEPT_TIMEOUT) { _payload_, // placeholder (unimplemented) } @@ -1048,7 +1046,7 @@ packet ReadScanEnable : DiscoveryCommand (op_code = READ_SCAN_ENABLE) { } packet ReadScanEnableComplete : CommandComplete (command_op_code = READ_SCAN_ENABLE) { - status : ErrorCodes, + status : ErrorCode, scan_enable : ScanEnable, } @@ -1057,14 +1055,14 @@ packet WriteScanEnable : DiscoveryCommand (op_code = WRITE_SCAN_ENABLE) { } packet WriteScanEnableComplete : CommandComplete (command_op_code = WRITE_SCAN_ENABLE) { - status : ErrorCodes, + status : ErrorCode, } packet ReadPageScanActivity : DiscoveryCommand (op_code = READ_PAGE_SCAN_ACTIVITY) { } packet ReadPageScanActivityComplete : CommandComplete (command_op_code = READ_PAGE_SCAN_ACTIVITY) { - status : ErrorCodes, + status : ErrorCode, page_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms page_scan_window : 16, // 0x0011 to PageScanInterval } @@ -1075,7 +1073,7 @@ packet WritePageScanActivity : DiscoveryCommand (op_code = WRITE_PAGE_SCAN_ACTIV } packet WritePageScanActivityComplete : CommandComplete (command_op_code = WRITE_PAGE_SCAN_ACTIVITY) { - status : ErrorCodes, + status : ErrorCode, } packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) { @@ -1095,7 +1093,7 @@ packet ReadAuthenticationEnable : CommandPacket (op_code = READ_AUTHENTICATION_E } packet ReadAuthenticationEnableComplete : CommandComplete (command_op_code = READ_AUTHENTICATION_ENABLE) { - status : ErrorCodes, + status : ErrorCode, authentication_enable : AuthenticationEnable, } @@ -1104,14 +1102,14 @@ packet WriteAuthenticationEnable : CommandPacket (op_code = WRITE_AUTHENTICATION } packet WriteAuthenticationEnableComplete : CommandComplete (command_op_code = WRITE_AUTHENTICATION_ENABLE) { - status : ErrorCodes, + status : ErrorCode, } packet ReadClassOfDevice : DiscoveryCommand (op_code = READ_CLASS_OF_DEVICE) { } packet ReadClassOfDeviceComplete : CommandComplete (command_op_code = READ_CLASS_OF_DEVICE) { - status : ErrorCodes, + status : ErrorCode, class_of_device : ClassOfDevice, } @@ -1120,7 +1118,7 @@ packet WriteClassOfDevice : DiscoveryCommand (op_code = WRITE_CLASS_OF_DEVICE) { } packet WriteClassOfDeviceComplete : CommandComplete (command_op_code = WRITE_CLASS_OF_DEVICE) { - status : ErrorCodes, + status : ErrorCode, } packet ReadVoiceSetting : CommandPacket (op_code = READ_VOICE_SETTING) { @@ -1179,7 +1177,7 @@ packet HostBufferSize : CommandPacket (op_code = HOST_BUFFER_SIZE) { } packet HostBufferSizeComplete : CommandComplete (command_op_code = HOST_BUFFER_SIZE) { - status : ErrorCodes, + status : ErrorCode, } packet HostNumCompletedPackets : CommandPacket (op_code = HOST_NUM_COMPLETED_PACKETS) { @@ -1187,7 +1185,7 @@ packet HostNumCompletedPackets : CommandPacket (op_code = HOST_NUM_COMPLETED_PAC } packet HostNumCompletedPacketsError : CommandComplete (command_op_code = HOST_NUM_COMPLETED_PACKETS) { - error_code : ErrorCodes, + error_code : ErrorCode, } packet ReadLinkSupervisionTimeout : ConnectionManagementCommand (op_code = READ_LINK_SUPERVISION_TIMEOUT) { @@ -1196,7 +1194,7 @@ packet ReadLinkSupervisionTimeout : ConnectionManagementCommand (op_code = READ_ } packet ReadLinkSupervisionTimeoutComplete : CommandComplete (command_op_code = READ_LINK_SUPERVISION_TIMEOUT) { - status : ErrorCodes, + status : ErrorCode, handle : 12, _reserved_ : 4, link_supervision_timeout : 16, // 0x001-0xFFFF (0.625ms-40.9s) @@ -1209,7 +1207,7 @@ packet WriteLinkSupervisionTimeout : ConnectionManagementCommand (op_code = WRIT } packet WriteLinkSupervisionTimeoutComplete : CommandComplete (command_op_code = WRITE_LINK_SUPERVISION_TIMEOUT) { - status : ErrorCodes, + status : ErrorCode, handle : 12, _reserved_ : 4, } @@ -1239,7 +1237,7 @@ packet ReadInquiryScanType : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_TYPE) } packet ReadInquiryScanTypeComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_TYPE) { - status : ErrorCodes, + status : ErrorCode, inquiry_scan_type : InquiryScanType, } @@ -1248,7 +1246,7 @@ packet WriteInquiryScanType : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_TYP } packet WriteInquiryScanTypeComplete : CommandComplete (command_op_code = WRITE_INQUIRY_SCAN_TYPE) { - status : ErrorCodes, + status : ErrorCode, } enum InquiryMode : 8 { @@ -1261,7 +1259,7 @@ packet ReadInquiryMode : DiscoveryCommand (op_code = READ_INQUIRY_MODE) { } packet ReadInquiryModeComplete : CommandComplete (command_op_code = READ_INQUIRY_MODE) { - status : ErrorCodes, + status : ErrorCode, inquiry_mode : InquiryMode, } @@ -1270,7 +1268,7 @@ packet WriteInquiryMode : DiscoveryCommand (op_code = WRITE_INQUIRY_MODE) { } packet WriteInquiryModeComplete : CommandComplete (command_op_code = WRITE_INQUIRY_MODE) { - status : ErrorCodes, + status : ErrorCode, } enum PageScanType : 8 { @@ -1282,7 +1280,7 @@ packet ReadPageScanType : DiscoveryCommand (op_code = READ_PAGE_SCAN_TYPE) { } packet ReadPageScanTypeComplete : CommandComplete (command_op_code = READ_PAGE_SCAN_TYPE) { - status : ErrorCodes, + status : ErrorCode, page_scan_type : PageScanType, } @@ -1291,7 +1289,7 @@ packet WritePageScanType : DiscoveryCommand (op_code = WRITE_PAGE_SCAN_TYPE) { } packet WritePageScanTypeComplete : CommandComplete (command_op_code = WRITE_PAGE_SCAN_TYPE) { - status : ErrorCodes, + status : ErrorCode, } packet ReadAfhChannelAssessmentMode : CommandPacket (op_code = READ_AFH_CHANNEL_ASSESSMENT_MODE) { @@ -1311,7 +1309,7 @@ packet ReadExtendedInquiryResponse : CommandPacket (op_code = READ_EXTENDED_INQU } packet ReadExtendedInquiryResponseComplete : CommandComplete (command_op_code = READ_EXTENDED_INQUIRY_RESPONSE) { - status : ErrorCodes, + status : ErrorCode, fec_required : FecRequired, _payload_, } @@ -1322,7 +1320,7 @@ packet WriteExtendedInquiryResponse : CommandPacket (op_code = WRITE_EXTENDED_IN } packet WriteExtendedInquiryResponseComplete : CommandComplete (command_op_code = WRITE_EXTENDED_INQUIRY_RESPONSE) { - status : ErrorCodes, + status : ErrorCode, } packet RefreshEncryptionKey : SecurityCommand (op_code = REFRESH_ENCRYPTION_KEY) { @@ -1333,32 +1331,27 @@ packet RefreshEncryptionKey : SecurityCommand (op_code = REFRESH_ENCRYPTION_KEY) packet RefreshEncryptionKeyStatus : CommandStatus (command_op_code = REFRESH_ENCRYPTION_KEY) { } -enum SimplePairingMode : 8 { - NOT_SET = 0x00, - ENABLED = 0x01, -} - packet ReadSimplePairingMode : SecurityCommand (op_code = READ_SIMPLE_PAIRING_MODE) { } packet ReadSimplePairingModeComplete : CommandComplete (command_op_code = READ_SIMPLE_PAIRING_MODE) { - status : ErrorCodes, - simple_pairing_mode : SimplePairingMode, + status : ErrorCode, + simple_pairing_mode : Enable, } packet WriteSimplePairingMode : SecurityCommand (op_code = WRITE_SIMPLE_PAIRING_MODE) { - simple_pairing_mode : SimplePairingMode, + simple_pairing_mode : Enable, } packet WriteSimplePairingModeComplete : CommandComplete (command_op_code = WRITE_SIMPLE_PAIRING_MODE) { - status : ErrorCodes, + status : ErrorCode, } packet ReadLocalOobData : SecurityCommand (op_code = READ_LOCAL_OOB_DATA) { } packet ReadLocalOobDataComplete : CommandComplete (command_op_code = READ_LOCAL_OOB_DATA) { - status : ErrorCodes, + status : ErrorCode, clo : 64, chi : 64, rlo : 64, @@ -1369,7 +1362,7 @@ packet ReadInquiryResponseTransmitPowerLevel : DiscoveryCommand (op_code = READ_ } packet ReadInquiryResponseTransmitPowerLevelComplete : CommandComplete (command_op_code = READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL) { - status : ErrorCodes, + status : ErrorCode, tx_power : 8, // (-70dBm to 20dBm) } @@ -1378,7 +1371,7 @@ packet WriteInquiryTransmitPowerLevel : DiscoveryCommand (op_code = WRITE_INQUIR } packet WriteInquiryResponseTransmitPowerLevelComplete : CommandComplete (command_op_code = WRITE_INQUIRY_TRANSMIT_POWER_LEVEL) { - status : ErrorCodes, + status : ErrorCode, } enum KeypressNotificationType : 8 { @@ -1395,15 +1388,10 @@ packet SendKeypressNotification : SecurityCommand (op_code = SEND_KEYPRESS_NOTIF } packet SendKeypressNotificationComplete : CommandComplete (command_op_code = SEND_KEYPRESS_NOTIFICATION) { - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } -enum LeSupportedHost : 8 { - DISABLED = 0x00, // Default - ENABLED = 0x01, -} - enum SimultaneousLeHost : 8 { DISABLED = 0x00, } @@ -1412,39 +1400,34 @@ packet ReadLeHostSupport : CommandPacket (op_code = READ_LE_HOST_SUPPORT) { } packet ReadLeHostSupportComplete : CommandComplete (command_op_code = READ_LE_HOST_SUPPORT) { - status : ErrorCodes, - le_supported_host : LeSupportedHost, + status : ErrorCode, + le_supported_host : Enable, simultaneous_le_host : SimultaneousLeHost, } packet WriteLeHostSupport : CommandPacket (op_code = WRITE_LE_HOST_SUPPORT) { - le_supported_host : LeSupportedHost, + le_supported_host : Enable, simultaneous_le_host : SimultaneousLeHost, } packet WriteLeHostSupportComplete : CommandComplete (command_op_code = WRITE_LE_HOST_SUPPORT) { - status : ErrorCodes, -} - -enum SecureConnectionsHostSupport : 8 { - DISABLED = 0x00, // Default - ENABLED = 0x01, + status : ErrorCode, } packet ReadSecureConnectionsHostSupport : CommandPacket (op_code = READ_SECURE_CONNECTIONS_HOST_SUPPORT) { } packet ReadSecureConnectionsHostSupportComplete : CommandComplete (command_op_code = READ_SECURE_CONNECTIONS_HOST_SUPPORT) { - status : ErrorCodes, - secure_connections_host_support : SecureConnectionsHostSupport, + status : ErrorCode, + secure_connections_host_support : Enable, } packet WriteSecureConnectionsHostSupport : CommandPacket (op_code = WRITE_SECURE_CONNECTIONS_HOST_SUPPORT) { - secure_connections_host_support : SecureConnectionsHostSupport, + secure_connections_host_support : Enable, } packet WriteSecureConnectionsHostSupportComplete : CommandComplete (command_op_code = WRITE_SECURE_CONNECTIONS_HOST_SUPPORT) { - status : ErrorCodes, + status : ErrorCode, } // INFORMATIONAL_PARAMETERS @@ -1528,7 +1511,7 @@ packet ReadLoopbackMode : CommandPacket (op_code = READ_LOOPBACK_MODE) { } packet ReadLoopbackModeComplete : CommandComplete (command_op_code = READ_LOOPBACK_MODE) { - status : ErrorCodes, + status : ErrorCode, loopback_mode : LoopbackMode, } @@ -1537,48 +1520,33 @@ packet WriteLoopbackMode : CommandPacket (op_code = WRITE_LOOPBACK_MODE) { } packet WriteLoopbackModeComplete : CommandComplete (command_op_code = WRITE_LOOPBACK_MODE) { - status : ErrorCodes, + status : ErrorCode, } packet EnableDeviceUnderTestMode : CommandPacket (op_code = ENABLE_DEVICE_UNDER_TEST_MODE) { } packet EnableDeviceUnderTestModeComplete : CommandComplete (command_op_code = ENABLE_DEVICE_UNDER_TEST_MODE) { - status : ErrorCodes, -} - -enum SimplePairingDebugMode : 8 { - DISABLED = 0x00, - ENABLED = 0x01, + status : ErrorCode, } packet WriteSimplePairingDebugMode : CommandPacket (op_code = WRITE_SIMPLE_PAIRING_DEBUG_MODE) { - simple_pairing_debug_mode : SimplePairingDebugMode, + simple_pairing_debug_mode : Enable, } packet WriteSimplePairingDebugModeComplete : CommandComplete (command_op_code = WRITE_SIMPLE_PAIRING_DEBUG_MODE) { - status : ErrorCodes, -} - -enum Dm1AcluMode : 8 { - DISABLED = 0x00, - ENABLED = 0x01, -} - -enum EscoLoopbackMode : 8 { - DISABLED = 0x00, - ENABLED = 0x01, + status : ErrorCode, } packet WriteSecureConnectionsTestMode : CommandPacket (op_code = WRITE_SECURE_CONNECTIONS_TEST_MODE) { connection_handle : 12, _reserved_ : 4, - dm1_aclu_mode : Dm1AcluMode, - esco_loopback_mode : EscoLoopbackMode, + dm1_aclu_mode : Enable, + esco_loopback_mode : Enable, } packet WriteSecureConnectionsTestModeComplete : CommandComplete (command_op_code = WRITE_SECURE_CONNECTIONS_TEST_MODE) { - status : ErrorCodes, + status : ErrorCode, } // LE_CONTROLLER @@ -1587,14 +1555,14 @@ packet LeSetEventMask : CommandPacket (op_code = LE_SET_EVENT_MASK) { } packet LeSetEventMaskComplete : CommandComplete (command_op_code = LE_SET_EVENT_MASK) { - status : ErrorCodes, + status : ErrorCode, } packet LeReadBufferSize : CommandPacket (op_code = LE_READ_BUFFER_SIZE) { } packet LeReadBufferSizeComplete : CommandComplete (command_op_code = LE_READ_BUFFER_SIZE) { - status : ErrorCodes, + status : ErrorCode, hc_le_data_packet_length : 16, hc_total_num_le_packets : 8, } @@ -1603,7 +1571,7 @@ packet LeReadLocalSupportedFeatures : CommandPacket (op_code = LE_READ_LOCAL_SUP } packet LeReadLocalSupportedFeaturesComplete : CommandComplete (command_op_code = LE_READ_LOCAL_SUPPORTED_FEATURES) { - status : ErrorCodes, + status : ErrorCode, le_features : 64, } @@ -1612,7 +1580,7 @@ packet LeSetRandomAddress : CommandPacket (op_code = LE_SET_RANDOM_ADDRESS) { } packet LeSetRandomAddressComplete : CommandComplete (command_op_code = LE_SET_RANDOM_ADDRESS) { - status : ErrorCodes, + status : ErrorCode, } enum AdvertisingFilterPolicy : 1 { @@ -1654,14 +1622,14 @@ packet LeSetAdvertisingParameters : LeAdvertisingCommand (op_code = LE_SET_ADVER } packet LeSetAdvertisingParametersComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_PARAMETERS) { - status : ErrorCodes, + status : ErrorCode, } packet LeReadAdvertisingChannelTxPower : LeAdvertisingCommand (op_code = LE_READ_ADVERTISING_CHANNEL_TX_POWER) { } packet LeReadAdvertisingChannelTxPowerComplete : CommandComplete (command_op_code = LE_READ_ADVERTISING_CHANNEL_TX_POWER) { - status : ErrorCodes, + status : ErrorCode, transmit_power_level : 8, // (-20dBm to 10dBm) Accuracy: +/-4dB } @@ -1670,7 +1638,7 @@ packet LeSetAdvertisingData : LeAdvertisingCommand (op_code = LE_SET_ADVERTISING } packet LeSetAdvertisingDataComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_DATA) { - status : ErrorCodes, + status : ErrorCode, } packet LeSetScanResponseData : LeAdvertisingCommand (op_code = LE_SET_SCAN_RESPONSE_DATA) { @@ -1678,7 +1646,7 @@ packet LeSetScanResponseData : LeAdvertisingCommand (op_code = LE_SET_SCAN_RESPO } packet LeSetScanResponseDataComplete : CommandComplete (command_op_code = LE_SET_SCAN_RESPONSE_DATA) { - status : ErrorCodes, + status : ErrorCode, } packet LeSetAdvertisingEnable : LeAdvertisingCommand (op_code = LE_SET_ADVERTISING_ENABLE) { @@ -1686,7 +1654,7 @@ packet LeSetAdvertisingEnable : LeAdvertisingCommand (op_code = LE_SET_ADVERTISI } packet LeSetAdvertisingEnableComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_ENABLE) { - status : ErrorCodes, + status : ErrorCode, } enum LeScanType : 8 { @@ -1710,7 +1678,7 @@ packet LeSetScanParameters : LeAdvertisingCommand (op_code = LE_SET_SCAN_PARAMET } packet LeSetScanParametersComplete : CommandComplete (command_op_code = LE_SET_SCAN_PARAMETERS) { - status : ErrorCodes, + status : ErrorCode, } packet LeSetScanEnable : LeAdvertisingCommand (op_code = LE_SET_SCAN_ENABLE) { @@ -1719,7 +1687,7 @@ packet LeSetScanEnable : LeAdvertisingCommand (op_code = LE_SET_SCAN_ENABLE) { } packet LeSetScanEnableComplete : CommandComplete (command_op_code = LE_SET_SCAN_ENABLE) { - status : ErrorCodes, + status : ErrorCode, } enum InitiatorFilterPolicy : 8 { @@ -1734,7 +1702,7 @@ enum OwnAddressType : 8 { RESOLVABLE_OR_RANDOM_ADDRESS = 0x03, } -packet LeCreateConnection : LeCreateConnectionCommand (op_code = LE_CREATE_CONNECTION) { +packet LeCreateConnection : LeConnectionManagementCommand (op_code = LE_CREATE_CONNECTION) { le_scan_interval : 16, // 0x0004-0x4000 le_scan_window : 16, // < = LeScanInterval initiator_filter_policy : InitiatorFilterPolicy, @@ -1752,26 +1720,26 @@ packet LeCreateConnection : LeCreateConnectionCommand (op_code = LE_CREATE_CONNE packet LeCreateConnectionStatus : CommandStatus (command_op_code = LE_CREATE_CONNECTION) { } -packet LeCreateConnectionCancel : LeCreateConnectionCommand (op_code = LE_CREATE_CONNECTION_CANCEL) { +packet LeCreateConnectionCancel : LeConnectionManagementCommand (op_code = LE_CREATE_CONNECTION_CANCEL) { } packet LeCreateConnectionCancelComplete : CommandComplete (command_op_code = LE_CREATE_CONNECTION_CANCEL) { - status : ErrorCodes, + status : ErrorCode, } -packet LeReadWhiteListSize : LeCreateConnectionCommand (op_code = LE_READ_WHITE_LIST_SIZE) { +packet LeReadWhiteListSize : LeConnectionManagementCommand (op_code = LE_READ_WHITE_LIST_SIZE) { } packet LeReadWhiteListSizeComplete : CommandComplete (command_op_code = LE_READ_WHITE_LIST_SIZE) { - status : ErrorCodes, + status : ErrorCode, white_list_size : 8, } -packet LeClearWhiteList : LeCreateConnectionCommand (op_code = LE_CLEAR_WHITE_LIST) { +packet LeClearWhiteList : LeConnectionManagementCommand (op_code = LE_CLEAR_WHITE_LIST) { } packet LeClearWhiteListComplete : CommandComplete (command_op_code = LE_CLEAR_WHITE_LIST) { - status : ErrorCodes, + status : ErrorCode, } enum WhiteListAddressType : 8 { @@ -1780,22 +1748,22 @@ enum WhiteListAddressType : 8 { ANONYMOUS_ADVERTISERS = 0xFF, } -packet LeAddDeviceToWhiteList : LeCreateConnectionCommand (op_code = LE_ADD_DEVICE_TO_WHITE_LIST) { +packet LeAddDeviceToWhiteList : LeConnectionManagementCommand (op_code = LE_ADD_DEVICE_TO_WHITE_LIST) { address_type : WhiteListAddressType, address : Address, } packet LeAddDeviceToWhiteListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_WHITE_LIST) { - status : ErrorCodes, + status : ErrorCode, } -packet LeRemoveDeviceFromWhiteList : LeCreateConnectionCommand (op_code = LE_REMOVE_DEVICE_FROM_WHITE_LIST) { +packet LeRemoveDeviceFromWhiteList : LeConnectionManagementCommand (op_code = LE_REMOVE_DEVICE_FROM_WHITE_LIST) { address_type : WhiteListAddressType, address : Address, } packet LeRemoveDeviceFromWhiteListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_WHITE_LIST) { - status : ErrorCodes, + status : ErrorCode, } packet LeConnectionUpdate : LeConnectionManagementCommand (op_code = LE_CONNECTION_UPDATE) { @@ -2001,7 +1969,7 @@ packet LeSetExtendedScanEnable : LeAdvertisingCommand (op_code = LE_SET_EXTENDED _payload_, // placeholder (unimplemented) } -packet LeExtendedCreateConnection : LeCreateConnectionCommand (op_code = LE_EXTENDED_CREATE_CONNECTION) { +packet LeExtendedCreateConnection : LeConnectionManagementCommand (op_code = LE_EXTENDED_CREATE_CONNECTION) { _payload_, // placeholder (unimplemented) } @@ -2090,7 +2058,7 @@ packet ControllerA2DPOpcode : VendorCommand (op_code = CONTROLLER_A2DP_OPCODE) { // HCI Event Packets packet InquiryComplete : EventPacket (event_code = INQUIRY_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, } packet InquiryResult : EventPacket (event_code = INQUIRY_RESULT){ @@ -2110,7 +2078,7 @@ enum LinkType : 8 { } packet ConnectionComplete : EventPacket (event_code = CONNECTION_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, bd_addr : Address, @@ -2131,20 +2099,20 @@ packet ConnectionRequest : EventPacket (event_code = CONNECTION_REQUEST){ } packet DisconnectionComplete : EventPacket (event_code = DISCONNECTION_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, - reason : ErrorCodes, + reason : ErrorCode, } packet AuthenticationComplete : EventPacket (event_code = AUTHENTICATION_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, } packet RemoteNameRequestComplete : EventPacket (event_code = REMOTE_NAME_REQUEST_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, _payload_, } @@ -2156,34 +2124,34 @@ enum EncryptionEnabled : 8 { } packet EncryptionChange : EventPacket (event_code = ENCRYPTION_CHANGE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, encryption_enabled : EncryptionEnabled, } packet ChangeConnectionLinkKeyComplete : EventPacket (event_code = CHANGE_CONNECTION_LINK_KEY_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, } packet MasterLinkKeyComplete : EventPacket (event_code = MASTER_LINK_KEY_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, key_flag : KeyFlag, } packet ReadRemoteSupportedFeaturesComplete : EventPacket (event_code = READ_REMOTE_SUPPORTED_FEATURES_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, lmp_features : 64, } packet ReadRemoteVersionInformationComplete : EventPacket (event_code = READ_REMOTE_VERSION_INFORMATION_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, version : 8, @@ -2198,7 +2166,7 @@ enum ServiceType : 8 { } packet QosSetupComplete : EventPacket (event_code = QOS_SETUP_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, _reserved_ : 8, @@ -2226,7 +2194,7 @@ enum Role : 8 { } packet RoleChange : EventPacket (event_code = ROLE_CHANGE){ - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, new_role : Role, } @@ -2242,7 +2210,7 @@ enum Mode : 8 { } packet ModeChange : EventPacket (event_code = MODE_CHANGE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, current_mode : Mode, @@ -2280,7 +2248,7 @@ packet MaxSlotsChange : EventPacket (event_code = MAX_SLOTS_CHANGE){ } packet ReadClockOffsetComplete : EventPacket (event_code = READ_CLOCK_OFFSET_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, clock_offset : 15, @@ -2288,7 +2256,7 @@ packet ReadClockOffsetComplete : EventPacket (event_code = READ_CLOCK_OFFSET_COM } packet ConnectionPacketTypeChange : EventPacket (event_code = CONNECTION_PACKET_TYPE_CHANGE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, packet_type : 16, @@ -2318,7 +2286,7 @@ packet InquiryResultWithRssi : EventPacket (event_code = INQUIRY_RESULT_WITH_RSS } packet ReadRemoteExtendedFeaturesComplete : EventPacket (event_code = READ_REMOTE_EXTENDED_FEATURES_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, page_number : 8, @@ -2335,7 +2303,7 @@ packet SynchronousConnectionChanged : EventPacket (event_code = SYNCHRONOUS_CONN } packet SniffSubratingEvent : EventPacket (event_code = SNIFF_SUBRATING){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, maximum_transmit_latency : 16, // 0x000 - 0xFFFE (0s - 40.9s) @@ -2357,7 +2325,7 @@ packet ExtendedInquiryResult : EventPacket (event_code = EXTENDED_INQUIRY_RESULT } packet EncryptionKeyRefreshComplete : EventPacket (event_code = ENCRYPTION_KEY_REFRESH_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, } @@ -2388,7 +2356,7 @@ packet RemoteOobDataRequest : EventPacket (event_code = REMOTE_OOB_DATA_REQUEST) } packet SimplePairingComplete : EventPacket (event_code = SIMPLE_PAIRING_COMPLETE){ - status : ErrorCodes, + status : ErrorCode, bd_addr : Address, } @@ -2442,7 +2410,7 @@ enum MasterClockAccuracy : 8 { } packet LeConnectionComplete : LeMetaEvent (subevent_code = CONNECTION_COMPLETE) { - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, role : Role, @@ -2459,7 +2427,7 @@ packet LeAdvertisingReport : LeMetaEvent (subevent_code = ADVERTISING_REPORT) { } packet LeConnectionUpdateComplete : LeMetaEvent (subevent_code = CONNECTION_UPDATE_COMPLETE) { - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, conn_interval : 16, // 0x006 - 0x0C80 (7.5ms - 4000ms) @@ -2468,14 +2436,14 @@ packet LeConnectionUpdateComplete : LeMetaEvent (subevent_code = CONNECTION_UPDA } packet LeReadRemoteFeaturesComplete : LeMetaEvent (subevent_code = READ_REMOTE_FEATURES_COMPLETE) { - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, le_features : 64, } packet LeLongTermKeyRequest : LeMetaEvent (subevent_code = LONG_TERM_KEY_REQUEST) { - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, random_number : 64, @@ -2501,17 +2469,17 @@ packet LeDataLengthChange : LeMetaEvent (subevent_code = DATA_LENGTH_CHANGE) { } packet ReadLocalP256PublicKeyComplete : LeMetaEvent (subevent_code = READ_LOCAL_P256_PUBLIC_KEY_COMPLETE) { - status : ErrorCodes, + status : ErrorCode, _payload_, } packet GenerateDhKeyComplete : LeMetaEvent (subevent_code = GENERATE_DHKEY_COMPLETE) { - status : ErrorCodes, + status : ErrorCode, _payload_, } packet LeEnhancedConnectionComplete : LeMetaEvent (subevent_code = ENHANCED_CONNECTION_COMPLETE) { - status : ErrorCodes, + status : ErrorCode, connection_handle : 12, _reserved_ : 4, role : Role, -- 2.11.0