Align ICD nomenclature in the app/icd/ implementation (#29687)
* Align ICD nommenclature in the app/icd/ file implementation
* Restyled by clang-format
* rename TestIcdMonitoringTable.cpp
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn
index a015970..efffda6 100644
--- a/src/app/BUILD.gn
+++ b/src/app/BUILD.gn
@@ -238,7 +238,7 @@
":app_config",
"${chip_root}/src/access",
"${chip_root}/src/app/icd:notifier",
- "${chip_root}/src/app/icd:observer-srcs",
+ "${chip_root}/src/app/icd:observer",
"${chip_root}/src/lib/address_resolve",
"${chip_root}/src/lib/support",
"${chip_root}/src/messaging",
@@ -248,7 +248,7 @@
]
if (chip_enable_icd_server) {
- public_deps += [ "${chip_root}/src/app/icd:manager-srcs" ]
+ public_deps += [ "${chip_root}/src/app/icd:manager" ]
}
cflags = [ "-Wconversion" ]
diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp
index 9339a08..6bd8072 100644
--- a/src/app/ReadHandler.cpp
+++ b/src/app/ReadHandler.cpp
@@ -35,7 +35,7 @@
#include <app/reporting/Engine.h>
#if CHIP_CONFIG_ENABLE_ICD_SERVER
-#include <app/icd/IcdManagementServer.h> // nogncheck
+#include <app/icd/ICDManagementServer.h> // nogncheck
#endif
namespace chip {
@@ -45,7 +45,7 @@
uint16_t ReadHandler::GetPublisherSelectedIntervalLimit()
{
#if CHIP_CONFIG_ENABLE_ICD_SERVER
- return static_cast<uint16_t>(IcdManagementServer::GetInstance().GetIdleModeIntervalSec());
+ return static_cast<uint16_t>(ICDManagementServer::GetInstance().GetIdleModeIntervalSec());
#else
return kSubscriptionMaxIntervalPublisherLimit;
#endif
diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake
index fb18dd8..89cbee6 100644
--- a/src/app/chip_data_model.cmake
+++ b/src/app/chip_data_model.cmake
@@ -1,17 +1,17 @@
#
-# Copyright (c) 2020 Project CHIP Authors
+# Copyright (c) 2020 Project CHIP Authors
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
#
set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR})
@@ -32,7 +32,7 @@
find_package(Python3 REQUIRED)
set(args --zap_file ${ZAP_FILE})
- if (EXTERNAL_CLUSTERS)
+ if(EXTERNAL_CLUSTERS)
list(APPEND args --external-clusters ${EXTERNAL_CLUSTERS})
endif()
@@ -42,11 +42,13 @@
ERROR_VARIABLE ERROR_MESSAGE
RESULT_VARIABLE RC
)
- if (NOT RC EQUAL 0)
+
+ if(NOT RC EQUAL 0)
message(FATAL_ERROR "Failed to execute zap_cluster_list.py: ${ERROR_MESSAGE}")
endif()
string(REPLACE "\n" ";" CLUSTER_LIST "${CLUSTER_LIST}")
+
foreach(CLUSTER ${CLUSTER_LIST})
chip_configure_cluster(${APP_TARGET} ${CLUSTER})
endforeach()
@@ -55,26 +57,26 @@
#
# Configure ${APP_TARGET} based on the selected data model configuration.
# Available options are:
-# SCOPE CMake scope keyword that defines the scope of included sources.
-# The default is PRIVATE scope.
-# INCLUDE_SERVER Include source files from src/app/server directory.
-# ZAP_FILE Path to the ZAP file, used to determine the list of clusters
-# supported by the application.
-# IDL .matter IDL file to use for codegen. Inferred from ZAP_FILE
-# if not provided
-# EXTERNAL_CLUSTERS Clusters with external implementations. The default implementations
-# will not be used nor required for these clusters.
-# Format: MY_CUSTOM_CLUSTER'.
+# SCOPE CMake scope keyword that defines the scope of included sources.
+# The default is PRIVATE scope.
+# INCLUDE_SERVER Include source files from src/app/server directory.
+# ZAP_FILE Path to the ZAP file, used to determine the list of clusters
+# supported by the application.
+# IDL .matter IDL file to use for codegen. Inferred from ZAP_FILE
+# if not provided
+# EXTERNAL_CLUSTERS Clusters with external implementations. The default implementations
+# will not be used nor required for these clusters.
+# Format: MY_CUSTOM_CLUSTER'.
#
function(chip_configure_data_model APP_TARGET)
set(SCOPE PRIVATE)
cmake_parse_arguments(ARG "INCLUDE_SERVER" "SCOPE;ZAP_FILE;IDL" "EXTERNAL_CLUSTERS" ${ARGN})
- if (ARG_SCOPE)
+ if(ARG_SCOPE)
set(SCOPE ${ARG_SCOPE})
endif()
- if (ARG_INCLUDE_SERVER)
+ if(ARG_INCLUDE_SERVER)
target_sources(${APP_TARGET} ${SCOPE}
${CHIP_APP_BASE_DIR}/server/AclStorage.cpp
${CHIP_APP_BASE_DIR}/server/DefaultAclStorage.cpp
@@ -86,26 +88,27 @@
)
target_compile_options(${APP_TARGET} ${SCOPE}
- "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>"
+ "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>"
)
endif()
- if (ARG_ZAP_FILE)
+ if(ARG_ZAP_FILE)
chip_configure_zap_file(${APP_TARGET} ${ARG_ZAP_FILE} "${ARG_EXTERNAL_CLUSTERS}")
- if (NOT ARG_IDL)
+
+ if(NOT ARG_IDL)
string(REPLACE ".zap" ".matter" ARG_IDL ${ARG_ZAP_FILE})
endif()
endif()
- if (ARG_IDL)
+ if(ARG_IDL)
chip_codegen(${APP_TARGET}-codegen
- INPUT "${ARG_IDL}"
- GENERATOR "cpp-app"
- OUTPUTS
- "app/PluginApplicationCallbacks.h"
- "app/callback-stub.cpp"
- OUTPUT_PATH APP_GEN_DIR
- OUTPUT_FILES APP_GEN_FILES
+ INPUT "${ARG_IDL}"
+ GENERATOR "cpp-app"
+ OUTPUTS
+ "app/PluginApplicationCallbacks.h"
+ "app/callback-stub.cpp"
+ OUTPUT_PATH APP_GEN_DIR
+ OUTPUT_FILES APP_GEN_FILES
)
target_include_directories(${APP_TARGET} ${SCOPE} "${APP_GEN_DIR}")
@@ -115,16 +118,16 @@
endif()
chip_zapgen(${APP_TARGET}-zapgen
- INPUT "${ARG_ZAP_FILE}"
+ INPUT "${ARG_ZAP_FILE}"
GENERATOR "app-templates"
OUTPUTS
- "zap-generated/access.h"
- "zap-generated/CHIPClusters.h"
- "zap-generated/endpoint_config.h"
- "zap-generated/gen_config.h"
- "zap-generated/IMClusterCommandHandler.cpp"
- OUTPUT_PATH APP_TEMPLATES_GEN_DIR
- OUTPUT_FILES APP_TEMPLATES_GEN_FILES
+ "zap-generated/access.h"
+ "zap-generated/CHIPClusters.h"
+ "zap-generated/endpoint_config.h"
+ "zap-generated/gen_config.h"
+ "zap-generated/IMClusterCommandHandler.cpp"
+ OUTPUT_PATH APP_TEMPLATES_GEN_DIR
+ OUTPUT_FILES APP_TEMPLATES_GEN_FILES
)
target_include_directories(${APP_TARGET} ${SCOPE} "${APP_TEMPLATES_GEN_DIR}")
add_dependencies(${APP_TARGET} ${APP_TARGET}-zapgen)
@@ -136,8 +139,8 @@
${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp
${CHIP_APP_BASE_DIR}/util/attribute-table.cpp
${CHIP_APP_BASE_DIR}/util/binding-table.cpp
- ${CHIP_APP_BASE_DIR}/icd/IcdMonitoringTable.cpp
- ${CHIP_APP_BASE_DIR}/icd/IcdManagementServer.cpp
+ ${CHIP_APP_BASE_DIR}/icd/ICDMonitoringTable.cpp
+ ${CHIP_APP_BASE_DIR}/icd/ICDManagementServer.cpp
${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp
${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp
${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp
diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni
index 54abef9..550c8fb 100644
--- a/src/app/chip_data_model.gni
+++ b/src/app/chip_data_model.gni
@@ -289,7 +289,7 @@
} else if (cluster == "icd-management-server") {
sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ]
- deps += [ "${chip_root}/src/app/icd:cluster-srcs" ]
+ deps += [ "${chip_root}/src/app/icd:cluster" ]
} else if (cluster == "resource-monitoring-server") {
sources += [
"${_app_root}/clusters/${cluster}/${cluster}.cpp",
diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp
index 10e92c8..be5be9b 100644
--- a/src/app/clusters/icd-management-server/icd-management-server.cpp
+++ b/src/app/clusters/icd-management-server/icd-management-server.cpp
@@ -25,8 +25,8 @@
#include <app/AttributeAccessInterface.h>
#include <app/CommandHandler.h>
#include <app/ConcreteAttributePath.h>
-#include <app/icd/IcdManagementServer.h>
-#include <app/icd/IcdMonitoringTable.h>
+#include <app/icd/ICDManagementServer.h>
+#include <app/icd/ICDMonitoringTable.h>
#include <app/server/Server.h>
#include <app/util/af.h>
#include <app/util/attribute-storage.h>
@@ -89,31 +89,31 @@
CHIP_ERROR IcdManagementAttributeAccess::ReadIdleModeInterval(EndpointId endpoint, AttributeValueEncoder & encoder)
{
- return encoder.Encode(IcdManagementServer::GetInstance().GetIdleModeIntervalSec());
+ return encoder.Encode(ICDManagementServer::GetInstance().GetIdleModeIntervalSec());
}
CHIP_ERROR IcdManagementAttributeAccess::ReadActiveModeInterval(EndpointId endpoint, AttributeValueEncoder & encoder)
{
- return encoder.Encode(IcdManagementServer::GetInstance().GetActiveModeIntervalMs());
+ return encoder.Encode(ICDManagementServer::GetInstance().GetActiveModeIntervalMs());
}
CHIP_ERROR IcdManagementAttributeAccess::ReadActiveModeThreshold(EndpointId endpoint, AttributeValueEncoder & encoder)
{
- return encoder.Encode(IcdManagementServer::GetInstance().GetActiveModeThresholdMs());
+ return encoder.Encode(ICDManagementServer::GetInstance().GetActiveModeThresholdMs());
}
CHIP_ERROR IcdManagementAttributeAccess::ReadRegisteredClients(EndpointId endpoint, AttributeValueEncoder & encoder)
{
- uint16_t supported_clients = IcdManagementServer::GetInstance().GetClientsSupportedPerFabric();
+ uint16_t supported_clients = ICDManagementServer::GetInstance().GetClientsSupportedPerFabric();
return encoder.EncodeList([supported_clients](const auto & subEncoder) -> CHIP_ERROR {
- IcdMonitoringEntry e;
+ ICDMonitoringEntry e;
const auto & fabricTable = Server::GetInstance().GetFabricTable();
for (const auto & fabricInfo : fabricTable)
{
PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage();
- IcdMonitoringTable table(storage, fabricInfo.GetFabricIndex(), supported_clients);
+ ICDMonitoringTable table(storage, fabricInfo.GetFabricIndex(), supported_clients);
for (uint16_t i = 0; i < table.Limit(); ++i)
{
CHIP_ERROR err = table.Get(i, e);
@@ -136,12 +136,12 @@
CHIP_ERROR IcdManagementAttributeAccess::ReadICDCounter(EndpointId endpoint, AttributeValueEncoder & encoder)
{
- return encoder.Encode(IcdManagementServer::GetInstance().GetICDCounter());
+ return encoder.Encode(ICDManagementServer::GetInstance().GetICDCounter());
}
CHIP_ERROR IcdManagementAttributeAccess::ReadClientsSupportedPerFabric(EndpointId endpoint, AttributeValueEncoder & encoder)
{
- return encoder.Encode(IcdManagementServer::GetInstance().GetClientsSupportedPerFabric());
+ return encoder.Encode(ICDManagementServer::GetInstance().GetClientsSupportedPerFabric());
}
CHIP_ERROR CheckAdmin(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, bool & is_admin)
@@ -164,8 +164,8 @@
{
void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override
{
- uint16_t supported_clients = IcdManagementServer::GetInstance().GetClientsSupportedPerFabric();
- IcdMonitoringTable table(chip::Server::GetInstance().GetPersistentStorage(), fabricIndex, supported_clients);
+ uint16_t supported_clients = ICDManagementServer::GetInstance().GetClientsSupportedPerFabric();
+ ICDMonitoringTable table(chip::Server::GetInstance().GetPersistentStorage(), fabricIndex, supported_clients);
table.RemoveAll();
}
};
@@ -194,7 +194,7 @@
{
PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage();
FabricIndex fabric = commandObj->GetAccessingFabricIndex();
- status = IcdManagementServer::GetInstance().RegisterClient(storage, fabric, commandData.checkInNodeID,
+ status = ICDManagementServer::GetInstance().RegisterClient(storage, fabric, commandData.checkInNodeID,
commandData.monitoredSubject, commandData.key,
commandData.verificationKey, is_admin);
}
@@ -203,7 +203,7 @@
{
// Response
IcdManagement::Commands::RegisterClientResponse::Type response{ .ICDCounter =
- IcdManagementServer::GetInstance().GetICDCounter() };
+ ICDManagementServer::GetInstance().GetICDCounter() };
commandObj->AddResponse(commandPath, response);
return true;
}
@@ -227,7 +227,7 @@
{
PersistentStorageDelegate & storage = chip::Server::GetInstance().GetPersistentStorage();
FabricIndex fabric = commandObj->GetAccessingFabricIndex();
- status = IcdManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID,
+ status = ICDManagementServer::GetInstance().UnregisterClient(storage, fabric, commandData.checkInNodeID,
commandData.verificationKey, is_admin);
}
@@ -242,7 +242,7 @@
const chip::app::ConcreteCommandPath & commandPath,
const Commands::StayActiveRequest::DecodableType & commandData)
{
- InteractionModel::Status status = IcdManagementServer::GetInstance().StayActiveRequest(commandObj->GetAccessingFabricIndex());
+ InteractionModel::Status status = ICDManagementServer::GetInstance().StayActiveRequest(commandObj->GetAccessingFabricIndex());
commandObj->AddStatus(commandPath, status);
return true;
diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn
index 1325188..0879e29 100644
--- a/src/app/icd/BUILD.gn
+++ b/src/app/icd/BUILD.gn
@@ -16,7 +16,7 @@
import("icd.gni")
# ICD Server sources and configurations
-source_set("observer-srcs") {
+source_set("observer") {
sources = [ "ICDStateObserver.h" ]
}
@@ -32,28 +32,28 @@
# ICD Manager source-set is broken out of the main source-set to enable unit tests
# All sources and configurations used by the ICDManager need to go in this source-set
-source_set("manager-srcs") {
+source_set("manager") {
sources = [
"ICDManager.cpp",
"ICDManager.h",
]
public_deps = [
- ":cluster-srcs",
+ ":cluster",
":notifier",
- ":observer-srcs",
+ ":observer",
"${chip_root}/src/credentials:credentials",
]
}
# ICD management cluster source-set is broken out of the main source-set to enable unit tests
# All sources and configurations used by the ICD management cluster need to go in this source-set
-source_set("cluster-srcs") {
+source_set("cluster") {
sources = [
- "IcdManagementServer.cpp",
- "IcdManagementServer.h",
- "IcdMonitoringTable.cpp",
- "IcdMonitoringTable.h",
+ "ICDManagementServer.cpp",
+ "ICDManagementServer.h",
+ "ICDMonitoringTable.cpp",
+ "ICDMonitoringTable.h",
]
public_deps = [
diff --git a/src/app/icd/IcdManagementServer.cpp b/src/app/icd/ICDManagementServer.cpp
similarity index 83%
rename from src/app/icd/IcdManagementServer.cpp
rename to src/app/icd/ICDManagementServer.cpp
index 1db9006..c93056f 100644
--- a/src/app/icd/IcdManagementServer.cpp
+++ b/src/app/icd/ICDManagementServer.cpp
@@ -1,21 +1,21 @@
-#include "IcdManagementServer.h"
-#include <app/icd/IcdMonitoringTable.h>
+#include "ICDManagementServer.h"
+#include <app/icd/ICDMonitoringTable.h>
using namespace chip;
using namespace chip::Protocols;
namespace chip {
-IcdManagementServer IcdManagementServer::mInstance;
+ICDManagementServer ICDManagementServer::mInstance;
-Status IcdManagementServer::RegisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
+Status ICDManagementServer::RegisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
uint64_t monitored_subject, chip::ByteSpan key,
Optional<chip::ByteSpan> verification_key, bool is_admin)
{
- IcdMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric());
+ ICDMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric());
// Get current entry, if exists
- IcdMonitoringEntry entry;
+ ICDMonitoringEntry entry;
CHIP_ERROR err = table.Find(node_id, entry);
if (CHIP_NO_ERROR == err)
{
@@ -48,13 +48,13 @@
return InteractionModel::Status::Success;
}
-Status IcdManagementServer::UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
+Status ICDManagementServer::UnregisterClient(PersistentStorageDelegate & storage, FabricIndex fabric_index, chip::NodeId node_id,
Optional<chip::ByteSpan> verificationKey, bool is_admin)
{
- IcdMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric());
+ ICDMonitoringTable table(storage, fabric_index, GetClientsSupportedPerFabric());
// Get current entry, if exists
- IcdMonitoringEntry entry;
+ ICDMonitoringEntry entry;
CHIP_ERROR err = table.Find(node_id, entry);
VerifyOrReturnError(CHIP_ERROR_NOT_FOUND != err, InteractionModel::Status::NotFound);
VerifyOrReturnError(CHIP_NO_ERROR == err, InteractionModel::Status::Failure);
@@ -72,7 +72,7 @@
return InteractionModel::Status::Success;
}
-Status IcdManagementServer::StayActiveRequest(FabricIndex fabric_index)
+Status ICDManagementServer::StayActiveRequest(FabricIndex fabric_index)
{
// TODO: Implementent stay awake logic for end device
return InteractionModel::Status::UnsupportedCommand;
diff --git a/src/app/icd/IcdManagementServer.h b/src/app/icd/ICDManagementServer.h
similarity index 90%
rename from src/app/icd/IcdManagementServer.h
rename to src/app/icd/ICDManagementServer.h
index cab712e..30a3812 100644
--- a/src/app/icd/IcdManagementServer.h
+++ b/src/app/icd/ICDManagementServer.h
@@ -27,7 +27,7 @@
using chip::Protocols::InteractionModel::Status;
-class IcdManagementServer
+class ICDManagementServer
{
public:
uint32_t GetIdleModeIntervalSec() { return mIdleInterval_s; }
@@ -36,9 +36,9 @@
uint16_t GetActiveModeThresholdMs() { return mActiveThreshold_ms; }
- uint32_t GetICDCounter() { return mIcdCounter; }
+ uint32_t GetICDCounter() { return mICDCounter; }
- void SetICDCounter(uint32_t count) { mIcdCounter = count; }
+ void SetICDCounter(uint32_t count) { mICDCounter = count; }
uint16_t GetClientsSupportedPerFabric() { return mFabricClientsSupported; }
@@ -50,12 +50,12 @@
Status StayActiveRequest(FabricIndex fabric_index);
- static IcdManagementServer & GetInstance() { return mInstance; }
+ static ICDManagementServer & GetInstance() { return mInstance; }
private:
- IcdManagementServer() = default;
+ ICDManagementServer() = default;
- static IcdManagementServer mInstance;
+ static ICDManagementServer mInstance;
static_assert((CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL_SEC) <= 64800,
"Spec requires the IdleModeInterval to be equal or inferior to 64800s.");
@@ -73,7 +73,7 @@
"Spec requires the ActiveModeThreshold to be equal or greater to 300ms.");
uint16_t mActiveThreshold_ms = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS;
- uint32_t mIcdCounter = 0;
+ uint32_t mICDCounter = 0;
static_assert((CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC) >= 1,
"Spec requires the minimum of supported clients per fabric be equal or greater to 1.");
diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp
index d46a166..1d7199c 100644
--- a/src/app/icd/ICDManager.cpp
+++ b/src/app/icd/ICDManager.cpp
@@ -18,9 +18,9 @@
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
+#include <app/icd/ICDManagementServer.h>
#include <app/icd/ICDManager.h>
-#include <app/icd/IcdManagementServer.h>
-#include <app/icd/IcdMonitoringTable.h>
+#include <app/icd/ICDMonitoringTable.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/logging/CHIPLogging.h>
#include <platform/ConnectivityManager.h>
@@ -55,10 +55,10 @@
mStateObserver = stateObserver;
VerifyOrDie(ICDNotifier::GetInstance().Subscribe(this) == CHIP_NO_ERROR);
- uint32_t activeModeInterval = IcdManagementServer::GetInstance().GetActiveModeIntervalMs();
+ uint32_t activeModeInterval = ICDManagementServer::GetInstance().GetActiveModeIntervalMs();
VerifyOrDie(kFastPollingInterval.count() < activeModeInterval);
- UpdateIcdMode();
+ UpdateICDMode();
UpdateOperationState(OperationalState::ActiveMode);
}
@@ -86,7 +86,7 @@
return success ? ((featureMap & to_underlying(Feature::kCheckInProtocolSupport)) != 0) : false;
}
-void ICDManager::UpdateIcdMode()
+void ICDManager::UpdateICDMode()
{
assertChipStackLockedByCurrentThread();
@@ -102,7 +102,7 @@
for (const auto & fabricInfo : *mFabricTable)
{
// We only need 1 valid entry to ensure LIT compliance
- IcdMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), 1 /*Table entry limit*/);
+ ICDMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), 1 /*Table entry limit*/);
if (!table.IsEmpty())
{
tempMode = ICDMode::LIT;
@@ -131,9 +131,9 @@
mOperationalState = OperationalState::IdleMode;
// When the active mode interval is 0, we stay in idleMode until a notification brings the icd into active mode
- if (IcdManagementServer::GetInstance().GetActiveModeIntervalMs() > 0)
+ if (ICDManagementServer::GetInstance().GetActiveModeIntervalMs() > 0)
{
- uint32_t idleModeInterval = IcdManagementServer::GetInstance().GetIdleModeIntervalSec();
+ uint32_t idleModeInterval = ICDManagementServer::GetInstance().GetIdleModeIntervalSec();
DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(idleModeInterval), OnIdleModeDone, this);
}
@@ -162,13 +162,13 @@
DeviceLayer::SystemLayer().CancelTimer(OnIdleModeDone, this);
mOperationalState = OperationalState::ActiveMode;
- uint32_t activeModeInterval = IcdManagementServer::GetInstance().GetActiveModeIntervalMs();
+ uint32_t activeModeInterval = ICDManagementServer::GetInstance().GetActiveModeIntervalMs();
if (activeModeInterval == 0 && !mKeepActiveFlags.HasAny())
{
// A Network Activity triggered the active mode and activeModeInterval is 0.
// Stay active for at least Active Mode Threshold.
- activeModeInterval = IcdManagementServer::GetInstance().GetActiveModeThresholdMs();
+ activeModeInterval = ICDManagementServer::GetInstance().GetActiveModeThresholdMs();
}
DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(activeModeInterval), OnActiveModeDone, this);
@@ -187,7 +187,7 @@
}
else
{
- uint16_t activeModeThreshold = IcdManagementServer::GetInstance().GetActiveModeThresholdMs();
+ uint16_t activeModeThreshold = ICDManagementServer::GetInstance().GetActiveModeThresholdMs();
DeviceLayer::SystemLayer().ExtendTimerTo(System::Clock::Timeout(activeModeThreshold), OnActiveModeDone, this);
uint16_t activeModeJitterThreshold =
(activeModeThreshold >= ICD_ACTIVE_TIME_JITTER_MS) ? activeModeThreshold - ICD_ACTIVE_TIME_JITTER_MS : 0;
@@ -219,33 +219,33 @@
void ICDManager::OnIdleModeDone(System::Layer * aLayer, void * appState)
{
- ICDManager * pIcdManager = reinterpret_cast<ICDManager *>(appState);
- pIcdManager->UpdateOperationState(OperationalState::ActiveMode);
+ ICDManager * pICDManager = reinterpret_cast<ICDManager *>(appState);
+ pICDManager->UpdateOperationState(OperationalState::ActiveMode);
// We only reset this flag when idle mode is complete to avoid re-triggering the check when an event brings us back to active,
// which could cause a loop.
- pIcdManager->mTransitionToIdleCalled = false;
+ pICDManager->mTransitionToIdleCalled = false;
}
void ICDManager::OnActiveModeDone(System::Layer * aLayer, void * appState)
{
- ICDManager * pIcdManager = reinterpret_cast<ICDManager *>(appState);
+ ICDManager * pICDManager = reinterpret_cast<ICDManager *>(appState);
// Don't go to idle mode when we have a keep active requirement
- if (!pIcdManager->mKeepActiveFlags.HasAny())
+ if (!pICDManager->mKeepActiveFlags.HasAny())
{
- pIcdManager->UpdateOperationState(OperationalState::IdleMode);
+ pICDManager->UpdateOperationState(OperationalState::IdleMode);
}
}
void ICDManager::OnTransitionToIdle(System::Layer * aLayer, void * appState)
{
- ICDManager * pIcdManager = reinterpret_cast<ICDManager *>(appState);
+ ICDManager * pICDManager = reinterpret_cast<ICDManager *>(appState);
// OnTransitionToIdle will trigger a report message if reporting is needed, which should extend the active mode until the
// ack for the report is received.
- pIcdManager->mTransitionToIdleCalled = true;
- pIcdManager->mStateObserver->OnTransitionToIdle();
+ pICDManager->mTransitionToIdleCalled = true;
+ pICDManager->mStateObserver->OnTransitionToIdle();
}
/* ICDListener functions. */
diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h
index 852a4b4..8eb62d6 100644
--- a/src/app/icd/ICDManager.h
+++ b/src/app/icd/ICDManager.h
@@ -52,7 +52,7 @@
ICDManager() {}
void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, ICDStateObserver * stateObserver);
void Shutdown();
- void UpdateIcdMode();
+ void UpdateICDMode();
void UpdateOperationState(OperationalState state);
void SetKeepActiveModeRequirements(KeepActiveFlags flag, bool state);
bool IsKeepActive() { return mKeepActiveFlags.HasAny(); }
diff --git a/src/app/icd/IcdMonitoringTable.cpp b/src/app/icd/ICDMonitoringTable.cpp
similarity index 80%
rename from src/app/icd/IcdMonitoringTable.cpp
rename to src/app/icd/ICDMonitoringTable.cpp
index ad8cb7d..821cf13 100644
--- a/src/app/icd/IcdMonitoringTable.cpp
+++ b/src/app/icd/ICDMonitoringTable.cpp
@@ -1,4 +1,4 @@
-#include "IcdMonitoringTable.h"
+#include "ICDMonitoringTable.h"
#include <lib/support/CodeUtils.h>
namespace chip {
@@ -10,14 +10,14 @@
kKey = 3,
};
-CHIP_ERROR IcdMonitoringEntry::UpdateKey(StorageKeyName & skey)
+CHIP_ERROR ICDMonitoringEntry::UpdateKey(StorageKeyName & skey)
{
VerifyOrReturnError(kUndefinedFabricIndex != this->fabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX);
- skey = DefaultStorageKeyAllocator::IcdManagementTableEntry(this->fabricIndex, index);
+ skey = DefaultStorageKeyAllocator::ICDManagementTableEntry(this->fabricIndex, index);
return CHIP_NO_ERROR;
}
-CHIP_ERROR IcdMonitoringEntry::Serialize(TLV::TLVWriter & writer) const
+CHIP_ERROR ICDMonitoringEntry::Serialize(TLV::TLVWriter & writer) const
{
TLV::TLVType outer;
ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outer));
@@ -28,7 +28,7 @@
return CHIP_NO_ERROR;
}
-CHIP_ERROR IcdMonitoringEntry::Deserialize(TLV::TLVReader & reader)
+CHIP_ERROR ICDMonitoringEntry::Deserialize(TLV::TLVReader & reader)
{
CHIP_ERROR err = CHIP_NO_ERROR;
@@ -63,14 +63,14 @@
return CHIP_NO_ERROR;
}
-void IcdMonitoringEntry::Clear()
+void ICDMonitoringEntry::Clear()
{
this->checkInNodeID = kUndefinedNodeId;
this->monitoredSubject = kUndefinedNodeId;
this->key = ByteSpan();
}
-CHIP_ERROR IcdMonitoringTable::Get(uint16_t index, IcdMonitoringEntry & entry) const
+CHIP_ERROR ICDMonitoringTable::Get(uint16_t index, ICDMonitoringEntry & entry) const
{
entry.fabricIndex = this->mFabric;
entry.index = index;
@@ -79,7 +79,7 @@
return CHIP_NO_ERROR;
}
-CHIP_ERROR IcdMonitoringTable::Find(NodeId id, IcdMonitoringEntry & entry)
+CHIP_ERROR ICDMonitoringTable::Find(NodeId id, ICDMonitoringEntry & entry)
{
uint16_t index = 0;
while (index < this->Limit())
@@ -94,14 +94,14 @@
return CHIP_ERROR_NOT_FOUND;
}
-CHIP_ERROR IcdMonitoringTable::Set(uint16_t index, const IcdMonitoringEntry & entry)
+CHIP_ERROR ICDMonitoringTable::Set(uint16_t index, const ICDMonitoringEntry & entry)
{
VerifyOrReturnError(index < this->Limit(), CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(kUndefinedNodeId != entry.checkInNodeID, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(kUndefinedNodeId != entry.monitoredSubject, CHIP_ERROR_INVALID_ARGUMENT);
- VerifyOrReturnError(entry.key.size() == IcdMonitoringEntry::kKeyMaxSize, CHIP_ERROR_INVALID_ARGUMENT);
+ VerifyOrReturnError(entry.key.size() == ICDMonitoringEntry::kKeyMaxSize, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(nullptr != entry.key.data(), CHIP_ERROR_INVALID_ARGUMENT);
- IcdMonitoringEntry e(this->mFabric, index);
+ ICDMonitoringEntry e(this->mFabric, index);
e.checkInNodeID = entry.checkInNodeID;
e.monitoredSubject = entry.monitoredSubject;
e.key = entry.key;
@@ -109,15 +109,15 @@
return e.Save(this->mStorage);
}
-CHIP_ERROR IcdMonitoringTable::Remove(uint16_t index)
+CHIP_ERROR ICDMonitoringTable::Remove(uint16_t index)
{
- IcdMonitoringEntry entry(this->mFabric, index);
+ ICDMonitoringEntry entry(this->mFabric, index);
// Shift remaining entries down one position
while (CHIP_NO_ERROR == this->Get(static_cast<uint16_t>(index + 1), entry))
{
// WARNING: The key data is held in the entry's serializing buffer
- IcdMonitoringEntry copy = entry;
+ ICDMonitoringEntry copy = entry;
this->Set(index++, copy);
}
@@ -127,9 +127,9 @@
return entry.Delete(this->mStorage);
}
-CHIP_ERROR IcdMonitoringTable::RemoveAll()
+CHIP_ERROR ICDMonitoringTable::RemoveAll()
{
- IcdMonitoringEntry entry(this->mFabric);
+ ICDMonitoringEntry entry(this->mFabric);
uint16_t index = 0;
while (index < this->Limit())
{
@@ -145,13 +145,13 @@
return CHIP_NO_ERROR;
}
-bool IcdMonitoringTable::IsEmpty()
+bool ICDMonitoringTable::IsEmpty()
{
- IcdMonitoringEntry entry(this->mFabric);
+ ICDMonitoringEntry entry(this->mFabric);
return (this->Get(0, entry) == CHIP_ERROR_NOT_FOUND);
}
-uint16_t IcdMonitoringTable::Limit() const
+uint16_t ICDMonitoringTable::Limit() const
{
return mLimit;
}
diff --git a/src/app/icd/IcdMonitoringTable.h b/src/app/icd/ICDMonitoringTable.h
similarity index 88%
rename from src/app/icd/IcdMonitoringTable.h
rename to src/app/icd/ICDMonitoringTable.h
index 86186ae..de97610 100644
--- a/src/app/icd/IcdMonitoringTable.h
+++ b/src/app/icd/ICDMonitoringTable.h
@@ -25,13 +25,13 @@
namespace chip {
-inline constexpr size_t kIcdMonitoringBufferSize = 40;
+inline constexpr size_t kICDMonitoringBufferSize = 40;
-struct IcdMonitoringEntry : public PersistentData<kIcdMonitoringBufferSize>
+struct ICDMonitoringEntry : public PersistentData<kICDMonitoringBufferSize>
{
static constexpr size_t kKeyMaxSize = 16;
- IcdMonitoringEntry(FabricIndex fabric = kUndefinedFabricIndex, NodeId nodeId = kUndefinedNodeId)
+ ICDMonitoringEntry(FabricIndex fabric = kUndefinedFabricIndex, NodeId nodeId = kUndefinedNodeId)
{
this->fabricIndex = fabric;
this->checkInNodeID = nodeId;
@@ -51,8 +51,8 @@
};
/**
- * @brief IcdMonitoringTable exists to manage the persistence of entries in the IcdManagement Cluster.
- * To access persisted data with the IcdMonitoringTable class, instantiate an instance of this class
+ * @brief ICDMonitoringTable exists to manage the persistence of entries in the IcdManagement Cluster.
+ * To access persisted data with the ICDMonitoringTable class, instantiate an instance of this class
* and call the LoadFromStorage function.
*
* This class can only manage one fabric at a time. The flow is load a fabric, execute necessary operations,
@@ -62,9 +62,9 @@
* https://github.com/project-chip/connectedhomeip/issues/24288
*/
-struct IcdMonitoringTable
+struct ICDMonitoringTable
{
- IcdMonitoringTable(PersistentStorageDelegate & storage, FabricIndex fabric, uint16_t limit) :
+ ICDMonitoringTable(PersistentStorageDelegate & storage, FabricIndex fabric, uint16_t limit) :
mStorage(&storage), mFabric(fabric), mLimit(limit)
{}
@@ -75,7 +75,7 @@
* @return CHIP_NO_ERROR on success,
* CHIP_ERROR_NOT_FOUND if index is greater than the index of the last entry on the table.
*/
- CHIP_ERROR Get(uint16_t index, IcdMonitoringEntry & entry) const;
+ CHIP_ERROR Get(uint16_t index, ICDMonitoringEntry & entry) const;
/**
* @brief Stores the MonitoringRegistrationStruct entry at the given position,
@@ -84,7 +84,7 @@
* @param entry On success, contains the MonitoringRegistrationStruct matching the given index.
* @return CHIP_NO_ERROR on success
*/
- CHIP_ERROR Set(uint16_t index, const IcdMonitoringEntry & entry);
+ CHIP_ERROR Set(uint16_t index, const ICDMonitoringEntry & entry);
/**
* @brief Search the registered clients for an entry on the fabric whose checkInNodeID matches the given id.
@@ -94,7 +94,7 @@
* If CHIP_ERROR_NOT_FOUND is returned, entry.index contains the total number of entries in the table.
* @return CHIP_NO_ERROR if found, CHIP_ERROR_NOT_FOUND if no checkInNodeID matches the provided id.
*/
- CHIP_ERROR Find(NodeId id, IcdMonitoringEntry & entry);
+ CHIP_ERROR Find(NodeId id, ICDMonitoringEntry & entry);
/**
* @brief Removes the MonitoringRegistrationStruct entry at the given position,
diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn
index e56a91a..122e87b 100644
--- a/src/app/tests/BUILD.gn
+++ b/src/app/tests/BUILD.gn
@@ -139,7 +139,7 @@
"TestExtensionFieldSets.cpp",
"TestFabricScopedEventLogging.cpp",
"TestICDManager.cpp",
- "TestIcdMonitoringTable.cpp",
+ "TestICDMonitoringTable.cpp",
"TestInteractionModelEngine.cpp",
"TestMessageDef.cpp",
"TestNumericAttributeTraits.cpp",
@@ -201,7 +201,7 @@
":time-sync-data-provider-test-srcs",
"${chip_root}/src/app",
"${chip_root}/src/app/common:cluster-objects",
- "${chip_root}/src/app/icd:manager-srcs",
+ "${chip_root}/src/app/icd:manager",
"${chip_root}/src/app/tests:helpers",
"${chip_root}/src/app/util/mock:mock_ember",
"${chip_root}/src/lib/core",
diff --git a/src/app/tests/TestICDManager.cpp b/src/app/tests/TestICDManager.cpp
index 5d57be4..76c8cd3 100644
--- a/src/app/tests/TestICDManager.cpp
+++ b/src/app/tests/TestICDManager.cpp
@@ -16,10 +16,10 @@
* limitations under the License.
*/
#include <app/EventManagement.h>
+#include <app/icd/ICDManagementServer.h>
#include <app/icd/ICDManager.h>
#include <app/icd/ICDNotifier.h>
#include <app/icd/ICDStateObserver.h>
-#include <app/icd/IcdManagementServer.h>
#include <app/tests/AppTestContext.h>
#include <lib/support/TestPersistentStorageDelegate.h>
#include <lib/support/TimeUtils.h>
@@ -115,20 +115,20 @@
// After the init we should be in active mode
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
// Active mode interval expired, ICDManager transitioned to the IdleMode.
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode);
- AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(IcdManagementServer::GetInstance().GetIdleModeIntervalSec()) + 1);
+ AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDManagementServer::GetInstance().GetIdleModeIntervalSec()) + 1);
// Idle mode interval expired, ICDManager transitioned to the ActiveMode.
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
// Events updating the Operation to Active mode can extend the current active mode time by 1 Active mode threshold.
// Kick an active Threshold just before the end of the Active interval and validate that the active mode is extended.
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeIntervalMs() - 1);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeIntervalMs() - 1);
ICDNotifier::GetInstance().BroadcastNetworkActivityNotification();
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeThresholdMs() / 2);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeThresholdMs() / 2);
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeThresholdMs());
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeThresholdMs());
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode);
}
@@ -142,7 +142,7 @@
notifier.BroadcastActiveRequestNotification(ActiveFlag::kCommissioningWindowOpen);
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
// Advance time so active mode interval expires.
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
// Requirement flag still set. We stay in active mode
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
@@ -156,12 +156,12 @@
// Advance time, but by less than the active mode interval and remove the requirement.
// We should stay in active mode.
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeIntervalMs() / 2);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeIntervalMs() / 2);
notifier.BroadcastActiveRequestWithdrawal(ActiveFlag::kFailSafeArmed);
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
// Advance time again, The activemode interval is completed.
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode);
// Set two requirements
@@ -169,7 +169,7 @@
notifier.BroadcastActiveRequestNotification(ActiveFlag::kExchangeContextOpen);
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
// advance time so the active mode interval expires.
- AdvanceClockAndRunEventLoop(ctx, IcdManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
+ AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeIntervalMs() + 1);
// A requirement flag is still set. We stay in active mode.
NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode);
diff --git a/src/app/tests/TestIcdMonitoringTable.cpp b/src/app/tests/TestICDMonitoringTable.cpp
similarity index 96%
rename from src/app/tests/TestIcdMonitoringTable.cpp
rename to src/app/tests/TestICDMonitoringTable.cpp
index 5cfdadd..4aca4ff 100644
--- a/src/app/tests/TestIcdMonitoringTable.cpp
+++ b/src/app/tests/TestICDMonitoringTable.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-#include <app/icd/IcdMonitoringTable.h>
+#include <app/icd/ICDMonitoringTable.h>
#include <lib/core/CHIPError.h>
#include <lib/support/DefaultStorageKeyAllocator.h>
#include <lib/support/TestPersistentStorageDelegate.h>
@@ -61,9 +61,9 @@
void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext)
{
TestPersistentStorageDelegate storage;
- IcdMonitoringTable saving(storage, kTestFabricIndex1, kMaxTestClients1);
- IcdMonitoringTable loading(storage, kTestFabricIndex1, kMaxTestClients1);
- IcdMonitoringEntry entry;
+ ICDMonitoringTable saving(storage, kTestFabricIndex1, kMaxTestClients1);
+ ICDMonitoringTable loading(storage, kTestFabricIndex1, kMaxTestClients1);
+ ICDMonitoringEntry entry;
CHIP_ERROR err;
// Insert first entry
@@ -139,8 +139,8 @@
void TestSaveAllInvalidRegistrationValues(nlTestSuite * aSuite, void * aContext)
{
TestPersistentStorageDelegate storage;
- IcdMonitoringTable table(storage, kTestFabricIndex1, kMaxTestClients1);
- IcdMonitoringEntry entry;
+ ICDMonitoringTable table(storage, kTestFabricIndex1, kMaxTestClients1);
+ ICDMonitoringEntry entry;
CHIP_ERROR err;
// Invalid checkInNodeID
@@ -182,9 +182,9 @@
void TestSaveLoadRegistrationValueForMultipleFabrics(nlTestSuite * aSuite, void * aContext)
{
TestPersistentStorageDelegate storage;
- IcdMonitoringTable table1(storage, kTestFabricIndex1, kMaxTestClients1);
- IcdMonitoringTable table2(storage, kTestFabricIndex2, kMaxTestClients2);
- IcdMonitoringEntry entry;
+ ICDMonitoringTable table1(storage, kTestFabricIndex1, kMaxTestClients1);
+ ICDMonitoringTable table2(storage, kTestFabricIndex2, kMaxTestClients2);
+ ICDMonitoringEntry entry;
CHIP_ERROR err;
// Insert in first fabric
@@ -246,9 +246,9 @@
void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context)
{
TestPersistentStorageDelegate storage;
- IcdMonitoringTable table1(storage, kTestFabricIndex1, kMaxTestClients1);
- IcdMonitoringTable table2(storage, kTestFabricIndex2, kMaxTestClients2);
- IcdMonitoringEntry entry;
+ ICDMonitoringTable table1(storage, kTestFabricIndex1, kMaxTestClients1);
+ ICDMonitoringTable table2(storage, kTestFabricIndex2, kMaxTestClients2);
+ ICDMonitoringEntry entry;
CHIP_ERROR err;
// Insert first entry
diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h
index 6715f02..c33e112 100644
--- a/src/lib/support/DefaultStorageKeyAllocator.h
+++ b/src/lib/support/DefaultStorageKeyAllocator.h
@@ -185,7 +185,7 @@
// ICD Management
- static StorageKeyName IcdManagementTableEntry(chip::FabricIndex fabric, uint16_t index)
+ static StorageKeyName ICDManagementTableEntry(chip::FabricIndex fabric, uint16_t index)
{
return StorageKeyName::Formatted("f/%x/icd/%x", fabric, index);
}
diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn
index cd805fb..cd32155 100644
--- a/src/messaging/BUILD.gn
+++ b/src/messaging/BUILD.gn
@@ -79,6 +79,6 @@
]
if (chip_enable_icd_server) {
- public_deps += [ "${chip_root}/src/app/icd:manager-srcs" ]
+ public_deps += [ "${chip_root}/src/app/icd:manager" ]
}
}
diff --git a/src/messaging/ReliableMessageProtocolConfig.cpp b/src/messaging/ReliableMessageProtocolConfig.cpp
index bd1eb2a..652531c 100644
--- a/src/messaging/ReliableMessageProtocolConfig.cpp
+++ b/src/messaging/ReliableMessageProtocolConfig.cpp
@@ -28,8 +28,8 @@
#include <system/SystemClock.h>
#if CHIP_CONFIG_ENABLE_ICD_SERVER
+#include <app/icd/ICDManagementServer.h> // nogncheck
#include <app/icd/ICDManager.h> // nogncheck
-#include <app/icd/IcdManagementServer.h> // nogncheck
#endif
namespace chip {
@@ -75,7 +75,7 @@
// which the device can be at sleep and not be able to receive any messages).
config.mIdleRetransTimeout += app::ICDManager::GetSlowPollingInterval();
config.mActiveRetransTimeout += app::ICDManager::GetFastPollingInterval();
- config.mActiveThresholdTime = System::Clock::Milliseconds16(IcdManagementServer::GetInstance().GetActiveModeThresholdMs());
+ config.mActiveThresholdTime = System::Clock::Milliseconds16(ICDManagementServer::GetInstance().GetActiveModeThresholdMs());
#endif
#if CONFIG_BUILD_FOR_HOST_UNIT_TEST