The interface class encapsulates a Genicam interface. More...
#include <interface.h>
Public Member Functions | |
void | close () |
Closes the interface. More... | |
std::shared_ptr< Device > | getDevice (const char *devid) |
Returns a device with the given device id. More... | |
std::vector< std::shared_ptr< Device > > | getDevices () |
Returns the currently available devices on this interface. More... | |
std::string | getDisplayName () |
Returns the display name of the interface. More... | |
void * | getHandle () const |
Get internal interace handle. More... | |
const std::string & | getID () const |
Get the internal ID of this interface. More... | |
std::shared_ptr< GenApi::CNodeMapRef > | getNodeMap () |
Returns the node map of this object. More... | |
std::shared_ptr< System > | getParent () const |
Returns the pointer to the parent system object. More... | |
std::string | getTLType () |
Returns the transport layer type of the interface. More... | |
Interface (const std::shared_ptr< System > &parent, const std::shared_ptr< const GenTLWrapper > &gentl, const char *id) | |
Constructs an interface class. More... | |
void | open () |
Opens the interface for working with it. More... | |
~Interface () | |
Private Member Functions | |
Interface (class Interface &) | |
Interface & | operator= (const Interface &) |
Private Attributes | |
std::shared_ptr< CPort > | cport |
std::vector< std::weak_ptr< Device > > | dlist |
std::shared_ptr< const GenTLWrapper > | gentl |
std::string | id |
void * | ifh |
std::mutex | mtx |
int | n_open |
std::shared_ptr< GenApi::CNodeMapRef > | nodemap |
std::shared_ptr< System > | parent |
The interface class encapsulates a Genicam interface.
NOTE: A GenTLException is thrown in case of a severe error.
Definition at line 54 of file interface.h.
rcg::Interface::Interface | ( | const std::shared_ptr< System > & | parent, |
const std::shared_ptr< const GenTLWrapper > & | gentl, | ||
const char * | id | ||
) |
Constructs an interface class.
Interfaces must only be created by the system class.
Definition at line 48 of file interface.cc.
rcg::Interface::~Interface | ( | ) |
Definition at line 59 of file interface.cc.
|
private |
void rcg::Interface::close | ( | ) |
Closes the interface.
Each call of open() must be followed by a call to close() at some point in time.
Definition at line 100 of file interface.cc.
std::shared_ptr< Device > rcg::Interface::getDevice | ( | const char * | devid | ) |
Returns a device with the given device id.
NOTE: open() must be called before calling this method.
Definition at line 210 of file interface.cc.
std::vector< std::shared_ptr< Device > > rcg::Interface::getDevices | ( | ) |
Returns the currently available devices on this interface.
NOTE: open() must be called before calling this method.
Definition at line 139 of file interface.cc.
std::string rcg::Interface::getDisplayName | ( | ) |
Returns the display name of the interface.
NOTE: At least the parent object must have been opened before calling this method.
Definition at line 279 of file interface.cc.
void * rcg::Interface::getHandle | ( | ) | const |
const std::string & rcg::Interface::getID | ( | ) | const |
std::shared_ptr< GenApi::CNodeMapRef > rcg::Interface::getNodeMap | ( | ) |
Returns the node map of this object.
NOTE: open() must be called before calling this method. The returned pointer remains valid until close() of this object is called.
Definition at line 291 of file interface.cc.
std::shared_ptr< System > rcg::Interface::getParent | ( | ) | const |
Returns the pointer to the parent system object.
Definition at line 68 of file interface.cc.
std::string rcg::Interface::getTLType | ( | ) |
Returns the transport layer type of the interface.
NOTE: At least the parent object must have been opened before calling this method.
Definition at line 285 of file interface.cc.
void rcg::Interface::open | ( | ) |
Opens the interface for working with it.
The interface may be opened multiple times. However, for each open(), the close() method must be called as well.
Definition at line 78 of file interface.cc.
|
private |
Definition at line 173 of file interface.h.
|
private |
Definition at line 176 of file interface.h.
|
private |
Definition at line 165 of file interface.h.
|
private |
Definition at line 166 of file interface.h.
|
private |
Definition at line 171 of file interface.h.
|
private |
Definition at line 168 of file interface.h.
|
private |
Definition at line 170 of file interface.h.
|
private |
Definition at line 174 of file interface.h.
|
private |
Definition at line 164 of file interface.h.