![]() |
IDS peak genericC++ v1.13.0
|
Represents a GenTL Interface module. More...
#include <peak/interface/peak_interface.hpp>
Public Types | |
| using | DeviceFoundCallback = std::function<void(const std::shared_ptr<DeviceDescriptor>& foundDevice)> |
| using | DeviceFoundCallbackHandle = DeviceFoundCallback* |
| using | DeviceDisconnectedCallback = std::function<void(const std::shared_ptr<DeviceDescriptor>& disconnectedDevice)> |
| using | DeviceDisconnectedCallbackHandle = DeviceDisconnectedCallback* |
| using | DeviceReconnectedCallback |
| using | DeviceReconnectedCallbackHandle = DeviceReconnectedCallback* |
| using | DeviceLostCallback = std::function<void(const std::string& lostDeviceId)> |
| using | DeviceLostCallbackHandle = DeviceLostCallback* |
| using | DeviceListChangedCallback = std::function<void()> |
| using | DeviceListChangedCallbackHandle = DeviceListChangedCallback* |
Public Member Functions | |
| Interface ()=delete | |
| ~Interface () override | |
| Interface (const Interface &other)=delete | |
| Interface & | operator= (const Interface &other)=delete |
| Interface (Interface &&other)=delete | |
| Interface & | operator= (Interface &&other)=delete |
| std::string | Key () const |
| Returns the unique key. | |
| RawInformation | Info (int32_t infoCommand) const |
| Delivers information based on the given GenTL info command. | |
| std::string | ID () const |
| Returns the ID. | |
| std::string | DisplayName () const |
| Returns the display name. | |
| std::string | TLType () const |
| Returns the TL (transport layer) type. | |
| void | UpdateDevices (Timeout timeout_ms) |
| Searches for devices. | |
| std::vector< std::shared_ptr< DeviceDescriptor > > | Devices () const |
| Returns the device list. | |
| std::shared_ptr< System > | ParentSystem () const |
| Returns the parent system. | |
| DeviceFoundCallbackHandle | RegisterDeviceFoundCallback (const DeviceFoundCallback &callback) |
| Registers a callback for signaling a found device. | |
| void | UnregisterDeviceFoundCallback (DeviceFoundCallbackHandle callbackHandle) |
| Unregisters a device found callback. | |
| DeviceLostCallbackHandle | RegisterDeviceLostCallback (const DeviceLostCallback &callback) |
| Registers a callback for signaling a lost device. | |
| void | UnregisterDeviceLostCallback (DeviceLostCallbackHandle callbackHandle) |
| Unregisters a device lost callback. | |
| DeviceReconnectedCallbackHandle | RegisterDeviceReconnectedCallback (const DeviceReconnectedCallback &callback) |
| Registers a callback for signaling a reconnected device. | |
| void | UnregisterDeviceReconnectedCallback (DeviceReconnectedCallbackHandle callbackHandle) |
| Unregisters a device reconnected callback. | |
| DeviceDisconnectedCallbackHandle | RegisterDeviceDisconnectedCallback (const DeviceDisconnectedCallback &callback) |
| Registers a callback for signaling a disconnected device. | |
| void | UnregisterDeviceDisconnectedCallback (DeviceDisconnectedCallbackHandle callbackHandle) |
| Unregisters a device disconnected callback. | |
| DeviceListChangedCallbackHandle | RegisterDeviceListChangedCallback (const DeviceListChangedCallback &callback) |
| Registers a callback for signaling a device list changed. | |
| void | UnregisterDeviceListChangedCallback (DeviceListChangedCallbackHandle callbackHandle) |
| Unregisters a device list changed callback. | |
| Public Member Functions inherited from peak::core::EventSupportingModule | |
| EventSupportingModule ()=default | |
| ~EventSupportingModule () override=default | |
| EventSupportingModule (const EventSupportingModule &other)=delete | |
| EventSupportingModule & | operator= (const EventSupportingModule &other)=delete |
| EventSupportingModule (EventSupportingModule &&other)=delete | |
| EventSupportingModule & | operator= (EventSupportingModule &&other)=delete |
| std::unique_ptr< EventController > | EnableEvents (EventType type) |
| Enables events of the given event type. | |
| Public Member Functions inherited from peak::core::Module | |
| Module ()=default | |
| virtual | ~Module ()=default |
| Module (const Module &other)=delete | |
| Module & | operator= (const Module &other)=delete |
| Module (Module &&other)=delete | |
| Module & | operator= (Module &&other)=delete |
| std::vector< std::shared_ptr< NodeMap > > | NodeMaps () const |
| Returns the module's node maps. | |
| std::shared_ptr< class Port > | Port () const |
| Returns the module's port. | |
Represents a GenTL Interface module.
This class allows to query information about a GenTL Interface module and to enumerate its DeviceDescriptors, which allow you to open the corresponding Device.
| using peak::core::Interface::DeviceDisconnectedCallback = std::function<void(const std::shared_ptr<DeviceDescriptor>& disconnectedDevice)> |
The type of device disconnected callbacks.
The type of device disconnect callback handles.
| using peak::core::Interface::DeviceFoundCallback = std::function<void(const std::shared_ptr<DeviceDescriptor>& foundDevice)> |
The type of device found callbacks.
The type of device found callback handles.
| using peak::core::Interface::DeviceListChangedCallback = std::function<void()> |
The type of device list changed callbacks.
The type of device list changed callback handles.
| using peak::core::Interface::DeviceLostCallback = std::function<void(const std::string& lostDeviceId)> |
The type of device lost callbacks.
The type of device lost callback handles.
The type of device reconnected callbacks.
The type of device reconnected callback handles.
|
delete |
|
inlineoverride |
|
delete |
|
delete |
|
inline |
Returns the device list.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the display name.
| NotFoundException | Interface could not be found. |
| InternalErrorException | An internal error has occurred. |
|
inline |
|
inline |
Delivers information based on the given GenTL info command.
| [in] | infoCommand | The GenTL info command. |
This function can be used to query information going beyond the predefined info functions, based on the GenTL info commands of the corresponding module.
Example (error handling is omitted):
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the unique key.
The returned key is unique even across different producer libraries.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the parent system.
| NotFoundException | Interface could not be found. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Registers a callback for signaling a disconnected device.
This function registers a callback which gets called every time a device has beeen disconnected. Pass the callback handle returned by this function to UnregisterDeviceDisconnectedCallback() to unregister the callback.
| [in] | callback | The callback to call if a device has been disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Registers a callback for signaling a found device.
This function registers a callback which gets called every time a new device is found. Pass the callback handle returned by this function to UnregisterDeviceFoundCallback() to unregister the callback.
| [in] | callback | The callback to call if a new device is found. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Registers a callback for signaling a device list changed.
This function registers a callback which gets called every time something changes within the device list. Pass the callback handle returned by this function to UnregisterDeviceDisconnectedCallback() to unregister the callback.
| [in] | callback | The callback to call if a device has been disconnected. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Registers a callback for signaling a lost device.
This function registers a callback which gets called every time a device is lost. Pass the callback handle returned by this function to UnregisterDeviceLostCallback() to unregister the callback.
| [in] | callback | The callback to call if a device is lost. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Registers a callback for signaling a reconnected device.
This function registers a callback which gets called every time a device has beeen reconnected. Pass the callback handle returned by this function to UnregisterDeviceReconnectedCallback() to unregister the callback.
| [in] | callback | The callback to call if a device has been reconnected. |
| NotAvailableException | The reconnect callback is not available in the parent system |
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the TL (transport layer) type.
| InternalErrorException | An internal error has occurred. |
|
inline |
Unregisters a device disconnected callback.
This function unregisters a device disconnected callback by taking its handle.
| [in] | callbackHandle | The handle of the callback to unregister. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Unregisters a device found callback.
This function unregisters a device found callback by taking its handle.
| [in] | callbackHandle | The handle of the callback to unregister. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Unregisters a device list changed callback.
This function unregisters a device list changed callback by taking its handle.
| [in] | callbackHandle | The handle of the callback to unregister. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Unregisters a device lost callback.
This function unregisters a device lost callback by taking its handle.
| [in] | callbackHandle | The handle of the callback to unregister. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Unregisters a device reconnected callback.
This function unregisters a device reconnected callback by taking its handle.
| [in] | callbackHandle | The handle of the callback to unregister. |
| InternalErrorException | An internal error has occurred. |
|
inline |
Searches for devices.
This function triggers an update of the internal device list. The callbacks registered on the interface will be triggered if an device is found or lost.
| [in] | timeout_ms | The time to wait for new devices in milliseconds. In any case the GenTL Producer must make sure that this operation is completed in a reasonable amount of time depending on the underlying technology. |
| InternalErrorException | An internal error has occurred. |