IDS peak genericC++  v1.4.3
peak::core::System Class Reference

Represents a GenTL System module. More...

#include <peak/system/peak_system.hpp>

Inheritance diagram for peak::core::System:
peak::core::EventSupportingModule peak::core::Module

Public Types

using InterfaceFoundCallback = std::function< void(const std::shared_ptr< InterfaceDescriptor > &foundInterface)>
 
using InterfaceFoundCallbackHandle = InterfaceFoundCallback *
 
using InterfaceLostCallback = std::function< void(const std::string &lostInterfaceId)>
 
using InterfaceLostCallbackHandle = InterfaceLostCallback *
 

Public Member Functions

 System ()=delete
 
 ~System () override
 
 System (const System &other)=delete
 
System & operator= (const System &other)=delete
 
 System (System &&other)=delete
 
System & operator= (System &&other)=delete
 
std::string Key () const
 Returns the unique key. More...
 
RawInformation Info (int32_t infoCommand) const
 Delivers information based on the given GenTL info command. More...
 
std::string ID () const
 Returns the ID. More...
 
std::string DisplayName () const
 Returns the display name. More...
 
std::string VendorName () const
 Returns the vendor name. More...
 
std::string ModelName () const
 Returns the model name. More...
 
std::string Version () const
 Returns the version. More...
 
std::string TLType () const
 Returns the TL (transport layer) type. More...
 
std::string CTIFileName () const
 Returns the file name of the GenTL producer library this system belongs to. More...
 
std::string CTIFullPath () const
 Returns the full path of the GenTL producer library this system belongs to. More...
 
uint32_t GenTLVersionMajor () const
 Returns the GenTL major version of the GenTL producer library this system belongs to. More...
 
uint32_t GenTLVersionMinor () const
 Returns the GenTL minor version of the GenTL producer library this system belongs to. More...
 
peak::core::CharacterEncoding CharacterEncoding () const
 Returns the character encoding of the GenTL producer library this system belongs to. More...
 
void UpdateInterfaces (Timeout timeout_ms)
 Searches for interfaces. More...
 
std::vector< std::shared_ptr< InterfaceDescriptor > > Interfaces () const
 Returns the interface list. More...
 
std::shared_ptr< ProducerLibrary > ParentLibrary () const
 Returns the parent library. More...
 
InterfaceFoundCallbackHandle RegisterInterfaceFoundCallback (const InterfaceFoundCallback &callback)
 Registers a callback for signaling a found interface. More...
 
void UnregisterInterfaceFoundCallback (InterfaceFoundCallbackHandle callbackHandle)
 Unregisters a interface found callback. More...
 
InterfaceLostCallbackHandle RegisterInterfaceLostCallback (const InterfaceLostCallback &callback)
 Registers a callback for signaling a lost interface. More...
 
void UnregisterInterfaceLostCallback (InterfaceLostCallbackHandle callbackHandle)
 Unregisters a interface lost callback. More...
 
- 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. More...
 
- 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. More...
 
std::shared_ptr< class Port > Port () const
 Returns the module's port. More...
 

Additional Inherited Members

Detailed Description

Represents a GenTL System module.

This class allows to query information about the GenTL System module and to enumerate its InterfaceDescriptors, which allow to open the corresponding Interface.

Member Typedef Documentation

◆ InterfaceFoundCallback

using peak::core::System::InterfaceFoundCallback = std::function<void(const std::shared_ptr<InterfaceDescriptor>& foundInterface)>

The type of interface found callbacks.

◆ InterfaceFoundCallbackHandle

The type of interface found callback handles.

◆ InterfaceLostCallback

using peak::core::System::InterfaceLostCallback = std::function<void(const std::string& lostInterfaceId)>

The type of interface lost callbacks.

◆ InterfaceLostCallbackHandle

The type of interface lost callback handles.

Constructor & Destructor Documentation

◆ System() [1/3]

peak::core::System::System ( )
delete

◆ ~System()

peak::core::System::~System ( )
inlineoverride

◆ System() [2/3]

peak::core::System::System ( const System &  other)
delete

◆ System() [3/3]

peak::core::System::System ( System &&  other)
delete

Member Function Documentation

◆ CharacterEncoding()

peak::core::CharacterEncoding peak::core::System::CharacterEncoding ( ) const
inline

Returns the character encoding of the GenTL producer library this system belongs to.

Returns
Character encoding of the GenTL producer library
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ CTIFileName()

std::string peak::core::System::CTIFileName ( ) const
inline

Returns the file name of the GenTL producer library this system belongs to.

Returns
File name of the GenTL producer library
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ CTIFullPath()

std::string peak::core::System::CTIFullPath ( ) const
inline

Returns the full path of the GenTL producer library this system belongs to.

Returns
Full path of the GenTL producer library
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ DisplayName()

std::string peak::core::System::DisplayName ( ) const
inline

Returns the display name.

Returns
Display name
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ GenTLVersionMajor()

uint32_t peak::core::System::GenTLVersionMajor ( ) const
inline

Returns the GenTL major version of the GenTL producer library this system belongs to.

Returns
GenTL major version of the GenTL producer library
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ GenTLVersionMinor()

uint32_t peak::core::System::GenTLVersionMinor ( ) const
inline

Returns the GenTL minor version of the GenTL producer library this system belongs to.

Returns
GenTL minor version of the GenTL producer library
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ ID()

std::string peak::core::System::ID ( ) const
inline

Returns the ID.

Returns
ID
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ Info()

RawInformation peak::core::System::Info ( int32_t  infoCommand) const
inline

Delivers information based on the given GenTL info command.

Parameters
[in]infoCommandThe 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):

auto info = object->Info(GenTL::XX_INFO_XX);
// Cast depending on the delivered data type
if (info.dataType == GenTL::INFO_DATATYPE_UINT64)
{
uint64_t uint64Var = *reinterpret_cast<const uint64_t*>(info.data.data());
// Do something with the information
}
else if (infoDataTypeVar == GenTL::INFO_DATATYPE_INT64)
{
...
}
...
Returns
Raw information according to the passed info command
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ Interfaces()

std::vector< std::shared_ptr< InterfaceDescriptor > > peak::core::System::Interfaces ( ) const
inline

Returns the interface list.

Returns
Interface list
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ Key()

std::string peak::core::System::Key ( ) const
inline

Returns the unique key.

The returned key is unique even across different producer libraries.

Returns
Unique key
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ ModelName()

std::string peak::core::System::ModelName ( ) const
inline

Returns the model name.

Returns
Model name
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ operator=() [1/2]

System& peak::core::System::operator= ( const System &  other)
delete

◆ operator=() [2/2]

System& peak::core::System::operator= ( System &&  other)
delete

◆ ParentLibrary()

std::shared_ptr< ProducerLibrary > peak::core::System::ParentLibrary ( ) const
inline

Returns the parent library.

Returns
Parent library
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterInterfaceFoundCallback()

System::InterfaceFoundCallbackHandle peak::core::System::RegisterInterfaceFoundCallback ( const InterfaceFoundCallback &  callback)
inline

Registers a callback for signaling a found interface.

This function registers a callback which gets called every time a new interface is found. Pass the callback handle returned by this function to UnregisterInterfaceFoundCallback() to unregister the callback.

Parameters
[in]callbackThe callback to call if a new interface is found.
Returns
Callback handle
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ RegisterInterfaceLostCallback()

System::InterfaceLostCallbackHandle peak::core::System::RegisterInterfaceLostCallback ( const InterfaceLostCallback &  callback)
inline

Registers a callback for signaling a lost interface.

This function registers a callback which gets called every time a interface is lost. Pass the callback handle returned by this function to UnregisterInterfaceLostCallback() to unregister the callback.

Parameters
[in]callbackThe callback to call if a interface is lost.
Returns
Callback handle
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ TLType()

std::string peak::core::System::TLType ( ) const
inline

Returns the TL (transport layer) type.

Returns
TL type
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterInterfaceFoundCallback()

void peak::core::System::UnregisterInterfaceFoundCallback ( System::InterfaceFoundCallbackHandle  callbackHandle)
inline

Unregisters a interface found callback.

This function unregisters a interface found callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UnregisterInterfaceLostCallback()

void peak::core::System::UnregisterInterfaceLostCallback ( System::InterfaceLostCallbackHandle  callbackHandle)
inline

Unregisters a interface lost callback.

This function unregisters a interface lost callback by taking its handle.

Parameters
[in]callbackHandleThe handle of the callback to unregister.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ UpdateInterfaces()

void peak::core::System::UpdateInterfaces ( Timeout  timeout_ms)
inline

Searches for interfaces.

This function triggers an update of the internal interface list. The callbacks registered on the system will be triggered if an interface is found or lost.

Parameters
[in]timeout_msThe time to wait for new interfaces 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.
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ VendorName()

std::string peak::core::System::VendorName ( ) const
inline

Returns the vendor name.

Returns
Vendor name
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ Version()

std::string peak::core::System::Version ( ) const
inline

Returns the version.

Returns
Version
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

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