IDS peak genericC++ v1.10.0
Loading...
Searching...
No Matches
peak::core::Event Class Reference

Encapsulates the GenTL event data functions. More...

#include <peak/event/peak_event.hpp>

Public Member Functions

 Event ()=delete
 
 ~Event ()
 
 Event (const Event &other)=delete
 
Event & operator= (const Event &other)=delete
 
 Event (Event &&other)=delete
 
Event & operator= (Event &&other)=delete
 
RawInformation Info (int32_t infoCommand) const
 Delivers information based on the given GenTL info command.
 
uint64_t ID () const
 Returns the ID.
 
std::vector< uint8_t > Data () const
 Returns the event payload data.
 
EventType Type () const
 Returns the type.
 
std::vector< uint8_t > RawData () const
 Returns the event raw data.
 

Detailed Description

Encapsulates the GenTL event data functions.

Constructor & Destructor Documentation

◆ Event() [1/3]

peak::core::Event::Event ( )
delete

◆ ~Event()

peak::core::Event::~Event ( )
inline

◆ Event() [2/3]

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

◆ Event() [3/3]

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

Member Function Documentation

◆ Data()

std::vector< uint8_t > peak::core::Event::Data ( ) const
inline

Returns the event payload data.

The delivered data depend on the event type.

Returns
Payload data
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ ID()

uint64_t peak::core::Event::ID ( ) const
inline

Returns the ID.

Returns
ID
Since
1.0
Exceptions
InternalErrorExceptionAn internal error has occurred.

◆ Info()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ RawData()

std::vector< uint8_t > peak::core::Event::RawData ( ) const
inline

Returns the event raw data.

The delivered data depend on the underlying transport layer (GEV, USB3, ...) and the event type. (e.g. If the underlying CTI implements GEV and the event is a remote device event, the delivered data will be the event raw data of a GEV event)

Returns
Raw data
Since
1.2

◆ Type()

EventType peak::core::Event::Type ( ) const
inline

Returns the type.

Returns
Type
Since
1.0

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