IDS peak AFL v1.4.0
Loading...
Searching...
No Matches
Manager Class Reference

#include <peak_afl/peak_afl.hpp>

Public Member Functions

 Manager (const std::shared_ptr< peak::core::NodeMap > &node_map)
 Create an automanager instance.
 
 ~Manager ()
 Destructor of an automanager instance.
 
void AddController (const std::shared_ptr< Controller > &controller)
 Add a controller to an automanager.
 
void RemoveController (const std::shared_ptr< Controller > &controller)
 Remove a controller from an automanager.
 
void Process (const peak::ipl::Image &image) const
 Process an image.
 
PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > CreateController (peak_afl_controllerType type)
 Create a controller and append it to Manager.
 
void DestroyAllController ()
 Destroy all controllers for a manager.
 
void DestroyController (const std::shared_ptr< Controller > &controller)
 Destroy a controller.
 
void SetGainIPL (const peak::ipl::Gain &gain)
 Sets the ipl gain.
 
PEAK_AFL_NO_DISCARD bool Status () const
 Get the status of a manager.
 
PEAK_AFL_NO_DISCARD std::vector< std::shared_ptr< Controller > > ControllerList () const
 Get the list of the controller associated with the manager.
 
PEAK_AFL_NO_DISCARD size_t ControllerCount () const
 Get the list count of the controller associated with the manager.
 
PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > GetController (peak_afl_controllerType type) const
 Get the controller for a type.
 

Detailed Description

The autofeature manager

Constructor & Destructor Documentation

◆ Manager()

Manager ( const std::shared_ptr< peak::core::NodeMap > &  node_map)
inlineexplicit

Create an automanager instance.

Creates an automanager instance.

Parameters
[in]node_mapthe shared pointer to the device nodemap
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error

Member Function Documentation

◆ AddController()

void AddController ( const std::shared_ptr< Controller > &  controller)
inline

Add a controller to an automanager.

An autocontroller instance can only be added to one autofeature manager at the same time. The same type can only be added one time.

Parameters
[in]controllershared_ptr to a controller
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error

◆ ControllerCount()

size_t ControllerCount ( ) const
inline

Get the list count of the controller associated with the manager.

Returns
number of controllers in list

◆ ControllerList()

std::vector< std::shared_ptr< Controller > > ControllerList ( ) const
inline

Get the list of the controller associated with the manager.

Returns
controller list

◆ CreateController()

std::shared_ptr< Controller > CreateController ( peak_afl_controllerType  type)
inline

Create a controller and append it to Manager.

Convenience function to create an autofeature controller and add it to the manager. The same type can only be added one time.

Parameters
[in]typecontroller type, see peak_afl_controllerType
Returns
the shared ptr to the created controller
Exceptions
peak::afl::error::Exceptionif deinitialization fails

◆ DestroyAllController()

void DestroyAllController ( )
inline

Destroy all controllers for a manager.

After this operation all controllers associated with the given manager will be invalid.

Exceptions
peak::afl::error::Exceptionif function fails

◆ DestroyController()

void DestroyController ( const std::shared_ptr< Controller > &  controller)
inline

Destroy a controller.

After this operation the controller will be invalid.

Parameters
[in]controllershared ptr to a controller
Exceptions
peak::afl::error::Exceptionif function fails

◆ GetController()

std::shared_ptr< Controller > GetController ( peak_afl_controllerType  type) const
inline

Get the controller for a type.

Parameters
[in]typecontroller type.
Returns
number of controllers in list
Exceptions
peak::afl::error::Exceptionif no controller is found

◆ Process()

void Process ( const peak::ipl::Image &  image) const
inline

Process an image.

Processes an image.

Parameters
[in]imagean peak::ipl::Image image
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error

◆ RemoveController()

void RemoveController ( const std::shared_ptr< Controller > &  controller)
inline

Remove a controller from an automanager.

Remove a controller from a manager. For a function which destroys the object in one call, see peak_afl_AutoFeatureManager_DestroyController.

Parameters
[in]controllershared_ptr to a controller
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error

◆ SetGainIPL()

void SetGainIPL ( const peak::ipl::Gain &  gain)
inline

Sets the ipl gain.

Parameters
[in]gainan peak::ipl::Gain gain
Exceptions
peak::afl::error::Exceptionif function fails

◆ Status()

bool Status ( ) const
inline

Get the status of a manager.

The returned value will contain whether the manager currently processes an image (true) or is idle (false).

Returns
manager status
Exceptions
peak::afl::error::Exceptionif function fails

The documentation for this class was generated from the following file: