Class Interface
Defined in File interface.h
Inheritance Relationships
Base Type
public std::enable_shared_from_this< Interface >
Class Documentation
-
class Interface : public std::enable_shared_from_this<Interface>
The interface class encapsulates a Genicam interface.
NOTE: A GenTLException is thrown in case of a severe error.
Public Functions
Constructs an interface class. Interfaces must only be created by the system class.
-
~Interface()
-
std::shared_ptr<System> getParent() const
Returns the pointer to the parent system object.
- Returns:
Pointer to parent system object.
-
const std::string &getID() const
Get the internal ID of this interface.
- Returns:
ID.
-
void 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.
-
void close()
Closes the interface. Each call of open() must be followed by a call to close() at some point in time.
-
std::vector<std::shared_ptr<Device>> getDevices(uint64_t timeout)
Returns the currently available devices on this interface.
NOTE: open() must be called before calling this method.
- Parameters:
timeout – Timeout in ms for discovery of devices. The method without this parameter uses a timeout of 1000 ms.
- Returns:
List of devices.
-
std::shared_ptr<Device> getDevice(const char *devid, uint64_t timeout)
Returns a device with the given device id.
NOTE: open() must be called before calling this method.
- Parameters:
devid – Device ID.
timeout – Timeout in ms for discovery of devices. The method without this parameter uses a timeout of 1000 ms.
- Returns:
Pointer to device or std::nullptr.
-
std::string getDisplayName()
Returns the display name of the interface.
NOTE: At least the parent object must have been opened before calling this method.
- Returns:
Display name.
-
std::string getTLType()
Returns the transport layer type of the interface.
NOTE: At least the parent object must have been opened before calling this method.
- Returns:
Transport layer type.
-
std::shared_ptr<GenApi::CNodeMapRef> 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.
- Returns:
Node map of this object.
-
void *getHandle() const
Get internal interace handle.
- Returns:
Internal handle.