Skip to content

Commit 127a00b

Browse files
committed
Namespace workaround for compilers on other platforms
1 parent 0c395c1 commit 127a00b

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

src/app/clusters/thermostat-server/thermostat-server-atomic.cpp

+17-6
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,11 @@ void ThermostatAttrAccess::RollbackAtomicWrite(CommandHandler * commandObj, cons
594594
SendAtomicResponse(commandObj, commandPath, status, attributeStatuses);
595595
}
596596

597-
} // namespace Thermostat
598-
} // namespace Clusters
599-
} // namespace app
600-
} // namespace chip
597+
void MatterThermostatClusterServerShutdownCallback(EndpointId endpoint)
598+
{
599+
ChipLogProgress(Zcl, "Shutting down thermostat server cluster on endpoint %d", endpoint);
600+
gThermostatAttrAccess.ResetAtomicWrite(endpoint);
601+
}
601602

602603
bool emberAfThermostatClusterAtomicRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
603604
const Clusters::Thermostat::Commands::AtomicRequest::DecodableType & commandData)
@@ -626,8 +627,18 @@ bool emberAfThermostatClusterAtomicRequestCallback(CommandHandler * commandObj,
626627
return false;
627628
}
628629

630+
} // namespace Thermostat
631+
} // namespace Clusters
632+
} // namespace app
633+
} // namespace chip
634+
635+
bool emberAfThermostatClusterAtomicRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
636+
const Clusters::Thermostat::Commands::AtomicRequest::DecodableType & commandData)
637+
{
638+
return Thermostat::emberAfThermostatClusterAtomicRequestCallback(commandObj, commandPath, commandData);
639+
}
640+
629641
void MatterThermostatClusterServerShutdownCallback(EndpointId endpoint)
630642
{
631-
ChipLogProgress(Zcl, "Shutting down thermostat server cluster on endpoint %d", endpoint);
632-
gThermostatAttrAccess.ResetAtomicWrite(endpoint);
643+
Thermostat::MatterThermostatClusterServerShutdownCallback(endpoint);
633644
}

src/app/clusters/thermostat-server/thermostat-server-presets.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,14 @@ Status ThermostatAttrAccess::PrecommitPresets(EndpointId endpoint)
526526
return Status::Success;
527527
}
528528

529+
bool emberAfThermostatClusterSetActivePresetRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
530+
const Commands::SetActivePresetRequest::DecodableType & commandData)
531+
{
532+
auto status = gThermostatAttrAccess.SetActivePreset(commandPath.mEndpointId, commandData.presetHandle);
533+
commandObj->AddStatus(commandPath, status);
534+
return true;
535+
}
536+
529537
} // namespace Thermostat
530538
} // namespace Clusters
531539
} // namespace app
@@ -534,7 +542,5 @@ Status ThermostatAttrAccess::PrecommitPresets(EndpointId endpoint)
534542
bool emberAfThermostatClusterSetActivePresetRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
535543
const Commands::SetActivePresetRequest::DecodableType & commandData)
536544
{
537-
auto status = gThermostatAttrAccess.SetActivePreset(commandPath.mEndpointId, commandData.presetHandle);
538-
commandObj->AddStatus(commandPath, status);
539-
return true;
545+
return Thermostat::emberAfThermostatClusterSetActivePresetRequestCallback(commandObj, commandPath, commandData);
540546
}

src/app/clusters/thermostat-server/thermostat-server.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,15 @@ class ThermostatAttrAccess : public chip::app::AttributeAccessInterface, public
206206

207207
friend void TimerExpiredCallback(System::Layer * systemLayer, void * callbackContext);
208208

209-
friend void ::MatterThermostatClusterServerShutdownCallback(EndpointId endpoint);
209+
friend void MatterThermostatClusterServerShutdownCallback(EndpointId endpoint);
210210

211-
friend bool ::emberAfThermostatClusterSetActivePresetRequestCallback(
211+
friend bool emberAfThermostatClusterSetActivePresetRequestCallback(
212212
CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
213213
const Clusters::Thermostat::Commands::SetActivePresetRequest::DecodableType & commandData);
214-
friend bool ::emberAfThermostatClusterAtomicRequestCallback(
215-
CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
216-
const Clusters::Thermostat::Commands::AtomicRequest::DecodableType & commandData);
214+
215+
friend bool
216+
emberAfThermostatClusterAtomicRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
217+
const Clusters::Thermostat::Commands::AtomicRequest::DecodableType & commandData);
217218

218219
struct AtomicWriteSession
219220
{

0 commit comments

Comments
 (0)