@@ -31,12 +31,17 @@ using namespace chip::app::Clusters::EnergyEvse::Attributes;
31
31
using chip::app::LogEvent;
32
32
using chip::Protocols::InteractionModel::Status;
33
33
34
+ namespace chip {
35
+ namespace app {
36
+ namespace Clusters {
37
+ namespace DeviceEnergyManagement {
38
+
34
39
/* *
35
40
* @brief Helper function to get current timestamp in Epoch format
36
41
*
37
42
* @param[out] chipEpoch reference to hold return timestamp. Set to 0 if an error occurs.
38
43
*/
39
- CHIP_ERROR UtilsGetEpochTS (uint32_t & chipEpoch)
44
+ CHIP_ERROR GetEpochTS (uint32_t & chipEpoch)
40
45
{
41
46
chipEpoch = 0 ;
42
47
@@ -78,7 +83,7 @@ CHIP_ERROR UtilsGetEpochTS(uint32_t & chipEpoch)
78
83
* @return bitmap value for day of week
79
84
* Sunday = 0x01, Monday = 0x01 ... Saturday = 0x40 (1<<6)
80
85
*/
81
- uint8_t UtilsGetLocalDayOfWeekFromUnixEpoch (time_t unixEpoch)
86
+ uint8_t GetLocalDayOfWeekFromUnixEpoch (time_t unixEpoch)
82
87
{
83
88
// Define a timezone structure and initialize it to the local timezone
84
89
// This will capture any daylight saving time changes
@@ -100,7 +105,7 @@ uint8_t UtilsGetLocalDayOfWeekFromUnixEpoch(time_t unixEpoch)
100
105
*
101
106
* Sunday = 0x01, Monday = 0x01 ... Saturday = 0x40 (1<<6)
102
107
*/
103
- CHIP_ERROR UtilsGetLocalDayOfWeekNow (uint8_t & dayOfWeekMap)
108
+ CHIP_ERROR GetLocalDayOfWeekNow (uint8_t & dayOfWeekMap)
104
109
{
105
110
chip::System::Clock::Milliseconds64 cTMs;
106
111
CHIP_ERROR err = chip::System::SystemClock ().GetClock_RealTimeMS (cTMs);
@@ -110,7 +115,12 @@ CHIP_ERROR UtilsGetLocalDayOfWeekNow(uint8_t & dayOfWeekMap)
110
115
return err;
111
116
}
112
117
time_t unixEpoch = std::chrono::duration_cast<chip::System::Clock::Seconds32>(cTMs).count ();
113
- dayOfWeekMap = UtilsGetLocalDayOfWeekFromUnixEpoch (unixEpoch);
118
+ dayOfWeekMap = GetLocalDayOfWeekFromUnixEpoch (unixEpoch);
114
119
115
120
return CHIP_NO_ERROR;
116
121
}
122
+
123
+ } // namespace DeviceEnergyManagement
124
+ } // namespace Clusters
125
+ } // namespace app
126
+ } // namespace chip
0 commit comments