Skip to content

Commit

Permalink
Use MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER
Browse files Browse the repository at this point in the history
Use MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER to enable TagList for
refrigerator since
MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER
could be used by oven
  • Loading branch information
erwinpan1 committed Oct 2, 2024
1 parent cd8ca45 commit 68ddbf0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/chef/common/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ using namespace chip::app::Clusters;

#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER
#include "refrigerator-and-temperature-controlled-cabinet-mode/tcc-mode.h"
#endif // MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER

#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER
namespace {

// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces
Expand All @@ -50,7 +52,7 @@ const Clusters::Descriptor::Structs::SemanticTagStruct::Type refrigeratorTagList
const Clusters::Descriptor::Structs::SemanticTagStruct::Type freezerTagList[] = { { .namespaceID = kNamespaceRefrigerator,
.tag = kTagFreezer } };
} // namespace
#endif
#endif // MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER

#ifdef MATTER_DM_PLUGIN_RVC_OPERATIONAL_STATE_SERVER
#include "chef-rvc-operational-state-delegate.h"
Expand Down Expand Up @@ -318,7 +320,7 @@ void ApplicationInit()
{
ChipLogProgress(NotSpecified, "Chef Application Init !!!")

#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER
#ifdef MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER
// set Parent Endpoint and Composition Type for an Endpoint
EndpointId kRefEndpointId = 1;
EndpointId kColdCabinetEndpointId = 2;
Expand All @@ -329,7 +331,7 @@ void ApplicationInit()
// set TagList
SetTagList(kColdCabinetEndpointId, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(refrigeratorTagList));
SetTagList(kFreezeCabinetEndpointId, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(freezerTagList));
#endif // MATTER_DM_PLUGIN_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_SERVER
#endif // MATTER_DM_PLUGIN_REFRIGERATOR_ALARM_SERVER
}

void ApplicationShutdown()
Expand Down

0 comments on commit 68ddbf0

Please sign in to comment.