Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a961038 authored by Myles Watson's avatar Myles Watson
Browse files

HCI: Change name to LeScanningFilterPolicy

Tag: #gd-refactor
Bug: 152346341
Test: gd/cert/run --host
Change-Id: I622d82ade0819e08a166c4fff32fa5e6a8e8785c
parent 64b823ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -111,7 +111,7 @@ class SimpleHalTest(GdBaseTestClass):


            self.send_dut_hci_command(
            self.send_dut_hci_command(
                hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                                                               hci_packets.LeSetScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               hci_packets.LeScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               [phy_scan_params]))
                                                               [phy_scan_params]))
            self.send_dut_hci_command(
            self.send_dut_hci_command(
                hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
                hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
+1 −1
Original line number Original line Diff line number Diff line
@@ -97,7 +97,7 @@ class DirectHciTest(GdBaseTestClass):


        self.dut_hci.send_command_with_complete(
        self.dut_hci.send_command_with_complete(
            hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
            hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                                                           hci_packets.LeSetScanningFilterPolicy.ACCEPT_ALL, 1,
                                                           hci_packets.LeScanningFilterPolicy.ACCEPT_ALL, 1,
                                                           [phy_scan_params]))
                                                           [phy_scan_params]))
        self.dut_hci.send_command_with_complete(
        self.dut_hci.send_command_with_complete(
            hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
            hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
+1 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ class LeAdvertisingManagerTest(GdBaseTestClass):
            scan_parameters.le_scan_window = 20
            scan_parameters.le_scan_window = 20
            self.enqueue_hci_command(
            self.enqueue_hci_command(
                hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                hci_packets.LeSetExtendedScanParametersBuilder(hci_packets.AddressType.RANDOM_DEVICE_ADDRESS,
                                                               hci_packets.LeSetScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               hci_packets.LeScanningFilterPolicy.ACCEPT_ALL, 1,
                                                               [scan_parameters]), True)
                                                               [scan_parameters]), True)
            self.enqueue_hci_command(
            self.enqueue_hci_command(
                hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
                hci_packets.LeSetExtendedScanEnableBuilder(hci_packets.Enable.ENABLED,
+4 −4
Original line number Original line Diff line number Diff line
@@ -2518,7 +2518,7 @@ enum LeScanType : 8 {
  ACTIVE = 0x01,
  ACTIVE = 0x01,
}
}


enum LeSetScanningFilterPolicy : 8 {
enum LeScanningFilterPolicy : 8 {
  ACCEPT_ALL = 0x00, // Default
  ACCEPT_ALL = 0x00, // Default
  WHITE_LIST_ONLY = 0x01,
  WHITE_LIST_ONLY = 0x01,
  CHECK_INITIATORS_IDENTITY = 0x02,
  CHECK_INITIATORS_IDENTITY = 0x02,
@@ -2530,7 +2530,7 @@ packet LeSetScanParameters : LeScanningCommand (op_code = LE_SET_SCAN_PARAMETERS
  le_scan_interval : 16, // 0x0004-0x4000 Default 0x10 (10ms)
  le_scan_interval : 16, // 0x0004-0x4000 Default 0x10 (10ms)
  le_scan_window : 16, // Default 0x10 (10ms)
  le_scan_window : 16, // Default 0x10 (10ms)
  own_address_type : AddressType,
  own_address_type : AddressType,
  scanning_filter_policy : LeSetScanningFilterPolicy,
  scanning_filter_policy : LeScanningFilterPolicy,
}
}


packet LeSetScanParametersComplete : CommandComplete (command_op_code = LE_SET_SCAN_PARAMETERS) {
packet LeSetScanParametersComplete : CommandComplete (command_op_code = LE_SET_SCAN_PARAMETERS) {
@@ -3152,7 +3152,7 @@ struct PhyScanParameters {


packet LeSetExtendedScanParameters : LeScanningCommand (op_code = LE_SET_EXTENDED_SCAN_PARAMETERS) {
packet LeSetExtendedScanParameters : LeScanningCommand (op_code = LE_SET_EXTENDED_SCAN_PARAMETERS) {
  own_address_type : AddressType,
  own_address_type : AddressType,
  scanning_filter_policy : LeSetScanningFilterPolicy,
  scanning_filter_policy : LeScanningFilterPolicy,
  scanning_phys : 8,
  scanning_phys : 8,
  parameters : PhyScanParameters[],
  parameters : PhyScanParameters[],
}
}
@@ -3814,7 +3814,7 @@ packet LeExtendedScanParams : LeScanningCommand (op_code = LE_EXTENDED_SCAN_PARA
  le_scan_interval : 32, // 0x0004-0x4000 Default 0x10 (10ms)
  le_scan_interval : 32, // 0x0004-0x4000 Default 0x10 (10ms)
  le_scan_window : 32, // Default 0x10 (10ms)
  le_scan_window : 32, // Default 0x10 (10ms)
  own_address_type : AddressType,
  own_address_type : AddressType,
  scanning_filter_policy : LeSetScanningFilterPolicy,
  scanning_filter_policy : LeScanningFilterPolicy,
}
}


packet LeExtendedScanParamsComplete : CommandComplete (command_op_code = LE_EXTENDED_SCAN_PARAMS) {
packet LeExtendedScanParamsComplete : CommandComplete (command_op_code = LE_EXTENDED_SCAN_PARAMS) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -276,7 +276,7 @@ TEST(HciPacketsTest, testLeSetScanParameters) {
  ASSERT_EQ(0x12, view.GetLeScanInterval());
  ASSERT_EQ(0x12, view.GetLeScanInterval());
  ASSERT_EQ(0x12, view.GetLeScanWindow());
  ASSERT_EQ(0x12, view.GetLeScanWindow());
  ASSERT_EQ(AddressType::RANDOM_DEVICE_ADDRESS, view.GetOwnAddressType());
  ASSERT_EQ(AddressType::RANDOM_DEVICE_ADDRESS, view.GetOwnAddressType());
  ASSERT_EQ(LeSetScanningFilterPolicy::ACCEPT_ALL, view.GetScanningFilterPolicy());
  ASSERT_EQ(LeScanningFilterPolicy::ACCEPT_ALL, view.GetScanningFilterPolicy());
}
}


DEFINE_AND_INSTANTIATE_LeSetScanParametersReflectionTest(le_set_scan_parameters);
DEFINE_AND_INSTANTIATE_LeSetScanParametersReflectionTest(le_set_scan_parameters);
Loading