IDS peak genericC++  v1.7.2
peak::core::InterfaceDescriptor Class Reference

Encapsulates the GenTL functions associated with a GenTL Interface module's ID. More...

#include <peak/interface/peak_interface_descriptor.hpp>

Inheritance diagram for peak::core::InterfaceDescriptor:
peak::core::ModuleDescriptor

Public Member Functions

 InterfaceDescriptor ()=delete
 
 ~InterfaceDescriptor () override=default
 
 InterfaceDescriptor (const InterfaceDescriptor &other)=delete
 
InterfaceDescriptor & operator= (const InterfaceDescriptor &other)=delete
 
 InterfaceDescriptor (InterfaceDescriptor &&other)=delete
 
InterfaceDescriptor & operator= (InterfaceDescriptor &&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 DisplayName () const
 Returns the display name. More...
 
std::string TLType () const
 Returns the TL (transport layer) type. More...
 
std::shared_ptr< System > ParentSystem () const
 Returns the parent system. More...
 
std::shared_ptr< Interface > OpenInterface ()
 Opens the interface. More...
 
std::shared_ptr< Interface > OpenedInterface () const
 Returns the Interface that was opened with this InterfaceDescriptor. More...
 
- Public Member Functions inherited from peak::core::ModuleDescriptor
 ModuleDescriptor ()=default
 
virtual ~ModuleDescriptor ()=default
 
 ModuleDescriptor (const ModuleDescriptor &other)=delete
 
ModuleDescriptor & operator= (const ModuleDescriptor &other)=delete
 
 ModuleDescriptor (ModuleDescriptor &&other)=delete
 
ModuleDescriptor & operator= (ModuleDescriptor &&other)=delete
 
std::string ID () const
 Returns the ID of the described module. More...
 

Additional Inherited Members

Detailed Description

Encapsulates the GenTL functions associated with a GenTL Interface module's ID.

This class allows to query information about a GenTL Interface module without opening it. Furthermore, it allows to open the corresponding Interface module.

Constructor & Destructor Documentation

◆ InterfaceDescriptor() [1/3]

peak::core::InterfaceDescriptor::InterfaceDescriptor ( )
delete

◆ ~InterfaceDescriptor()

peak::core::InterfaceDescriptor::~InterfaceDescriptor ( )
overridedefault

◆ InterfaceDescriptor() [2/3]

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

◆ InterfaceDescriptor() [3/3]

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

Member Function Documentation

◆ DisplayName()

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

Returns the display name.

Returns
Display name
Since
1.0
Exceptions
NotFoundExceptionInterface could not be found.
InternalErrorExceptionAn internal error has occurred.

◆ Info()

RawInformation peak::core::InterfaceDescriptor::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.

◆ Key()

std::string peak::core::InterfaceDescriptor::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.

◆ OpenedInterface()

std::shared_ptr< Interface > peak::core::InterfaceDescriptor::OpenedInterface ( ) const
inline

Returns the Interface that was opened with this InterfaceDescriptor.

Returns
Opened Interface
Since
1.0
Exceptions
BadAccessExceptionInterface is not open

◆ OpenInterface()

std::shared_ptr< Interface > peak::core::InterfaceDescriptor::OpenInterface ( )
inline

Opens the interface.

Returns
Opened interface
Since
1.0
Exceptions
BadAccessExceptionAccess denied
InternalErrorExceptionAn internal error has occurred.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ ParentSystem()

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

Returns the parent system.

Returns
Parent system
Since
1.0
Exceptions
NotFoundExceptionInterface could not be found.
InternalErrorExceptionAn internal error has occurred.

◆ TLType()

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

Returns the TL (transport layer) type.

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

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