![]() |
Signapse
|
#include <SchedulableLink.h>
Public Member Functions | |
void | NextScene (Scene s) |
virtual Scene | ProcessScene (Scene s)=0 |
void | Start () |
void | Stop () |
bool | Available () |
![]() | |
void | RegisterCallback (SceneCallback *scb) |
virtual void | NextScene (Scene next)=0 |
Protected Member Functions | |
void | Enqueue (Scene s) |
void | Run () |
void | NextScene (Scene scene) |
Protected Attributes | |
BlockingQueue< Scene > | scheduleQueue |
bool | isOn = true |
std::thread | scheduleWorker |
![]() | |
SceneCallback * | sceneCallback = nullptr |
A class which extends PipelineLink to handle latency-bound stages. The NextScene function is inherited to add Scenes to an internal BlockingQueue. The pure virtual function ProcessScene must be implemented by derived classes to define Scene processing behaviour. The Run method is called in a separate thread and handles waking up the thread when scenes are available and calling back to the next pipeline element. BlockingQueue is used as a scheduling mechanism for future extension to multithreading.
Definition at line 17 of file SchedulableLink.h.
bool SchedulableLink::Available | ( | ) |
Definition at line 27 of file SchedulableLink.cpp.
|
protected |
Adds a scene to the intenal scheduleQueue
s |
Definition at line 21 of file SchedulableLink.cpp.
|
virtual |
If space is available on the scheduleQueue, add the scene to the queue. Otherwise skip.
scene |
Reimplemented from PipelineLink.
Definition at line 48 of file SchedulableLink.cpp.
Implemented in CNNProcessor.
|
protected |
Looping process to process scenes and call-back to next pipeline element. Worker thread is slept while no elements are available using BlockingQueue functionality
Definition at line 8 of file SchedulableLink.cpp.
void SchedulableLink::Start | ( | ) |
Starts execution with the worker thread.
Definition at line 34 of file SchedulableLink.cpp.
void SchedulableLink::Stop | ( | ) |
Turns off the link, kills worker thread. Must be called to release thread resources.
Definition at line 40 of file SchedulableLink.cpp.
|
protected |
Definition at line 28 of file SchedulableLink.h.
|
protected |
Definition at line 27 of file SchedulableLink.h.
|
protected |
Definition at line 29 of file SchedulableLink.h.