Skip to content

Commit

Permalink
add event scheduler file
Browse files Browse the repository at this point in the history
  • Loading branch information
yyzhong-g committed Dec 12, 2024
1 parent 5cc696c commit f44a7a4
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/app/EventScheduler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
*
* Copyright (c) 2024 Project CHIP Authors
* All rights reserved.
*
* 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
*
* 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.
*/

/**
* @file
*
* @brief
* Define EventScheduler interface. Event scheduler is used by EventManagement to notify that events are ready to be scheduled.
* Usually this is implemented by the Reporting Engine to find the proper ReadHandlers and deliver the events.
*
*/
#pragma once

#include <app/ConcreteEventPath.h>

namespace chip {
namespace app {

class EventScheduler
{
public:
virtual ~EventScheduler() = default;

/**
* @brief
* Schedule the event delivery
*
* @param[in] aPath The path to the event.
* @param[in] aBytesWritten Bytes that the event is written into the buffer in EventManagement.
*/
CHIP_ERROR virtual ScheduleEventDelivery(ConcreteEventPath & aPath, uint32_t aBytesWritten) = 0;
};

} // namespace app
} // namespace chip

0 comments on commit f44a7a4

Please sign in to comment.