From 5ff30d7cef1c15c5790991862059dd0631b5bbe1 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 16 Sep 2024 10:10:51 -0700 Subject: [PATCH] [core] move locator `Get` definitions to `instance.hpp` (#10711) This commit moves the locator `GetProvider::Get()` and its related `Timer` and `Tasklet` methods to `instance.hpp`. With this change we can remove `locator_getters.hpp` header fully thus simplifying the code. --- src/core/BUILD.gn | 1 - src/core/api/backbone_router_api.cpp | 2 +- src/core/api/backbone_router_ftd_api.cpp | 2 +- src/core/api/ble_secure_api.cpp | 2 +- src/core/api/border_agent_api.cpp | 2 +- src/core/api/channel_manager_api.cpp | 2 +- src/core/api/channel_monitor_api.cpp | 2 +- src/core/api/child_supervision_api.cpp | 2 +- src/core/api/coap_api.cpp | 2 +- src/core/api/coap_secure_api.cpp | 2 +- src/core/api/commissioner_api.cpp | 2 +- src/core/api/crypto_api.cpp | 2 +- src/core/api/dataset_api.cpp | 2 +- src/core/api/dataset_ftd_api.cpp | 2 +- src/core/api/dataset_updater_api.cpp | 2 +- src/core/api/diags_api.cpp | 2 +- src/core/api/history_tracker_api.cpp | 2 +- src/core/api/icmp6_api.cpp | 2 +- src/core/api/instance_api.cpp | 2 +- src/core/api/ip6_api.cpp | 2 +- src/core/api/jam_detection_api.cpp | 2 +- src/core/api/joiner_api.cpp | 2 +- src/core/api/link_api.cpp | 2 +- src/core/api/link_metrics_api.cpp | 2 +- src/core/api/link_raw_api.cpp | 2 +- src/core/api/logging_api.cpp | 1 - src/core/api/mesh_diag_api.cpp | 2 +- src/core/api/message_api.cpp | 2 +- src/core/api/multi_radio_api.cpp | 2 +- src/core/api/netdata_api.cpp | 2 +- src/core/api/netdata_publisher_api.cpp | 2 +- src/core/api/netdiag_api.cpp | 2 +- src/core/api/network_time_api.cpp | 2 +- src/core/api/ping_sender_api.cpp | 2 +- src/core/api/radio_stats_api.cpp | 2 +- src/core/api/server_api.cpp | 2 +- src/core/api/sntp_api.cpp | 2 +- src/core/api/srp_client_api.cpp | 2 +- src/core/api/srp_client_buffers_api.cpp | 2 +- src/core/api/srp_server_api.cpp | 2 +- src/core/api/tasklet_api.cpp | 2 +- src/core/api/tcp_api.cpp | 2 +- src/core/api/tcp_ext_api.cpp | 2 +- src/core/api/thread_api.cpp | 2 +- src/core/api/thread_ftd_api.cpp | 2 +- src/core/api/udp_api.cpp | 2 +- src/core/backbone_router/backbone_tmf.cpp | 2 +- src/core/backbone_router/bbr_leader.cpp | 1 - src/core/backbone_router/bbr_local.cpp | 1 - src/core/backbone_router/bbr_manager.cpp | 1 - .../multicast_listeners_table.cpp | 1 - src/core/backbone_router/ndproxy_table.cpp | 2 +- src/core/border_router/infra_if.cpp | 1 - src/core/border_router/routing_manager.cpp | 1 - src/core/coap/coap.cpp | 1 - src/core/coap/coap_secure.cpp | 1 - src/core/common/locator_getters.hpp | 75 ------------------- src/core/common/message.cpp | 1 - src/core/common/notifier.cpp | 2 +- src/core/common/settings.cpp | 1 - src/core/common/tasklet.cpp | 2 +- src/core/common/tasklet.hpp | 2 +- src/core/common/time_ticker.cpp | 1 - src/core/common/timer.cpp | 1 - src/core/common/timer.hpp | 4 +- src/core/common/uptime.cpp | 1 - src/core/diags/factory_diags.cpp | 1 - src/core/instance/instance.hpp | 30 ++++++++ src/core/mac/data_poll_handler.cpp | 1 - src/core/mac/data_poll_sender.cpp | 1 - src/core/mac/link_raw.cpp | 1 - src/core/mac/mac.cpp | 1 - src/core/mac/mac_links.cpp | 1 - src/core/mac/sub_mac.cpp | 1 - src/core/mac/sub_mac_callbacks.cpp | 1 - src/core/mac/sub_mac_csl_receiver.cpp | 1 - src/core/meshcop/announce_begin_client.cpp | 1 - src/core/meshcop/border_agent.cpp | 1 - src/core/meshcop/commissioner.cpp | 1 - src/core/meshcop/dataset.cpp | 1 - src/core/meshcop/dataset_manager.cpp | 1 - src/core/meshcop/dataset_manager_ftd.cpp | 1 - src/core/meshcop/dataset_updater.cpp | 1 - src/core/meshcop/energy_scan_client.cpp | 1 - src/core/meshcop/extended_panid.cpp | 2 +- src/core/meshcop/joiner.cpp | 1 - src/core/meshcop/joiner_router.cpp | 1 - src/core/meshcop/meshcop.cpp | 2 +- src/core/meshcop/meshcop_leader.cpp | 1 - src/core/meshcop/network_name.cpp | 2 +- src/core/meshcop/panid_query_client.cpp | 1 - src/core/meshcop/secure_transport.cpp | 1 - src/core/meshcop/tcat_agent.cpp | 1 - src/core/net/dhcp6_client.cpp | 1 - src/core/net/dhcp6_server.cpp | 1 - src/core/net/dns_client.cpp | 1 - src/core/net/dns_dso.cpp | 1 - src/core/net/dnssd.cpp | 1 - src/core/net/dnssd_server.cpp | 1 - src/core/net/icmp6.cpp | 1 - src/core/net/ip6.cpp | 1 - src/core/net/ip6_filter.cpp | 1 - src/core/net/ip6_mpl.cpp | 1 - src/core/net/mdns.cpp | 1 - src/core/net/nat64_translator.cpp | 2 +- src/core/net/nd_agent.cpp | 2 +- src/core/net/netif.cpp | 1 - src/core/net/sntp_client.cpp | 1 - src/core/net/srp_advertising_proxy.cpp | 1 - src/core/net/srp_client.cpp | 1 - src/core/net/srp_server.cpp | 1 - src/core/net/tcp6.cpp | 1 - src/core/net/tcp6_ext.cpp | 2 +- src/core/net/udp6.cpp | 1 - src/core/radio/ble_secure.cpp | 1 - src/core/radio/radio.cpp | 2 +- src/core/radio/radio_callbacks.cpp | 1 - src/core/radio/trel_interface.cpp | 1 - src/core/radio/trel_link.cpp | 1 - src/core/radio/trel_packet.cpp | 1 - src/core/thread/address_resolver.cpp | 1 - src/core/thread/announce_begin_server.cpp | 1 - src/core/thread/announce_sender.cpp | 1 - src/core/thread/anycast_locator.cpp | 1 - src/core/thread/child.cpp | 1 - src/core/thread/child_supervision.cpp | 1 - src/core/thread/child_table.cpp | 1 - src/core/thread/csl_tx_scheduler.cpp | 2 +- src/core/thread/discover_scanner.cpp | 1 - src/core/thread/dua_manager.cpp | 1 - src/core/thread/energy_scan_server.cpp | 1 - src/core/thread/indirect_sender.cpp | 1 - src/core/thread/key_manager.cpp | 1 - src/core/thread/link_metrics.cpp | 1 - src/core/thread/link_quality.cpp | 1 - src/core/thread/lowpan.cpp | 1 - src/core/thread/mesh_forwarder.cpp | 1 - src/core/thread/mesh_forwarder_ftd.cpp | 2 +- src/core/thread/mle.cpp | 1 - src/core/thread/mle_router.cpp | 1 - src/core/thread/mlr_manager.cpp | 1 - src/core/thread/neighbor.cpp | 1 - src/core/thread/neighbor_table.cpp | 1 - src/core/thread/network_data.cpp | 1 - src/core/thread/network_data_leader.cpp | 1 - src/core/thread/network_data_leader_ftd.cpp | 1 - src/core/thread/network_data_local.cpp | 1 - src/core/thread/network_data_notifier.cpp | 1 - src/core/thread/network_data_publisher.cpp | 1 - src/core/thread/network_data_service.cpp | 1 - src/core/thread/network_diagnostic.cpp | 1 - src/core/thread/panid_query_server.cpp | 1 - src/core/thread/radio_selector.cpp | 1 - src/core/thread/router.cpp | 1 - src/core/thread/router_table.cpp | 1 - src/core/thread/src_match_controller.cpp | 1 - src/core/thread/thread_netif.cpp | 1 - src/core/thread/time_sync_service.cpp | 1 - src/core/thread/tmf.cpp | 2 +- src/core/utils/channel_manager.cpp | 1 - src/core/utils/channel_monitor.cpp | 2 +- src/core/utils/history_tracker.cpp | 1 - src/core/utils/jam_detector.cpp | 1 - src/core/utils/link_metrics_manager.cpp | 2 +- src/core/utils/mesh_diag.cpp | 1 - src/core/utils/otns.cpp | 2 +- src/core/utils/ping_sender.cpp | 2 +- src/core/utils/power_calibration.cpp | 2 +- src/core/utils/slaac_address.cpp | 1 - src/core/utils/srp_client_buffers.cpp | 1 - 170 files changed, 96 insertions(+), 244 deletions(-) delete mode 100644 src/core/common/locator_getters.hpp diff --git a/src/core/BUILD.gn b/src/core/BUILD.gn index 9512c1d65..5d2daef98 100644 --- a/src/core/BUILD.gn +++ b/src/core/BUILD.gn @@ -420,7 +420,6 @@ openthread_core_files = [ "common/iterator_utils.hpp", "common/linked_list.hpp", "common/locator.hpp", - "common/locator_getters.hpp", "common/log.cpp", "common/log.hpp", "common/logging.hpp", diff --git a/src/core/api/backbone_router_api.cpp b/src/core/api/backbone_router_api.cpp index cedb3785b..e312a903f 100644 --- a/src/core/api/backbone_router_api.cpp +++ b/src/core/api/backbone_router_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/backbone_router_ftd_api.cpp b/src/core/api/backbone_router_ftd_api.cpp index bd3a3c350..01c81127f 100644 --- a/src/core/api/backbone_router_ftd_api.cpp +++ b/src/core/api/backbone_router_ftd_api.cpp @@ -39,7 +39,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/ble_secure_api.cpp b/src/core/api/ble_secure_api.cpp index 7130f6fc6..049df3887 100644 --- a/src/core/api/ble_secure_api.cpp +++ b/src/core/api/ble_secure_api.cpp @@ -40,7 +40,7 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "meshcop/tcat_agent.hpp" #include "radio/ble_secure.hpp" diff --git a/src/core/api/border_agent_api.cpp b/src/core/api/border_agent_api.cpp index 98a7bb37b..117ac6e9e 100644 --- a/src/core/api/border_agent_api.cpp +++ b/src/core/api/border_agent_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/channel_manager_api.cpp b/src/core/api/channel_manager_api.cpp index b4b053aae..de317ac1f 100644 --- a/src/core/api/channel_manager_api.cpp +++ b/src/core/api/channel_manager_api.cpp @@ -39,7 +39,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "utils/channel_manager.hpp" using namespace ot; diff --git a/src/core/api/channel_monitor_api.cpp b/src/core/api/channel_monitor_api.cpp index f5b620ae6..0f8632a0d 100644 --- a/src/core/api/channel_monitor_api.cpp +++ b/src/core/api/channel_monitor_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/child_supervision_api.cpp b/src/core/api/child_supervision_api.cpp index d24a17d33..b6d67658a 100644 --- a/src/core/api/child_supervision_api.cpp +++ b/src/core/api/child_supervision_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/coap_api.cpp b/src/core/api/coap_api.cpp index 7539eba75..8fa6a49dc 100644 --- a/src/core/api/coap_api.cpp +++ b/src/core/api/coap_api.cpp @@ -39,7 +39,7 @@ #include "coap/coap_message.hpp" #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/coap_secure_api.cpp b/src/core/api/coap_secure_api.cpp index d83afc3cf..dcce74bd6 100644 --- a/src/core/api/coap_secure_api.cpp +++ b/src/core/api/coap_secure_api.cpp @@ -41,7 +41,7 @@ #include "coap/coap_message.hpp" #include "coap/coap_secure.hpp" #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/commissioner_api.cpp b/src/core/api/commissioner_api.cpp index 6831c87ef..9eabe77cb 100644 --- a/src/core/api/commissioner_api.cpp +++ b/src/core/api/commissioner_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/crypto_api.cpp b/src/core/api/crypto_api.cpp index 069596f53..ec8f9685f 100644 --- a/src/core/api/crypto_api.cpp +++ b/src/core/api/crypto_api.cpp @@ -39,10 +39,10 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "crypto/aes_ccm.hpp" #include "crypto/ecdsa.hpp" #include "crypto/hmac_sha256.hpp" +#include "instance/instance.hpp" using namespace ot; using namespace ot::Crypto; diff --git a/src/core/api/dataset_api.cpp b/src/core/api/dataset_api.cpp index 8e27fe151..e3e3f5eab 100644 --- a/src/core/api/dataset_api.cpp +++ b/src/core/api/dataset_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "meshcop/dataset_manager.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/api/dataset_ftd_api.cpp b/src/core/api/dataset_ftd_api.cpp index ea1792d43..e23caa00a 100644 --- a/src/core/api/dataset_ftd_api.cpp +++ b/src/core/api/dataset_ftd_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/dataset_updater_api.cpp b/src/core/api/dataset_updater_api.cpp index b21577a6c..a53c9a53b 100644 --- a/src/core/api/dataset_updater_api.cpp +++ b/src/core/api/dataset_updater_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "meshcop/dataset_updater.hpp" using namespace ot; diff --git a/src/core/api/diags_api.cpp b/src/core/api/diags_api.cpp index cb8488ddc..6fae0d5a8 100644 --- a/src/core/api/diags_api.cpp +++ b/src/core/api/diags_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/history_tracker_api.cpp b/src/core/api/history_tracker_api.cpp index f3d0357c3..42f5428c7 100644 --- a/src/core/api/history_tracker_api.cpp +++ b/src/core/api/history_tracker_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "utils/history_tracker.hpp" using namespace ot; diff --git a/src/core/api/icmp6_api.cpp b/src/core/api/icmp6_api.cpp index c9df55d64..ab63928f5 100644 --- a/src/core/api/icmp6_api.cpp +++ b/src/core/api/icmp6_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/instance_api.cpp b/src/core/api/instance_api.cpp index 5d6d5971e..c38e6e2c7 100644 --- a/src/core/api/instance_api.cpp +++ b/src/core/api/instance_api.cpp @@ -37,8 +37,8 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" #include "common/new.hpp" +#include "instance/instance.hpp" #include "radio/radio.hpp" #if !defined(OPENTHREAD_BUILD_DATETIME) diff --git a/src/core/api/ip6_api.cpp b/src/core/api/ip6_api.cpp index 29fee9da3..6531635f9 100644 --- a/src/core/api/ip6_api.cpp +++ b/src/core/api/ip6_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "net/ip4_types.hpp" #include "net/ip6_headers.hpp" #include "thread/network_data_leader.hpp" diff --git a/src/core/api/jam_detection_api.cpp b/src/core/api/jam_detection_api.cpp index 277f64cde..974f8bbc2 100644 --- a/src/core/api/jam_detection_api.cpp +++ b/src/core/api/jam_detection_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/joiner_api.cpp b/src/core/api/joiner_api.cpp index ceee39450..04e635c44 100644 --- a/src/core/api/joiner_api.cpp +++ b/src/core/api/joiner_api.cpp @@ -39,7 +39,7 @@ #include "common/as_core_type.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/link_api.cpp b/src/core/api/link_api.cpp index 4d8484745..67e947f5f 100644 --- a/src/core/api/link_api.cpp +++ b/src/core/api/link_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "mac/mac.hpp" #include "radio/radio.hpp" diff --git a/src/core/api/link_metrics_api.cpp b/src/core/api/link_metrics_api.cpp index d822ba806..8a957115b 100644 --- a/src/core/api/link_metrics_api.cpp +++ b/src/core/api/link_metrics_api.cpp @@ -37,7 +37,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/link_raw_api.cpp b/src/core/api/link_raw_api.cpp index 12a76d53d..c38e51544 100644 --- a/src/core/api/link_raw_api.cpp +++ b/src/core/api/link_raw_api.cpp @@ -43,8 +43,8 @@ #include "common/as_core_type.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/random.hpp" +#include "instance/instance.hpp" #include "mac/mac_frame.hpp" using namespace ot; diff --git a/src/core/api/logging_api.cpp b/src/core/api/logging_api.cpp index 6abbb3245..d4d2ce66f 100644 --- a/src/core/api/logging_api.cpp +++ b/src/core/api/logging_api.cpp @@ -35,7 +35,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/string.hpp" #include "instance/instance.hpp" diff --git a/src/core/api/mesh_diag_api.cpp b/src/core/api/mesh_diag_api.cpp index cfade70f6..6cdeaa6b0 100644 --- a/src/core/api/mesh_diag_api.cpp +++ b/src/core/api/mesh_diag_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "utils/mesh_diag.hpp" using namespace ot; diff --git a/src/core/api/message_api.cpp b/src/core/api/message_api.cpp index fe55b90e1..7c461ede2 100644 --- a/src/core/api/message_api.cpp +++ b/src/core/api/message_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/multi_radio_api.cpp b/src/core/api/multi_radio_api.cpp index 830456a6d..dc2cac77c 100644 --- a/src/core/api/multi_radio_api.cpp +++ b/src/core/api/multi_radio_api.cpp @@ -39,7 +39,7 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "thread/radio_selector.hpp" using namespace ot; diff --git a/src/core/api/netdata_api.cpp b/src/core/api/netdata_api.cpp index 50fcd0ce2..1921f606e 100644 --- a/src/core/api/netdata_api.cpp +++ b/src/core/api/netdata_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/netdata_publisher_api.cpp b/src/core/api/netdata_publisher_api.cpp index 9101b0a29..7bb30a6e1 100644 --- a/src/core/api/netdata_publisher_api.cpp +++ b/src/core/api/netdata_publisher_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/netdiag_api.cpp b/src/core/api/netdiag_api.cpp index 36c084d40..66b719b64 100644 --- a/src/core/api/netdiag_api.cpp +++ b/src/core/api/netdiag_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/network_time_api.cpp b/src/core/api/network_time_api.cpp index 903ed8661..bc581fe23 100644 --- a/src/core/api/network_time_api.cpp +++ b/src/core/api/network_time_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/ping_sender_api.cpp b/src/core/api/ping_sender_api.cpp index 331930608..4aa3dcbc4 100644 --- a/src/core/api/ping_sender_api.cpp +++ b/src/core/api/ping_sender_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/radio_stats_api.cpp b/src/core/api/radio_stats_api.cpp index 7c4b6e777..d7f266bf2 100644 --- a/src/core/api/radio_stats_api.cpp +++ b/src/core/api/radio_stats_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/server_api.cpp b/src/core/api/server_api.cpp index 9c44ab889..48a6ec8cc 100644 --- a/src/core/api/server_api.cpp +++ b/src/core/api/server_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/sntp_api.cpp b/src/core/api/sntp_api.cpp index 1651c3b0e..e491d236e 100644 --- a/src/core/api/sntp_api.cpp +++ b/src/core/api/sntp_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/srp_client_api.cpp b/src/core/api/srp_client_api.cpp index 7078c2083..8d6edc649 100644 --- a/src/core/api/srp_client_api.cpp +++ b/src/core/api/srp_client_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/srp_client_buffers_api.cpp b/src/core/api/srp_client_buffers_api.cpp index 35b26054c..4a1f9e258 100644 --- a/src/core/api/srp_client_buffers_api.cpp +++ b/src/core/api/srp_client_buffers_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/srp_server_api.cpp b/src/core/api/srp_server_api.cpp index 4a0044b80..013155a21 100644 --- a/src/core/api/srp_server_api.cpp +++ b/src/core/api/srp_server_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/tasklet_api.cpp b/src/core/api/tasklet_api.cpp index bcda24a97..c427020c3 100644 --- a/src/core/api/tasklet_api.cpp +++ b/src/core/api/tasklet_api.cpp @@ -37,7 +37,7 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/tcp_api.cpp b/src/core/api/tcp_api.cpp index b779d4815..807b6193f 100644 --- a/src/core/api/tcp_api.cpp +++ b/src/core/api/tcp_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/tcp_ext_api.cpp b/src/core/api/tcp_ext_api.cpp index c6540662c..e93b85f7c 100644 --- a/src/core/api/tcp_ext_api.cpp +++ b/src/core/api/tcp_ext_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "net/tcp6_ext.hpp" #if OPENTHREAD_CONFIG_TLS_ENABLE diff --git a/src/core/api/thread_api.cpp b/src/core/api/thread_api.cpp index 1fa4dc9bc..252daff2d 100644 --- a/src/core/api/thread_api.cpp +++ b/src/core/api/thread_api.cpp @@ -39,8 +39,8 @@ #include "common/as_core_type.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/uptime.hpp" +#include "instance/instance.hpp" #include "thread/version.hpp" using namespace ot; diff --git a/src/core/api/thread_ftd_api.cpp b/src/core/api/thread_ftd_api.cpp index 6f6d266cb..e5d56f9a7 100644 --- a/src/core/api/thread_ftd_api.cpp +++ b/src/core/api/thread_ftd_api.cpp @@ -38,7 +38,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/api/udp_api.cpp b/src/core/api/udp_api.cpp index 01c5a3408..fb50c8abc 100644 --- a/src/core/api/udp_api.cpp +++ b/src/core/api/udp_api.cpp @@ -36,7 +36,7 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" using namespace ot; diff --git a/src/core/backbone_router/backbone_tmf.cpp b/src/core/backbone_router/backbone_tmf.cpp index 63abcf2e0..4c2d0137b 100644 --- a/src/core/backbone_router/backbone_tmf.cpp +++ b/src/core/backbone_router/backbone_tmf.cpp @@ -35,8 +35,8 @@ #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE -#include "common/locator_getters.hpp" #include "common/log.hpp" +#include "instance/instance.hpp" namespace ot { namespace BackboneRouter { diff --git a/src/core/backbone_router/bbr_leader.cpp b/src/core/backbone_router/bbr_leader.cpp index 00545b5e7..369925c6d 100644 --- a/src/core/backbone_router/bbr_leader.cpp +++ b/src/core/backbone_router/bbr_leader.cpp @@ -35,7 +35,6 @@ #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/backbone_router/bbr_local.cpp b/src/core/backbone_router/bbr_local.cpp index e787607d0..292e338fb 100644 --- a/src/core/backbone_router/bbr_local.cpp +++ b/src/core/backbone_router/bbr_local.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/backbone_router/bbr_manager.cpp b/src/core/backbone_router/bbr_manager.cpp index 2269c10aa..9effe30bc 100644 --- a/src/core/backbone_router/bbr_manager.cpp +++ b/src/core/backbone_router/bbr_manager.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/numeric_limits.hpp" diff --git a/src/core/backbone_router/multicast_listeners_table.cpp b/src/core/backbone_router/multicast_listeners_table.cpp index 22e4e320a..2a9f8c863 100644 --- a/src/core/backbone_router/multicast_listeners_table.cpp +++ b/src/core/backbone_router/multicast_listeners_table.cpp @@ -37,7 +37,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/backbone_router/ndproxy_table.cpp b/src/core/backbone_router/ndproxy_table.cpp index edb196cbc..3e2c494f1 100644 --- a/src/core/backbone_router/ndproxy_table.cpp +++ b/src/core/backbone_router/ndproxy_table.cpp @@ -36,9 +36,9 @@ #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE #include "common/array.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" +#include "instance/instance.hpp" namespace ot { diff --git a/src/core/border_router/infra_if.cpp b/src/core/border_router/infra_if.cpp index d38c3b006..348d62dd9 100644 --- a/src/core/border_router/infra_if.cpp +++ b/src/core/border_router/infra_if.cpp @@ -37,7 +37,6 @@ #include "border_router/routing_manager.hpp" #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" #include "common/logging.hpp" #include "instance/instance.hpp" #include "net/icmp6.hpp" diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index f110ed69b..c0247e0ff 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -44,7 +44,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/numeric_limits.hpp" diff --git a/src/core/coap/coap.cpp b/src/core/coap/coap.cpp index 177d2bd6e..6d9728d3b 100644 --- a/src/core/coap/coap.cpp +++ b/src/core/coap/coap.cpp @@ -32,7 +32,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "common/string.hpp" diff --git a/src/core/coap/coap_secure.cpp b/src/core/coap/coap_secure.cpp index 7b54058ca..a0098986f 100644 --- a/src/core/coap/coap_secure.cpp +++ b/src/core/coap/coap_secure.cpp @@ -30,7 +30,6 @@ #if OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/new.hpp" #include "instance/instance.hpp" diff --git a/src/core/common/locator_getters.hpp b/src/core/common/locator_getters.hpp deleted file mode 100644 index ad9067f54..000000000 --- a/src/core/common/locator_getters.hpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2017-2019, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file - * This file includes definitions locator getter methods. - * - */ - -#ifndef LOCATOR_GETTERS_HPP_ -#define LOCATOR_GETTERS_HPP_ - -#include "openthread-core-config.h" - -#include "common/locator.hpp" -#include "common/tasklet.hpp" -#include "instance/instance.hpp" - -namespace ot { - -template -template -inline Type &GetProvider::Get(void) const -{ - return static_cast(this)->GetInstance().template Get(); -} - -template -void TaskletIn::HandleTasklet(Tasklet &aTasklet) -{ - (aTasklet.Get().*HandleTaskletPtr)(); -} - -template -void TimerMilliIn::HandleTimer(Timer &aTimer) -{ - (aTimer.Get().*HandleTimertPtr)(); -} - -#if OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE -template -void TimerMicroIn::HandleTimer(Timer &aTimer) -{ - (aTimer.Get().*HandleTimertPtr)(); -} -#endif - -} // namespace ot - -#endif // LOCATOR_GETTERS_HPP_ diff --git a/src/core/common/message.cpp b/src/core/common/message.cpp index 989877ce5..1b25109c5 100644 --- a/src/core/common/message.cpp +++ b/src/core/common/message.cpp @@ -37,7 +37,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/heap.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/numeric_limits.hpp" diff --git a/src/core/common/notifier.cpp b/src/core/common/notifier.cpp index f1f9863a6..c150e5cd8 100644 --- a/src/core/common/notifier.cpp +++ b/src/core/common/notifier.cpp @@ -37,8 +37,8 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" +#include "instance/instance.hpp" namespace ot { diff --git a/src/core/common/settings.cpp b/src/core/common/settings.cpp index 1451b7a90..695e899bf 100644 --- a/src/core/common/settings.cpp +++ b/src/core/common/settings.cpp @@ -36,7 +36,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "instance/instance.hpp" #include "meshcop/dataset.hpp" diff --git a/src/core/common/tasklet.cpp b/src/core/common/tasklet.cpp index b2c451215..deb718c2b 100644 --- a/src/core/common/tasklet.cpp +++ b/src/core/common/tasklet.cpp @@ -34,7 +34,7 @@ #include "tasklet.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" namespace ot { diff --git a/src/core/common/tasklet.hpp b/src/core/common/tasklet.hpp index 5158bdd85..87e45d7c2 100644 --- a/src/core/common/tasklet.hpp +++ b/src/core/common/tasklet.hpp @@ -171,7 +171,7 @@ public: } private: - static void HandleTasklet(Tasklet &aTasklet); // Implemented in `locator_getters.hpp` + static void HandleTasklet(Tasklet &aTasklet); // Implemented in `instance.hpp` }; /** diff --git a/src/core/common/time_ticker.cpp b/src/core/common/time_ticker.cpp index 4cc59c1c6..9a96dabb4 100644 --- a/src/core/common/time_ticker.cpp +++ b/src/core/common/time_ticker.cpp @@ -35,7 +35,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/random.hpp" #include "instance/instance.hpp" #include "thread/mle_router.hpp" diff --git a/src/core/common/timer.cpp b/src/core/common/timer.cpp index 939989288..a344cfa29 100644 --- a/src/core/common/timer.cpp +++ b/src/core/common/timer.cpp @@ -36,7 +36,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/common/timer.hpp b/src/core/common/timer.hpp index 02b944b70..fadf07f7c 100644 --- a/src/core/common/timer.hpp +++ b/src/core/common/timer.hpp @@ -353,7 +353,7 @@ public: } private: - static void HandleTimer(Timer &aTimer); // Implemented in `locator_getters.hpp` + static void HandleTimer(Timer &aTimer); // Implemented in `instance.hpp` }; /** @@ -514,7 +514,7 @@ public: } private: - static void HandleTimer(Timer &aTimer); // Implemented in `locator_getters.hpp` + static void HandleTimer(Timer &aTimer); // Implemented in `instance.hpp` }; #endif // OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE diff --git a/src/core/common/uptime.cpp b/src/core/common/uptime.cpp index 3d9e6afde..5d360a52c 100644 --- a/src/core/common/uptime.cpp +++ b/src/core/common/uptime.cpp @@ -37,7 +37,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/diags/factory_diags.cpp b/src/core/diags/factory_diags.cpp index b0691e10d..cab0d6dc9 100644 --- a/src/core/diags/factory_diags.cpp +++ b/src/core/diags/factory_diags.cpp @@ -45,7 +45,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/string.hpp" #include "instance/instance.hpp" #include "radio/radio.hpp" diff --git a/src/core/instance/instance.hpp b/src/core/instance/instance.hpp index cb9c3d340..e710b7ae6 100644 --- a/src/core/instance/instance.hpp +++ b/src/core/instance/instance.hpp @@ -47,6 +47,7 @@ #include "common/array.hpp" #include "common/as_core_type.hpp" #include "common/error.hpp" +#include "common/locator.hpp" #include "common/log.hpp" #include "common/message.hpp" #include "common/non_copyable.hpp" @@ -1109,6 +1110,35 @@ template <> inline FactoryDiags::Diags &Instance::Get(void) { return mDiags; } template <> inline Utils::PowerCalibration &Instance::Get(void) { return mPowerCalibration; } #endif +//--------------------------------------------------------------------------------------------------------------------- + +template +template +inline Type &GetProvider::Get(void) const +{ + return static_cast(this)->GetInstance().template Get(); +} + +template +void TaskletIn::HandleTasklet(Tasklet &aTasklet) +{ + (aTasklet.Get().*HandleTaskletPtr)(); +} + +template +void TimerMilliIn::HandleTimer(Timer &aTimer) +{ + (aTimer.Get().*HandleTimertPtr)(); +} + +#if OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE +template +void TimerMicroIn::HandleTimer(Timer &aTimer) +{ + (aTimer.Get().*HandleTimertPtr)(); +} +#endif + /** * @} * diff --git a/src/core/mac/data_poll_handler.cpp b/src/core/mac/data_poll_handler.cpp index 226ab087e..4b50c6d0c 100644 --- a/src/core/mac/data_poll_handler.cpp +++ b/src/core/mac/data_poll_handler.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_FTD #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" diff --git a/src/core/mac/data_poll_sender.cpp b/src/core/mac/data_poll_sender.cpp index ef3d4b662..fbc6884ad 100644 --- a/src/core/mac/data_poll_sender.cpp +++ b/src/core/mac/data_poll_sender.cpp @@ -34,7 +34,6 @@ #include "data_poll_sender.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/message.hpp" #include "common/num_utils.hpp" diff --git a/src/core/mac/link_raw.cpp b/src/core/mac/link_raw.cpp index be433815f..8ec09bc6b 100644 --- a/src/core/mac/link_raw.cpp +++ b/src/core/mac/link_raw.cpp @@ -40,7 +40,6 @@ #include #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index 98b06ed1d..9223ad966 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -40,7 +40,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/random.hpp" #include "common/string.hpp" #include "crypto/aes_ccm.hpp" diff --git a/src/core/mac/mac_links.cpp b/src/core/mac/mac_links.cpp index 481f0f0eb..5d816f57e 100644 --- a/src/core/mac/mac_links.cpp +++ b/src/core/mac/mac_links.cpp @@ -34,7 +34,6 @@ #include "mac_links.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/mac/sub_mac.cpp b/src/core/mac/sub_mac.cpp index 28b170f9a..afbf9b997 100644 --- a/src/core/mac/sub_mac.cpp +++ b/src/core/mac/sub_mac.cpp @@ -39,7 +39,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/random.hpp" diff --git a/src/core/mac/sub_mac_callbacks.cpp b/src/core/mac/sub_mac_callbacks.cpp index a6e761531..d5ea036f4 100644 --- a/src/core/mac/sub_mac_callbacks.cpp +++ b/src/core/mac/sub_mac_callbacks.cpp @@ -34,7 +34,6 @@ #include "sub_mac.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" #if OPENTHREAD_FTD || OPENTHREAD_MTD diff --git a/src/core/mac/sub_mac_csl_receiver.cpp b/src/core/mac/sub_mac_csl_receiver.cpp index e890687d6..ae7801868 100644 --- a/src/core/mac/sub_mac_csl_receiver.cpp +++ b/src/core/mac/sub_mac_csl_receiver.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" diff --git a/src/core/meshcop/announce_begin_client.cpp b/src/core/meshcop/announce_begin_client.cpp index 07ee2723f..b6a80bce8 100644 --- a/src/core/meshcop/announce_begin_client.cpp +++ b/src/core/meshcop/announce_begin_client.cpp @@ -38,7 +38,6 @@ #include "coap/coap_message.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/meshcop/border_agent.cpp b/src/core/meshcop/border_agent.cpp index 3a61a0ea9..20cf45d7b 100644 --- a/src/core/meshcop/border_agent.cpp +++ b/src/core/meshcop/border_agent.cpp @@ -38,7 +38,6 @@ #include "coap/coap_message.hpp" #include "common/as_core_type.hpp" #include "common/heap.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/owned_ptr.hpp" #include "common/settings.hpp" diff --git a/src/core/meshcop/commissioner.cpp b/src/core/meshcop/commissioner.cpp index 8d71ca311..c75117f1b 100644 --- a/src/core/meshcop/commissioner.cpp +++ b/src/core/meshcop/commissioner.cpp @@ -41,7 +41,6 @@ #include "common/array.hpp" #include "common/as_core_type.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/string.hpp" #include "instance/instance.hpp" #include "meshcop/joiner.hpp" diff --git a/src/core/meshcop/dataset.cpp b/src/core/meshcop/dataset.cpp index ca25268fe..8afd7ea8e 100644 --- a/src/core/meshcop/dataset.cpp +++ b/src/core/meshcop/dataset.cpp @@ -38,7 +38,6 @@ #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "mac/mac_types.hpp" diff --git a/src/core/meshcop/dataset_manager.cpp b/src/core/meshcop/dataset_manager.cpp index af83a25bf..2d5cb1f7b 100644 --- a/src/core/meshcop/dataset_manager.cpp +++ b/src/core/meshcop/dataset_manager.cpp @@ -37,7 +37,6 @@ #include #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/notifier.hpp" #include "instance/instance.hpp" diff --git a/src/core/meshcop/dataset_manager_ftd.cpp b/src/core/meshcop/dataset_manager_ftd.cpp index 47e6eaa71..754c531b1 100644 --- a/src/core/meshcop/dataset_manager_ftd.cpp +++ b/src/core/meshcop/dataset_manager_ftd.cpp @@ -44,7 +44,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "common/timer.hpp" diff --git a/src/core/meshcop/dataset_updater.cpp b/src/core/meshcop/dataset_updater.cpp index f512f8057..8ff08d88c 100644 --- a/src/core/meshcop/dataset_updater.cpp +++ b/src/core/meshcop/dataset_updater.cpp @@ -37,7 +37,6 @@ #if (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/meshcop/energy_scan_client.cpp b/src/core/meshcop/energy_scan_client.cpp index 41f083883..298b1bce2 100644 --- a/src/core/meshcop/energy_scan_client.cpp +++ b/src/core/meshcop/energy_scan_client.cpp @@ -40,7 +40,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "instance/instance.hpp" diff --git a/src/core/meshcop/extended_panid.cpp b/src/core/meshcop/extended_panid.cpp index b90301aa7..3242b6973 100644 --- a/src/core/meshcop/extended_panid.cpp +++ b/src/core/meshcop/extended_panid.cpp @@ -34,8 +34,8 @@ #include "extended_panid.hpp" -#include "common/locator_getters.hpp" #include "common/notifier.hpp" +#include "instance/instance.hpp" namespace ot { namespace MeshCoP { diff --git a/src/core/meshcop/joiner.cpp b/src/core/meshcop/joiner.cpp index dcd55aa3a..2dbebf46d 100644 --- a/src/core/meshcop/joiner.cpp +++ b/src/core/meshcop/joiner.cpp @@ -42,7 +42,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/string.hpp" #include "instance/instance.hpp" diff --git a/src/core/meshcop/joiner_router.cpp b/src/core/meshcop/joiner_router.cpp index 8c31dba51..64a282d2d 100644 --- a/src/core/meshcop/joiner_router.cpp +++ b/src/core/meshcop/joiner_router.cpp @@ -40,7 +40,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/meshcop/meshcop.cpp b/src/core/meshcop/meshcop.cpp index bf81da74e..1b14b3da0 100644 --- a/src/core/meshcop/meshcop.cpp +++ b/src/core/meshcop/meshcop.cpp @@ -38,9 +38,9 @@ #include "common/clearable.hpp" #include "common/crc16.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/string.hpp" #include "crypto/sha256.hpp" +#include "instance/instance.hpp" #include "mac/mac_types.hpp" #include "thread/thread_netif.hpp" diff --git a/src/core/meshcop/meshcop_leader.cpp b/src/core/meshcop/meshcop_leader.cpp index 984414796..e29d96d83 100644 --- a/src/core/meshcop/meshcop_leader.cpp +++ b/src/core/meshcop/meshcop_leader.cpp @@ -40,7 +40,6 @@ #include "coap/coap_message.hpp" #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/meshcop/network_name.cpp b/src/core/meshcop/network_name.cpp index 431663123..8627a605f 100644 --- a/src/core/meshcop/network_name.cpp +++ b/src/core/meshcop/network_name.cpp @@ -34,8 +34,8 @@ #include "network_name.hpp" -#include "common/locator_getters.hpp" #include "common/notifier.hpp" +#include "instance/instance.hpp" namespace ot { namespace MeshCoP { diff --git a/src/core/meshcop/panid_query_client.cpp b/src/core/meshcop/panid_query_client.cpp index 01a3e9a39..19ba963f4 100644 --- a/src/core/meshcop/panid_query_client.cpp +++ b/src/core/meshcop/panid_query_client.cpp @@ -39,7 +39,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/meshcop/secure_transport.cpp b/src/core/meshcop/secure_transport.cpp index 59f859c96..e19c128cf 100644 --- a/src/core/meshcop/secure_transport.cpp +++ b/src/core/meshcop/secure_transport.cpp @@ -45,7 +45,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/timer.hpp" #include "crypto/mbedtls.hpp" diff --git a/src/core/meshcop/tcat_agent.cpp b/src/core/meshcop/tcat_agent.cpp index 847a005c6..946ed1a20 100644 --- a/src/core/meshcop/tcat_agent.cpp +++ b/src/core/meshcop/tcat_agent.cpp @@ -41,7 +41,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/string.hpp" #include "instance/instance.hpp" #include "radio/radio.hpp" diff --git a/src/core/net/dhcp6_client.cpp b/src/core/net/dhcp6_client.cpp index abf6e3265..705095daf 100644 --- a/src/core/net/dhcp6_client.cpp +++ b/src/core/net/dhcp6_client.cpp @@ -38,7 +38,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "mac/mac.hpp" diff --git a/src/core/net/dhcp6_server.cpp b/src/core/net/dhcp6_server.cpp index f25884e12..104f93135 100644 --- a/src/core/net/dhcp6_server.cpp +++ b/src/core/net/dhcp6_server.cpp @@ -39,7 +39,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "thread/mle.hpp" diff --git a/src/core/net/dns_client.cpp b/src/core/net/dns_client.cpp index 1d41c87c6..886fe1ea0 100644 --- a/src/core/net/dns_client.cpp +++ b/src/core/net/dns_client.cpp @@ -34,7 +34,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "net/udp6.hpp" diff --git a/src/core/net/dns_dso.cpp b/src/core/net/dns_dso.cpp index d4ec7abd0..f74f55fe9 100644 --- a/src/core/net/dns_dso.cpp +++ b/src/core/net/dns_dso.cpp @@ -34,7 +34,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/random.hpp" diff --git a/src/core/net/dnssd.cpp b/src/core/net/dnssd.cpp index 6d54b5e99..a77dfb231 100644 --- a/src/core/net/dnssd.cpp +++ b/src/core/net/dnssd.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE || OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/net/dnssd_server.cpp b/src/core/net/dnssd_server.cpp index 5b75f4f06..2b4259855 100644 --- a/src/core/net/dnssd_server.cpp +++ b/src/core/net/dnssd_server.cpp @@ -41,7 +41,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/string.hpp" #include "instance/instance.hpp" diff --git a/src/core/net/icmp6.cpp b/src/core/net/icmp6.cpp index b47e21e87..6800a61a0 100644 --- a/src/core/net/icmp6.cpp +++ b/src/core/net/icmp6.cpp @@ -35,7 +35,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/message.hpp" #include "instance/instance.hpp" diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 6ca08a024..904aa09f1 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -38,7 +38,6 @@ #include "backbone_router/ndproxy_table.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/message.hpp" #include "common/random.hpp" diff --git a/src/core/net/ip6_filter.cpp b/src/core/net/ip6_filter.cpp index 81e9c2178..04da9b5b3 100644 --- a/src/core/net/ip6_filter.cpp +++ b/src/core/net/ip6_filter.cpp @@ -36,7 +36,6 @@ #include #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/net/ip6_mpl.cpp b/src/core/net/ip6_mpl.cpp index 3bd873d07..571a71582 100644 --- a/src/core/net/ip6_mpl.cpp +++ b/src/core/net/ip6_mpl.cpp @@ -35,7 +35,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/message.hpp" #include "common/random.hpp" #include "common/serial_number.hpp" diff --git a/src/core/net/mdns.cpp b/src/core/net/mdns.cpp index 2ebad6519..a2daa7228 100644 --- a/src/core/net/mdns.cpp +++ b/src/core/net/mdns.cpp @@ -31,7 +31,6 @@ #if OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/numeric_limits.hpp" #include "common/type_traits.hpp" diff --git a/src/core/net/nat64_translator.cpp b/src/core/net/nat64_translator.cpp index da1e6f870..a63f5bf02 100644 --- a/src/core/net/nat64_translator.cpp +++ b/src/core/net/nat64_translator.cpp @@ -39,8 +39,8 @@ #include #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" +#include "instance/instance.hpp" #include "net/checksum.hpp" #include "net/ip4_types.hpp" #include "net/ip6.hpp" diff --git a/src/core/net/nd_agent.cpp b/src/core/net/nd_agent.cpp index 1af8b58c5..11a0c2147 100644 --- a/src/core/net/nd_agent.cpp +++ b/src/core/net/nd_agent.cpp @@ -36,7 +36,7 @@ #if OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE #include "common/as_core_type.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "thread/lowpan.hpp" #include "thread/mle_router.hpp" #include "thread/network_data_leader.hpp" diff --git a/src/core/net/netif.cpp b/src/core/net/netif.cpp index 999507662..6173e0aac 100644 --- a/src/core/net/netif.cpp +++ b/src/core/net/netif.cpp @@ -35,7 +35,6 @@ #include "common/as_core_type.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/message.hpp" #include "instance/instance.hpp" #include "net/ip6.hpp" diff --git a/src/core/net/sntp_client.cpp b/src/core/net/sntp_client.cpp index 7e28ad795..dd2c32943 100644 --- a/src/core/net/sntp_client.cpp +++ b/src/core/net/sntp_client.cpp @@ -34,7 +34,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "net/udp6.hpp" diff --git a/src/core/net/srp_advertising_proxy.cpp b/src/core/net/srp_advertising_proxy.cpp index e8b086cbd..18674528d 100644 --- a/src/core/net/srp_advertising_proxy.cpp +++ b/src/core/net/srp_advertising_proxy.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/serial_number.hpp" #include "common/type_traits.hpp" diff --git a/src/core/net/srp_client.cpp b/src/core/net/srp_client.cpp index c75500c9e..18621ddbb 100644 --- a/src/core/net/srp_client.cpp +++ b/src/core/net/srp_client.cpp @@ -33,7 +33,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "common/random.hpp" #include "common/settings.hpp" diff --git a/src/core/net/srp_server.cpp b/src/core/net/srp_server.cpp index c6ffe222a..8142de63a 100644 --- a/src/core/net/srp_server.cpp +++ b/src/core/net/srp_server.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/const_cast.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/new.hpp" #include "common/num_utils.hpp" diff --git a/src/core/net/tcp6.cpp b/src/core/net/tcp6.cpp index 470e92ac5..d09d356bf 100644 --- a/src/core/net/tcp6.cpp +++ b/src/core/net/tcp6.cpp @@ -40,7 +40,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/error.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/random.hpp" diff --git a/src/core/net/tcp6_ext.cpp b/src/core/net/tcp6_ext.cpp index c7601e8d3..8971e56fb 100644 --- a/src/core/net/tcp6_ext.cpp +++ b/src/core/net/tcp6_ext.cpp @@ -39,8 +39,8 @@ #include "common/code_utils.hpp" #include "common/error.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" +#include "instance/instance.hpp" namespace ot { namespace Ip6 { diff --git a/src/core/net/udp6.cpp b/src/core/net/udp6.cpp index 5fd34b266..f3a7e506c 100644 --- a/src/core/net/udp6.cpp +++ b/src/core/net/udp6.cpp @@ -39,7 +39,6 @@ #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" #include "net/checksum.hpp" #include "net/ip6.hpp" diff --git a/src/core/radio/ble_secure.cpp b/src/core/radio/ble_secure.cpp index f1047ef01..48df97a69 100644 --- a/src/core/radio/ble_secure.cpp +++ b/src/core/radio/ble_secure.cpp @@ -31,7 +31,6 @@ #if OPENTHREAD_CONFIG_BLE_TCAT_ENABLE #include -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/tlvs.hpp" #include "instance/instance.hpp" diff --git a/src/core/radio/radio.cpp b/src/core/radio/radio.cpp index 2356e1418..b1944e4b7 100644 --- a/src/core/radio/radio.cpp +++ b/src/core/radio/radio.cpp @@ -29,8 +29,8 @@ #include "radio.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/timer.hpp" +#include "instance/instance.hpp" #include "mac/mac_frame.hpp" #include "utils/otns.hpp" diff --git a/src/core/radio/radio_callbacks.cpp b/src/core/radio/radio_callbacks.cpp index c0ad0a12f..166eb5bf0 100644 --- a/src/core/radio/radio_callbacks.cpp +++ b/src/core/radio/radio_callbacks.cpp @@ -33,7 +33,6 @@ #include "radio.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/radio/trel_interface.cpp b/src/core/radio/trel_interface.cpp index 5441f0c37..962a36699 100644 --- a/src/core/radio/trel_interface.cpp +++ b/src/core/radio/trel_interface.cpp @@ -40,7 +40,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/string.hpp" #include "instance/instance.hpp" diff --git a/src/core/radio/trel_link.cpp b/src/core/radio/trel_link.cpp index 0b479874a..6a7e54b91 100644 --- a/src/core/radio/trel_link.cpp +++ b/src/core/radio/trel_link.cpp @@ -36,7 +36,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" diff --git a/src/core/radio/trel_packet.cpp b/src/core/radio/trel_packet.cpp index f28129f72..32bdc9cec 100644 --- a/src/core/radio/trel_packet.cpp +++ b/src/core/radio/trel_packet.cpp @@ -36,7 +36,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/thread/address_resolver.cpp b/src/core/thread/address_resolver.cpp index 2831ba5b5..ddfbc6d43 100644 --- a/src/core/thread/address_resolver.cpp +++ b/src/core/thread/address_resolver.cpp @@ -38,7 +38,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/time.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/announce_begin_server.cpp b/src/core/thread/announce_begin_server.cpp index b243d9015..a0a1c4a65 100644 --- a/src/core/thread/announce_begin_server.cpp +++ b/src/core/thread/announce_begin_server.cpp @@ -39,7 +39,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop_tlvs.hpp" diff --git a/src/core/thread/announce_sender.cpp b/src/core/thread/announce_sender.cpp index 4a8ece2c8..f2c129273 100644 --- a/src/core/thread/announce_sender.cpp +++ b/src/core/thread/announce_sender.cpp @@ -36,7 +36,6 @@ #include #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/anycast_locator.cpp b/src/core/thread/anycast_locator.cpp index 03cf14563..2bc8285eb 100644 --- a/src/core/thread/anycast_locator.cpp +++ b/src/core/thread/anycast_locator.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" #include "thread/thread_tlvs.hpp" #include "thread/uri_paths.hpp" diff --git a/src/core/thread/child.cpp b/src/core/thread/child.cpp index 0f4efacd9..47838f51f 100644 --- a/src/core/thread/child.cpp +++ b/src/core/thread/child.cpp @@ -36,7 +36,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/child_supervision.cpp b/src/core/thread/child_supervision.cpp index 80622ebb4..2f2be200a 100644 --- a/src/core/thread/child_supervision.cpp +++ b/src/core/thread/child_supervision.cpp @@ -35,7 +35,6 @@ #include "openthread-core-config.h" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "thread/thread_netif.hpp" diff --git a/src/core/thread/child_table.cpp b/src/core/thread/child_table.cpp index 5e28fd626..9428fda84 100644 --- a/src/core/thread/child_table.cpp +++ b/src/core/thread/child_table.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_FTD #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot { diff --git a/src/core/thread/csl_tx_scheduler.cpp b/src/core/thread/csl_tx_scheduler.cpp index 0f28c43a0..d05d3f121 100644 --- a/src/core/thread/csl_tx_scheduler.cpp +++ b/src/core/thread/csl_tx_scheduler.cpp @@ -30,10 +30,10 @@ #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/time.hpp" +#include "instance/instance.hpp" #include "mac/mac.hpp" namespace ot { diff --git a/src/core/thread/discover_scanner.cpp b/src/core/thread/discover_scanner.cpp index a79333657..06a6e7c3a 100644 --- a/src/core/thread/discover_scanner.cpp +++ b/src/core/thread/discover_scanner.cpp @@ -35,7 +35,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" #include "thread/mesh_forwarder.hpp" #include "thread/mle.hpp" diff --git a/src/core/thread/dua_manager.cpp b/src/core/thread/dua_manager.cpp index d8dc2068a..39aa7f142 100644 --- a/src/core/thread/dua_manager.cpp +++ b/src/core/thread/dua_manager.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/settings.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/energy_scan_server.cpp b/src/core/thread/energy_scan_server.cpp index c79c7d849..0b3a3712c 100644 --- a/src/core/thread/energy_scan_server.cpp +++ b/src/core/thread/energy_scan_server.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/thread/indirect_sender.cpp b/src/core/thread/indirect_sender.cpp index 4fc4d07c5..d7e013359 100644 --- a/src/core/thread/indirect_sender.cpp +++ b/src/core/thread/indirect_sender.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_FTD #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/message.hpp" #include "instance/instance.hpp" #include "thread/child.hpp" diff --git a/src/core/thread/key_manager.cpp b/src/core/thread/key_manager.cpp index dd12eaa2d..0a817f88c 100644 --- a/src/core/thread/key_manager.cpp +++ b/src/core/thread/key_manager.cpp @@ -35,7 +35,6 @@ #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/timer.hpp" #include "crypto/hkdf_sha256.hpp" diff --git a/src/core/thread/link_metrics.cpp b/src/core/thread/link_metrics.cpp index 90381e3ca..0fa618b59 100644 --- a/src/core/thread/link_metrics.cpp +++ b/src/core/thread/link_metrics.cpp @@ -37,7 +37,6 @@ #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/num_utils.hpp" #include "common/numeric_limits.hpp" diff --git a/src/core/thread/link_quality.cpp b/src/core/thread/link_quality.cpp index 67475401b..8d1d4ff1b 100644 --- a/src/core/thread/link_quality.cpp +++ b/src/core/thread/link_quality.cpp @@ -36,7 +36,6 @@ #include #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "common/numeric_limits.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/lowpan.cpp b/src/core/thread/lowpan.cpp index e05bbd628..b20c81fae 100644 --- a/src/core/thread/lowpan.cpp +++ b/src/core/thread/lowpan.cpp @@ -36,7 +36,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/numeric_limits.hpp" #include "instance/instance.hpp" #include "net/ip6.hpp" diff --git a/src/core/thread/mesh_forwarder.cpp b/src/core/thread/mesh_forwarder.cpp index 085b40188..151c38773 100644 --- a/src/core/thread/mesh_forwarder.cpp +++ b/src/core/thread/mesh_forwarder.cpp @@ -36,7 +36,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/message.hpp" #include "common/random.hpp" #include "common/time_ticker.hpp" diff --git a/src/core/thread/mesh_forwarder_ftd.cpp b/src/core/thread/mesh_forwarder_ftd.cpp index 904286439..1dc7fba10 100644 --- a/src/core/thread/mesh_forwarder_ftd.cpp +++ b/src/core/thread/mesh_forwarder_ftd.cpp @@ -35,8 +35,8 @@ #if OPENTHREAD_FTD -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" +#include "instance/instance.hpp" #include "meshcop/meshcop.hpp" #include "net/ip6.hpp" #include "net/tcp6.hpp" diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 61313a314..1bd9eecef 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -41,7 +41,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "common/numeric_limits.hpp" #include "common/random.hpp" diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 087be21bc..470983746 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -38,7 +38,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "common/random.hpp" #include "common/serial_number.hpp" diff --git a/src/core/thread/mlr_manager.cpp b/src/core/thread/mlr_manager.cpp index 1b9f85df3..df502cf36 100644 --- a/src/core/thread/mlr_manager.cpp +++ b/src/core/thread/mlr_manager.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "net/ip6_address.hpp" diff --git a/src/core/thread/neighbor.cpp b/src/core/thread/neighbor.cpp index d86956870..8032b3a31 100644 --- a/src/core/thread/neighbor.cpp +++ b/src/core/thread/neighbor.cpp @@ -36,7 +36,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/neighbor_table.cpp b/src/core/thread/neighbor_table.cpp index f7a2a7920..7f7130339 100644 --- a/src/core/thread/neighbor_table.cpp +++ b/src/core/thread/neighbor_table.cpp @@ -34,7 +34,6 @@ #include "neighbor_table.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" #include "thread/dua_manager.hpp" diff --git a/src/core/thread/network_data.cpp b/src/core/thread/network_data.cpp index 9ced6a310..a55a3dce8 100644 --- a/src/core/thread/network_data.cpp +++ b/src/core/thread/network_data.cpp @@ -37,7 +37,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "mac/mac_types.hpp" diff --git a/src/core/thread/network_data_leader.cpp b/src/core/thread/network_data_leader.cpp index 4a75f13af..54bce0972 100644 --- a/src/core/thread/network_data_leader.cpp +++ b/src/core/thread/network_data_leader.cpp @@ -37,7 +37,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/logging.hpp" #include "common/message.hpp" #include "common/random.hpp" diff --git a/src/core/thread/network_data_leader_ftd.cpp b/src/core/thread/network_data_leader_ftd.cpp index 11699f6f5..2908811f1 100644 --- a/src/core/thread/network_data_leader_ftd.cpp +++ b/src/core/thread/network_data_leader_ftd.cpp @@ -40,7 +40,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/message.hpp" #include "common/timer.hpp" diff --git a/src/core/thread/network_data_local.cpp b/src/core/thread/network_data_local.cpp index 1e92266c2..69b40c429 100644 --- a/src/core/thread/network_data_local.cpp +++ b/src/core/thread/network_data_local.cpp @@ -37,7 +37,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "mac/mac_types.hpp" diff --git a/src/core/thread/network_data_notifier.cpp b/src/core/thread/network_data_notifier.cpp index d77c6c397..a741d5549 100644 --- a/src/core/thread/network_data_notifier.cpp +++ b/src/core/thread/network_data_notifier.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_FTD || OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE || OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "thread/network_data_leader.hpp" diff --git a/src/core/thread/network_data_publisher.cpp b/src/core/thread/network_data_publisher.cpp index aa419ed61..c0a636a53 100644 --- a/src/core/thread/network_data_publisher.cpp +++ b/src/core/thread/network_data_publisher.cpp @@ -39,7 +39,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/const_cast.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/network_data_service.cpp b/src/core/thread/network_data_service.cpp index 6382b9f35..4650a5785 100644 --- a/src/core/thread/network_data_service.cpp +++ b/src/core/thread/network_data_service.cpp @@ -35,7 +35,6 @@ #include "network_data_service.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" #include "thread/network_data_local.hpp" diff --git a/src/core/thread/network_diagnostic.cpp b/src/core/thread/network_diagnostic.cpp index 03080471f..76c4cb443 100644 --- a/src/core/thread/network_diagnostic.cpp +++ b/src/core/thread/network_diagnostic.cpp @@ -39,7 +39,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/numeric_limits.hpp" #include "common/random.hpp" diff --git a/src/core/thread/panid_query_server.cpp b/src/core/thread/panid_query_server.cpp index 59dd59131..71509afbc 100644 --- a/src/core/thread/panid_query_server.cpp +++ b/src/core/thread/panid_query_server.cpp @@ -37,7 +37,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "meshcop/meshcop.hpp" diff --git a/src/core/thread/radio_selector.cpp b/src/core/thread/radio_selector.cpp index 4268bb092..d5c5a4e4e 100644 --- a/src/core/thread/radio_selector.cpp +++ b/src/core/thread/radio_selector.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_CONFIG_MULTI_RADIO #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/router.cpp b/src/core/thread/router.cpp index e130b69ab..7824a76f7 100644 --- a/src/core/thread/router.cpp +++ b/src/core/thread/router.cpp @@ -36,7 +36,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/router_table.cpp b/src/core/thread/router_table.cpp index e882a6f16..10bf8ad82 100644 --- a/src/core/thread/router_table.cpp +++ b/src/core/thread/router_table.cpp @@ -31,7 +31,6 @@ #if OPENTHREAD_FTD #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/timer.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/src_match_controller.cpp b/src/core/thread/src_match_controller.cpp index b53db1114..e4a7c5d27 100644 --- a/src/core/thread/src_match_controller.cpp +++ b/src/core/thread/src_match_controller.cpp @@ -37,7 +37,6 @@ #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" #include "mac/mac_types.hpp" diff --git a/src/core/thread/thread_netif.cpp b/src/core/thread/thread_netif.cpp index 8e6848832..bcccebd29 100644 --- a/src/core/thread/thread_netif.cpp +++ b/src/core/thread/thread_netif.cpp @@ -35,7 +35,6 @@ #include "common/code_utils.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/message.hpp" #include "instance/instance.hpp" #include "net/ip6.hpp" diff --git a/src/core/thread/time_sync_service.cpp b/src/core/thread/time_sync_service.cpp index 77e3dd383..29fed23e6 100644 --- a/src/core/thread/time_sync_service.cpp +++ b/src/core/thread/time_sync_service.cpp @@ -41,7 +41,6 @@ #include #include -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" diff --git a/src/core/thread/tmf.cpp b/src/core/thread/tmf.cpp index 430f18694..17c34cd52 100644 --- a/src/core/thread/tmf.cpp +++ b/src/core/thread/tmf.cpp @@ -33,7 +33,7 @@ #include "thread/tmf.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" #include "net/ip6_types.hpp" namespace ot { diff --git a/src/core/utils/channel_manager.cpp b/src/core/utils/channel_manager.cpp index 1e5c76252..a2855eb4f 100644 --- a/src/core/utils/channel_manager.cpp +++ b/src/core/utils/channel_manager.cpp @@ -38,7 +38,6 @@ #if (OPENTHREAD_FTD || OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE) #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "common/string.hpp" diff --git a/src/core/utils/channel_monitor.cpp b/src/core/utils/channel_monitor.cpp index f10dd93c2..4a15a343e 100644 --- a/src/core/utils/channel_monitor.cpp +++ b/src/core/utils/channel_monitor.cpp @@ -36,9 +36,9 @@ #if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" +#include "instance/instance.hpp" namespace ot { namespace Utils { diff --git a/src/core/utils/history_tracker.cpp b/src/core/utils/history_tracker.cpp index 1b2a4fd27..56aeafdaa 100644 --- a/src/core/utils/history_tracker.cpp +++ b/src/core/utils/history_tracker.cpp @@ -38,7 +38,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "common/string.hpp" #include "common/timer.hpp" diff --git a/src/core/utils/jam_detector.cpp b/src/core/utils/jam_detector.cpp index af55ba824..aa68cde9b 100644 --- a/src/core/utils/jam_detector.cpp +++ b/src/core/utils/jam_detector.cpp @@ -36,7 +36,6 @@ #if OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/random.hpp" #include "instance/instance.hpp" diff --git a/src/core/utils/link_metrics_manager.cpp b/src/core/utils/link_metrics_manager.cpp index ecb990ddc..e23b5e5b9 100644 --- a/src/core/utils/link_metrics_manager.cpp +++ b/src/core/utils/link_metrics_manager.cpp @@ -32,9 +32,9 @@ #include "common/as_core_type.hpp" #include "common/error.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/notifier.hpp" +#include "instance/instance.hpp" #include "thread/mle.hpp" #include "thread/neighbor_table.hpp" diff --git a/src/core/utils/mesh_diag.cpp b/src/core/utils/mesh_diag.cpp index 9b8981e5b..b6cd6f7db 100644 --- a/src/core/utils/mesh_diag.cpp +++ b/src/core/utils/mesh_diag.cpp @@ -38,7 +38,6 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "instance/instance.hpp" diff --git a/src/core/utils/otns.cpp b/src/core/utils/otns.cpp index a130ca3a0..9e6ceed5c 100644 --- a/src/core/utils/otns.cpp +++ b/src/core/utils/otns.cpp @@ -37,8 +37,8 @@ #if (OPENTHREAD_MTD || OPENTHREAD_FTD) && OPENTHREAD_CONFIG_OTNS_ENABLE #include "common/debug.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" +#include "instance/instance.hpp" namespace ot { namespace Utils { diff --git a/src/core/utils/ping_sender.cpp b/src/core/utils/ping_sender.cpp index b5fc75f4f..158892bb7 100644 --- a/src/core/utils/ping_sender.cpp +++ b/src/core/utils/ping_sender.cpp @@ -37,9 +37,9 @@ #include "common/as_core_type.hpp" #include "common/encoding.hpp" -#include "common/locator_getters.hpp" #include "common/num_utils.hpp" #include "common/random.hpp" +#include "instance/instance.hpp" namespace ot { namespace Utils { diff --git a/src/core/utils/power_calibration.cpp b/src/core/utils/power_calibration.cpp index 4c0c4c724..bcd315810 100644 --- a/src/core/utils/power_calibration.cpp +++ b/src/core/utils/power_calibration.cpp @@ -33,7 +33,7 @@ #include "common/as_core_type.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" +#include "instance/instance.hpp" namespace ot { namespace Utils { diff --git a/src/core/utils/slaac_address.cpp b/src/core/utils/slaac_address.cpp index c2d109c5c..21d99cc82 100644 --- a/src/core/utils/slaac_address.cpp +++ b/src/core/utils/slaac_address.cpp @@ -37,7 +37,6 @@ #include "common/array.hpp" #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "common/log.hpp" #include "common/numeric_limits.hpp" #include "common/random.hpp" diff --git a/src/core/utils/srp_client_buffers.cpp b/src/core/utils/srp_client_buffers.cpp index 098e7ea54..529495289 100644 --- a/src/core/utils/srp_client_buffers.cpp +++ b/src/core/utils/srp_client_buffers.cpp @@ -38,7 +38,6 @@ #include #include "common/code_utils.hpp" -#include "common/locator_getters.hpp" #include "instance/instance.hpp" namespace ot {