Scope
|
#include <DisplayController_p.h>
Inherits scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Public Member Functions | |
Impl (SynchronizedQueue< ScopeMessage< SCOPE_MULTIIMAGEPTR_T >> *const _iqueue, const parameters::Scope _parameters) | |
virtual | ~Impl () |
void | StopOne (const uint32_t &_a) override |
void | ResolutionChange (const parameters::Area &_ap) |
void | SetHistogramLimits (const uint32_t &_area, const uint32_t &_channel, const uint16_t &_lower, const uint16_t &_upper) |
void | AttachFrame (gui::CChannelFrame *const _cframe) |
void | DetachFrame (gui::CChannelFrame *const _cframe) |
void | AttachFrame (gui::CHistogramFrame *const _hframe) |
bool | HistogramAlreadyAttached (const uint32_t &_area) const |
void | DetachFrame (gui::CHistogramFrame *const _hframe) |
parameters::WindowCollection | GetWindowCollection () const |
Public Member Functions inherited from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl | |
Impl (const parameters::Scope &_parameters) | |
virtual void | Start (const parameters::Scope &_params) |
virtual void | StopAll () |
virtual ControllerReturnStatus | WaitForOne (const uint32_t &_a, const int32_t &_wait_time) |
virtual ControllerReturnStatus | WaitForAll (const int32_t &_wait_time) |
Protected Member Functions | |
Impl (const Impl &i) | |
Impl | operator= (const Impl &i) |
ControllerReturnStatus | Run (StopCondition *const sc, const uint32_t &_area) override |
void | UpdateStatusInFrames (const RunState &_rs) |
Protected Attributes | |
SynchronizedQueue< ScopeMessage< SCOPE_MULTIIMAGEPTR_T > > *const | input_queue |
ScopeLogger | scope_logger |
std::array< std::vector< gui::CChannelFrame *const >, SCOPE_NAREAS > | channelframes |
std::array< std::mutex, SCOPE_NAREAS > | channelframes_mutexe |
std::array< std::vector< gui::CHistogramFrame *const >, SCOPE_NAREAS > | histogramframes |
std::array< std::mutex, SCOPE_NAREAS > | histogramframes_mutexe |
Protected Attributes inherited from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl | |
std::array< std::shared_future< ControllerReturnStatus >, N_ACTIVES > | futures |
std::array< StopCondition, N_ACTIVES > | stops |
parameters::Scope | parameters |
The implementation class of the DisplayController.
There is only one Run thread (not one for every area since the heavy work is done inside CChannelFrame and CHistogramFrame) This passes images arriving from the PipelineController to attached CChannelFrame and CHistogramFrame were the actual calculations (overlay, histogram) and renderings take place.
Definition at line 19 of file DisplayController_p.h.
|
protected |
disable copy
|
inlineexplicit |
Connects queue and gets parameters.
Definition at line 143 of file DisplayController_p.h.
|
inlinevirtual |
Stops and interrupts thread if necessary.
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 150 of file DisplayController_p.h.
|
inlineoverrideprotectedvirtual |
Main function for managing display.
It is executed asynchronously. The actual overlay creations, histogram calculations, and rendering are done in the Active's threads inside CChannelFrame/View and CHistogramFrame/View. Only one Run thread, so _area parameter here is always 0. We dequeue images from the input queue and distribute to the areas CChannelFrame and CHistogramFrame these belong to.
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 53 of file DisplayController_p.h.
|
inlineprotected |
Calls CChannelFrame::UpdateStatus and CHistogramFrame::UpdateStatus in all attached frames.
Definition at line 130 of file DisplayController_p.h.
|
inlineoverridevirtual |
We need to override here.
The dequeue in Run could block/wait since nothing is in the queue. To stop we put a message with abort tag in, it gets dequeued and we break from the while loop. (In addition we call BaseController::Impl::StopOne which sets the StopCondition to true.
Reimplemented from scope::BaseController< N_ACTIVES, STATIC_PIMPL >::Impl.
Definition at line 159 of file DisplayController_p.h.
|
inline |
Go through all CChannelFrames and request resize to cope with new image size.
[in] | _ap | contains the new x and y resolution of images |
Definition at line 167 of file DisplayController_p.h.
|
inline |
Go through all CChannelFrames of that area and set the histogram limits there.
[in] | _area,_channel | area and channel to set limits |
[in] | _lower,_upper | new lower and upper histogram limits |
Definition at line 177 of file DisplayController_p.h.
|
inline |
Attaches a CChannelFrame as observer to the DisplayController.
[in] | _cframe | pointer to the new CChannelFrame observer |
Definition at line 185 of file DisplayController_p.h.
|
inline |
Detaches a CChannelFrame as observer from the DisplayController.
[in] | _cframe | pointer to the CChannelFrame to detach |
std::exception | if _cframe is not found |
Definition at line 195 of file DisplayController_p.h.
|
inline |
Attaches a CHistogramFrame as observer to the DisplayController.
[in] | _hframe | pointer to the new CHistogramFrame observer |
Definition at line 209 of file DisplayController_p.h.
|
inline |
Definition at line 218 of file DisplayController_p.h.
|
inline |
Detaches a CHistogramFrame as observer from the DisplayController.
[in] | _hframe | pointer to the CHistogramFrame to detach |
std::exception | if _hframe is not found |
Definition at line 226 of file DisplayController_p.h.
|
inline |
Adds frames to a WindowCollection.
Definition at line 239 of file DisplayController_p.h.
|
protected |
Input queue with multi images from the PipelineController.
Definition at line 24 of file DisplayController_p.h.
|
protected |
a ScopeLogger kept handy here
Definition at line 27 of file DisplayController_p.h.
|
protected |
Vector of CChannelFrame observers.
Definition at line 30 of file DisplayController_p.h.
|
mutableprotected |
Mutex to protect access to that vector.
Definition at line 33 of file DisplayController_p.h.
|
protected |
Vector of CHistogramFrame observers.
Definition at line 36 of file DisplayController_p.h.
|
mutableprotected |
Mutex to protect access to that vector.
Definition at line 39 of file DisplayController_p.h.