Skip to content

Commit

Permalink
added read handler for TimeSource in AAI
Browse files Browse the repository at this point in the history
  • Loading branch information
fessehaeve committed Apr 12, 2024
1 parent 85b8e13 commit 7b4e84f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,9 @@ CHIP_ERROR TimeSynchronizationAttrAccess::Read(const ConcreteReadAttributePath &
case Granularity::Id: {
return aEncoder.Encode(TimeSynchronizationServer::Instance().GetGranularity());
}
case TimeSource::Id: {
return aEncoder.Encode(TimeSynchronizationServer::Instance().GetTimeSource());
}
case TrustedTimeSource::Id: {
return ReadTrustedTimeSource(aPath.mEndpointId, aEncoder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class TimeSynchronizationServer : public FabricTable::Delegate
CHIP_ERROR SetUTCTime(chip::EndpointId ep, uint64_t utcTime, GranularityEnum granularity, TimeSourceEnum source);
CHIP_ERROR GetLocalTime(chip::EndpointId ep, DataModel::Nullable<uint64_t> & localTime);
GranularityEnum & GetGranularity() { return mGranularity; }
TimeSourceEnum & GetTimeSource() { return mTimeSource; }

void ScheduleDelayedAction(System::Clock::Seconds32 delay, System::TimerCompleteCallback action, void * aAppState);

Expand Down

0 comments on commit 7b4e84f

Please sign in to comment.