![]() |
RDK Documentation (Open Sourced RDK Components)
|
Scheduler class for asynchronous operations. More...
#include <AampScheduler.h>


Public Member Functions | |
| AampScheduler () | |
| AampScheduler Constructor. | |
| AampScheduler (const AampScheduler &)=delete | |
| AampScheduler & | operator= (const AampScheduler &)=delete |
| virtual | ~AampScheduler () |
| AampScheduler Destructor. | |
| int | ScheduleTask (AsyncTaskObj obj) |
| To schedule a task to be executed later. More... | |
| void | RemoveAllTasks () |
| To remove all scheduled tasks and prevent further tasks from scheduling. More... | |
| bool | RemoveTask (int id) |
| To remove a scheduled tasks with ID. More... | |
| void | StartScheduler () |
| To start scheduler thread. More... | |
| void | StopScheduler () |
| To stop scheduler and associated resources. More... | |
| void | SuspendScheduler () |
| To acquire execution lock for synchronisation purposes. More... | |
| void | ResumeScheduler () |
| To release execution lock. More... | |
| void | EnableScheduleTask () |
| To enable scheduler to queue new tasks. More... | |
| void | SetState (PrivAAMPState sstate) |
| To player state to Scheduler. More... | |
| void | SetLogger (AampLogManager *logObj) |
| Set the logger instance for the Scheduler. More... | |
Protected Member Functions | |
| void | ExecuteAsyncTask () |
| Executes scheduled tasks - invoked by thread. More... | |
Protected Attributes | |
| AampLogManager * | mLogObj |
| std::deque< AsyncTaskObj > | mTaskQueue |
| std::mutex | mQMutex |
| std::condition_variable | mQCond |
| bool | mSchedulerRunning |
| std::thread | mSchedulerThread |
| std::mutex | mExMutex |
| std::unique_lock< std::mutex > | mExLock |
| int | mNextTaskId |
| int | mCurrentTaskId |
| bool | mLockOut |
| PrivAAMPState | mState |
Scheduler class for asynchronous operations.
Definition at line 86 of file AampScheduler.h.
| int AampScheduler::ScheduleTask | ( | AsyncTaskObj | obj | ) |
To schedule a task to be executed later.
| [in] | obj | - object to be scheduled |
Definition at line 64 of file AampScheduler.cpp.
| void AampScheduler::RemoveAllTasks | ( | ) |
To remove all scheduled tasks and prevent further tasks from scheduling.
Definition at line 156 of file AampScheduler.cpp.
| bool AampScheduler::RemoveTask | ( | int | id | ) |
To remove a scheduled tasks with ID.
| [in] | id | - ID of task to be removed |
Definition at line 218 of file AampScheduler.cpp.
| void AampScheduler::StartScheduler | ( | ) |
| void AampScheduler::StopScheduler | ( | ) |
To stop scheduler and associated resources.
Definition at line 173 of file AampScheduler.cpp.
| void AampScheduler::SuspendScheduler | ( | ) |
To acquire execution lock for synchronisation purposes.
Definition at line 198 of file AampScheduler.cpp.
| void AampScheduler::ResumeScheduler | ( | ) |
| AampScheduler::EnableScheduleTask | ( | ) |
To enable scheduler to queue new tasks.
Definition at line 245 of file AampScheduler.cpp.
| void AampScheduler::SetState | ( | PrivAAMPState | sstate | ) |
|
inline |
Set the logger instance for the Scheduler.
Definition at line 169 of file AampScheduler.h.
|
protected |
Executes scheduled tasks - invoked by thread.
Definition at line 102 of file AampScheduler.cpp.
|
protected |
Queue for storing scheduled tasks
Definition at line 184 of file AampScheduler.h.
|
protected |
Mutex for accessing mTaskQueue
Definition at line 185 of file AampScheduler.h.
|
protected |
To notify when a task is queued in mTaskQueue
Definition at line 186 of file AampScheduler.h.
|
protected |
Flag denotes if scheduler thread is running
Definition at line 187 of file AampScheduler.h.
|
protected |
Scheduler thread
Definition at line 188 of file AampScheduler.h.
|
protected |
Execution mutex for synchronization
Definition at line 189 of file AampScheduler.h.
|
protected |
Lock to be used by SuspendScheduler and ResumeScheduler
Definition at line 190 of file AampScheduler.h.
|
protected |
counter that holds ID value of next task to be scheduled
Definition at line 191 of file AampScheduler.h.
|
protected |
ID of current executed task
Definition at line 192 of file AampScheduler.h.
|
protected |
flag indicates if the queue is locked out or not
Definition at line 193 of file AampScheduler.h.
|
protected |
Player State
Definition at line 194 of file AampScheduler.h.