eGrabber Reference  24.04.0.8
Public Member Functions | List of all members
EGenTL

GenTL library functions More...

#include <EGenTL.h>

Public Member Functions

 EGenTL (const std::string &path=Internal::getEuresysCtiPath(), bool shared=true)
 Initializes the EGenTL library. More...
 
 EGenTL (const char *path, bool shared=true)
 
 EGenTL (bool shared, const std::string &path=Internal::getEuresysCtiPath())
 
virtual ~EGenTL ()
 
template<typename T >
gcGetInfo (gc::TL_INFO_CMD cmd)
 Retrieves numerical information for the system module. More...
 
Low-level GenTL Port functions
void gcReadPort (gc::PORT_HANDLE ph, uint64_t address, std::vector< char > &data)
 Fills data with data.size bytes from ph 's registers space. More...
 
std::string gcReadPortString (gc::PORT_HANDLE ph, uint64_t address, size_t size)
 Reads up to size bytes from ph 's registers space as a string. More...
 
uint32_t gcReadPort (gc::PORT_HANDLE ph, uint64_t address)
 Reads a single 32-bit value from ph 's registers space. More...
 
void gcWritePort (gc::PORT_HANDLE ph, uint64_t address, const std::vector< char > &data)
 Writes data.size bytes into ph 's registers space. More...
 
void gcReadPortData (gc::PORT_HANDLE ph, uint64_t address, void *data, size_t size)
 Read data from port. More...
 
void gcWritePortData (gc::PORT_HANDLE ph, uint64_t address, const void *data, size_t size)
 Write data to port. More...
 
std::vector< std::string > gcGetPortURL (gc::PORT_HANDLE ph)
 Returns the list of XML description URL for the given port. More...
 
template<typename T >
gcGetPortInfo (gc::PORT_HANDLE ph, gc::PORT_INFO_CMD cmd)
 retrieve numerical information for a port module. More...
 
GenTL Event functions
gc::EVENT_HANDLE gcRegisterEvent (gc::EVENTSRC_HANDLE h, gc::EVENT_TYPE event)
 Returns the handle to a newly registered event. More...
 
void gcUnregisterEvent (gc::EVENTSRC_HANDLE h, gc::EVENT_TYPE event)
 
size_t eventGetData (gc::EVENT_HANDLE eh, void *buffer, size_t size, uint64_t timeout)
 Waits for event to happen for at most timeout ms and returns filled data size. More...
 
void eventsGetData (std::vector< ge::EURESYS_EVENT_GET_DATA_ENTRY > &entries, uint64_t *timeout)
 Waits for multiple events to happen for at most timeout ms. More...
 
template<typename T >
eventGetDataInfo (gc::EVENT_HANDLE eh, const void *buffer, size_t size, gc::EVENT_DATA_INFO_CMD cmd)
 Retrieves numerical information for an event data given in buffer. More...
 
template<typename T >
eventGetInfo (gc::EVENT_HANDLE eh, gc::EVENT_INFO_CMD cmd)
 Retrieves numerical information for an event. More...
 
void eventFlush (gc::EVENT_HANDLE eh)
 Discards all the past occurrences. More...
 
void eventKill (gc::EVENT_HANDLE eh)
 Terminates a pending operation. More...
 
GenTL TL functions
gc::TL_HANDLE tlOpen ()
 
void tlClose (gc::TL_HANDLE tlh)
 
template<typename T >
tlGetInfo (gc::TL_HANDLE tlh, gc::TL_INFO_CMD cmd)
 Retrieves numerical information for the TL module. More...
 
uint32_t tlGetNumInterfaces (gc::TL_HANDLE tlh)
 
std::string tlGetInterfaceID (gc::TL_HANDLE tlh, uint32_t index)
 
template<typename T >
tlGetInterfaceInfo (gc::TL_HANDLE tlh, const std::string &ifID, gc::TL_INFO_CMD cmd)
 Retrieves numerical information for the Interface module identified by its ID. More...
 
gc::IF_HANDLE tlOpenInterface (gc::TL_HANDLE tlh, const std::string &ifID)
 
bool tlUpdateInterfaceList (gc::TL_HANDLE tlh, uint64_t timeout=GENTL_INFINITE)
 Checks whether the list of interface modules has changed. More...
 
GenTL Interface functions
void ifClose (gc::IF_HANDLE ifh)
 
template<typename T >
ifGetInfo (gc::IF_HANDLE ifh, gc::INTERFACE_INFO_CMD cmd)
 Retrieves numerical information for the Interface module. More...
 
uint32_t ifGetNumDevices (gc::IF_HANDLE ifh)
 
std::string ifGetDeviceID (gc::IF_HANDLE ifh, uint32_t index)
 
bool ifUpdateDeviceList (gc::IF_HANDLE ifh, uint64_t timeout=GENTL_INFINITE)
 Checks whether the list of devices has changed. More...
 
template<typename T >
ifGetDeviceInfo (gc::IF_HANDLE ifh, const std::string &devID, gc::INTERFACE_INFO_CMD cmd)
 Retrieves numerical information for the Device module identified by its ID. More...
 
gc::DEV_HANDLE ifOpenDevice (gc::IF_HANDLE ifh, const std::string &devID, gc::DEVICE_ACCESS_FLAGS flags=defaultDeviceOpenFlags)
 
GenTL Device functions
gc::PORT_HANDLE devGetPort (gc::DEV_HANDLE devh)
 
uint32_t devGetNumDataStreams (gc::DEV_HANDLE devh)
 
std::string devGetDataStreamID (gc::DEV_HANDLE devh, uint32_t index)
 
gc::DS_HANDLE devOpenDataStream (gc::DEV_HANDLE devh, const std::string &dsID)
 
void devClose (gc::DEV_HANDLE devh)
 
template<typename T >
devGetInfo (gc::DEV_HANDLE devh, gc::DEVICE_INFO_CMD cmd)
 Retrieves numerical information for the Device module. More...
 
GenTL DataStream functions
gc::BUFFER_HANDLE dsAnnounceBuffer (gc::DS_HANDLE dsh, void *buffer, size_t size, void *userPointer=0)
 Gets the handle of a new DataStream buffer allocated by the user. More...
 
gc::BUFFER_HANDLE dsAllocAndAnnounceBuffer (gc::DS_HANDLE dsh, size_t size, void *userPointer=0)
 Gets the handle of a new DataStream buffer allocated automatically. More...
 
gc::BUFFER_HANDLE dsAnnounceBusBuffer (gc::DS_HANDLE dsh, uint64_t busAddress, size_t size, void *userPointer=0)
 Gets the handle of a new DataStream buffer allocated by the user and addressable on the PCIe bus. More...
 
gc::BUFFER_HANDLE dsAnnounceDeviceBuffer (gc::DS_HANDLE dsh, void *deviceAddress, size_t size, ge::MEMORY_TYPE memoryType, void *userPointer=0)
 Gets the handle of a new DataStream buffer allocated by the user on a device and addressable by dma. More...
 
void dsAllocAndAnnounceBuffers (gc::DS_HANDLE dsh, size_t size, std::vector< gc::BUFFER_HANDLE > &buffers)
 Fills buffers vector with buffers.size handles to newly allocated buffers. More...
 
void dsFlushQueue (gc::DS_HANDLE dsh, gc::ACQ_QUEUE_TYPE operation)
 Flushes a buffers pool/queue. More...
 
void dsStartAcquisition (gc::DS_HANDLE dsh, gc::ACQ_START_FLAGS flags=gc::ACQ_START_FLAGS_DEFAULT, uint64_t count=GENTL_INFINITE)
 Declares the DataStream ready for acquisition. More...
 
void dsStopAcquisition (gc::DS_HANDLE dsh, gc::ACQ_STOP_FLAGS flags=gc::ACQ_STOP_FLAGS_DEFAULT)
 Declares the DataStream as done with acquisition. More...
 
void dsClose (gc::DS_HANDLE dsh)
 
template<typename T >
dsGetInfo (gc::DS_HANDLE dsh, gc::STREAM_INFO_CMD cmd)
 Retrieves numerical information for the DataStream module. More...
 
gc::BUFFER_HANDLE dsGetBufferID (gc::DS_HANDLE dsh, uint32_t index)
 
void dsRevokeBuffer (gc::DS_HANDLE dsh, gc::BUFFER_HANDLE bh, void **buffer=0, void **userPointer=0)
 
void dsRevokeBuffers (gc::DS_HANDLE dsh, std::vector< gc::BUFFER_HANDLE > &buffers)
 Revokes the buffers contained in the buffers vector. More...
 
void dsQueueBuffer (gc::DS_HANDLE dsh, gc::BUFFER_HANDLE bh)
 Adds a buffer to the input buffer queue. More...
 
void dsQueueBuffers (gc::DS_HANDLE dsh, const std::vector< gc::BUFFER_HANDLE > &buffers)
 Adds the buffers contained in the buffers vector to the input buffer queue. More...
 
template<typename T >
dsGetBufferInfo (gc::DS_HANDLE dsh, gc::BUFFER_HANDLE bh, gc::BUFFER_INFO_CMD cmd)
 Retrieves numerical information for a buffer. More...
 
BufferInfo dsGetBufferInfo (gc::DS_HANDLE dsh, gc::BUFFER_HANDLE bh)
 Retrieves useful buffer information in one operation. More...
 
uint32_t dsGetNumBufferParts (gc::DS_HANDLE dsh, gc::BUFFER_HANDLE bh)
 
template<typename T >
dsGetBufferPartInfo (gc::DS_HANDLE dsh, gc::BUFFER_HANDLE bh, uint32_t index, gc::BUFFER_PART_INFO_CMD cmd)
 Retrieves numerical information for a buffer part. More...
 
uint32_t gcGetNumPortURLs (gc::PORT_HANDLE h)
 
template<typename T >
gcGetPortURLInfo (gc::PORT_HANDLE h, uint32_t index, gc::URL_INFO_CMD cmd)
 
void gcReadPortStacked (gc::PORT_HANDLE h, std::vector< gc::PORT_REGISTER_STACK_ENTRY > &entries)
 Reads a number of bytes from the given address on the specified port for every element in the entries vector. More...
 
void gcWritePortStacked (gc::PORT_HANDLE h, std::vector< gc::PORT_REGISTER_STACK_ENTRY > &entries)
 Writes a number of bytes to the given address on the specified port for every element in the entries vector. More...
 
gc::TL_HANDLE ifGetParent (gc::IF_HANDLE ifh)
 
gc::IF_HANDLE devGetParent (gc::DEV_HANDLE devh)
 
gc::DEV_HANDLE dsGetParent (gc::DS_HANDLE dsh)
 
Euresys Memento functions
void memento (const std::string &text)
 Reports a string to the memento logging system. More...
 
void memento (unsigned char verbosity, unsigned char kind, const std::string &text)
 
void mementoWaveUp (unsigned char kind, unsigned char id)
 Injects a user analyzer event UP into the memento logging system with a "+1" semantic on the user wave form of the analyzer event specified by id. More...
 
void mementoWaveDown (unsigned char kind, unsigned char id)
 Injects a user analyzer event DOWN into the memento logging system with a "-1" semantic on the user wave form of the analyzer event specified by id. More...
 
void mementoWaveReset (unsigned char kind, unsigned char id)
 Injects a user analyzer event RESET into the memento logging system with a "reset to 0" semantic on the user wave form of the analyzer event specified by id. More...
 
void mementoWaveValue (unsigned char kind, unsigned char id, uint64_t value)
 Injects a user analyzer event VALUE into the memento logging system with a "set to value" semantic on the user wave form of the analyzer event specified by id. More...
 
void mementoWaveNoValue (unsigned char kind, unsigned char id)
 Injects a user analyzer event NOVALUE into the memento logging system with a "disable value" semantic on the user wave form of the analyzer event specified by id. More...
 
uint64_t getTimestampUs ()
 
Euresys Genapi functions
void genapiSetString (gc::PORT_HANDLE h, const std::string &feature, const std::string &value)
 Updates a feature with string contents. More...
 
std::string genapiGetString (gc::PORT_HANDLE h, const std::string &feature)
 Reads a feature as string. More...
 
void genapiGetStringData (gc::PORT_HANDLE h, const std::string &feature, std::vector< char > &data)
 Reads a feature into a vector, the size of the vector is updated. More...
 
std::vector< std::string > genapiGetStringList (gc::PORT_HANDLE h, const std::string &what)
 Reads a list of strings. More...
 
void genapiSetInteger (gc::PORT_HANDLE h, const std::string &feature, int64_t value)
 Updates a feature with integer value. More...
 
int64_t genapiGetInteger (gc::PORT_HANDLE h, const std::string &feature)
 Reads a feature as an integer. More...
 
int64_t genapiGetIntegerWithDefault (gc::PORT_HANDLE h, const std::string &feature, int64_t defaultValue)
 Reads a feature as an integer. More...
 
void genapiSetFloat (gc::PORT_HANDLE h, const std::string &feature, double value)
 Updates a feature with float value. More...
 
double genapiGetFloat (gc::PORT_HANDLE h, const std::string &feature)
 Reads a feature as a float. More...
 
double genapiGetFloatWithDefault (gc::PORT_HANDLE h, const std::string &feature, double defaultValue)
 Reads a feature as a float. More...
 
void genapiSetRegister (gc::PORT_HANDLE h, const std::string &feature, const void *data, size_t size)
 Update data of a register feature. More...
 
void genapiGetRegister (gc::PORT_HANDLE h, const std::string &feature, void *data, size_t size)
 Read data of a register feature. More...
 
void genapiExecuteCommand (gc::PORT_HANDLE h, const std::string &feature)
 Executes a GenApi command. More...
 
void genapiAttachEvent (gc::PORT_HANDLE h, uint64_t eventId, const void *buffer, size_t size)
 Attach a GenApi event. More...
 
void genapiInvalidate (gc::PORT_HANDLE h, const std::string &feature)
 Invalidate a GenApi feature. More...
 
void genapiRunScript (gc::PORT_HANDLE h, const std::string &script, ge::GENAPI_UI_SCRIPT_CONTEXT *context=0)
 Run a Euresys GenApi script. More...
 
void genapiRunScript (const std::vector< gc::PORT_HANDLE > &handles, const std::string &script, ge::GENAPI_UI_SCRIPT_CONTEXT *context=0)
 Run a Euresys GenApi script. More...
 
void genapiInterruptScript (const std::string &scriptId)
 Interrupt a running Euresys GenApi script. More...
 
Euresys Image functions
unsigned int imageGetPixelFormatValue (const std::string &format, unsigned int ns)
 Get PFNC value from name. More...
 
std::string imageGetPixelFormat (uint64_t format)
 
unsigned int imageGetBytesPerPixel (const std::string &format)
 Get Bytes per pixel. More...
 
unsigned int imageGetBitsPerPixel (const std::string &format)
 Get Bits per pixel. More...
 
void imageConvert (const ge::ImageConvertInput &input, const ge::ImageConvertOutput &output, const ge::ImageConvertROI *roi=0)
 Convert an image. More...
 
void imageSaveToDisk (const ge::ImageConvertInput &input, const std::string &filepath, int64_t index=-1, const ge::ImageSaveToDiskParams *params=0)
 Save an image to disk. More...
 
void * imageGet (ge::ImageId id, size_t *outSize=0)
 Get information of an image. More...
 
void imageRelease (ge::ImageId id)
 Release an image. More...
 
void imagePrepareBuffers (size_t bufferSize, size_t count)
 Preallocate buffers in the pool to improve conversion performance. More...
 
void imageTrimBuffers ()
 Reclaim unused buffers managed by the converter to free memory. More...
 

Detailed Description

GenTL library functions

Exceptions
gentl_erroron return codes other than GenTL::GC_ERR_SUCCESS. The error code can then be found in gentl_error.gc_err .

Constructor & Destructor Documentation

◆ EGenTL() [1/3]

EGenTL ( const std::string &  path = Internal::getEuresysCtiPath(),
bool  shared = true 
)

Initializes the EGenTL library.

  • path: filesystem path to the EGenTL library. The default value relies on the EURESYS_DEFAULT_GENTL_PRODUCER environment variable to select one of the GenTL producers:
    • coaxlink.cti if EURESYS_DEFAULT_GENTL_PRODUCER=coaxlink
    • grablink.cti if EURESYS_DEFAULT_GENTL_PRODUCER=grablink
    • gigelink.cti if EURESYS_DEFAULT_GENTL_PRODUCER=gigelink
  • shared: shared mode allows multiple opens of TL/IF/DEV/DS handles. When shared is false, EGenTL behaves as specified in the GenTL standard, i.e. opening an already opened TL, interface, or device will throw a gentl_error (GenTL::GC_ERR_RESOURCE_IN_USE).

◆ EGenTL() [2/3]

EGenTL ( const char *  path,
bool  shared = true 
)

◆ EGenTL() [3/3]

EGenTL ( bool  shared,
const std::string &  path = Internal::getEuresysCtiPath() 
)

◆ ~EGenTL()

virtual ~EGenTL ( )
virtual

Member Function Documentation

◆ gcGetInfo()

T gcGetInfo ( gc::TL_INFO_CMD  cmd)

Retrieves numerical information for the system module.

See GenTL::TL_INFO_CMD_LIST for allowed cmd values.

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ gcReadPort() [1/2]

void gcReadPort ( gc::PORT_HANDLE  ph,
uint64_t  address,
std::vector< char > &  data 
)

Fills data with data.size bytes from ph 's registers space.

values at [address .. address+data.size[ will be read.

Exceptions
unexpected_data_sizeif the vector couldn't be filled.

◆ gcReadPortString()

std::string gcReadPortString ( gc::PORT_HANDLE  ph,
uint64_t  address,
size_t  size 
)

Reads up to size bytes from ph 's registers space as a string.

◆ gcReadPort() [2/2]

uint32_t gcReadPort ( gc::PORT_HANDLE  ph,
uint64_t  address 
)

Reads a single 32-bit value from ph 's registers space.

◆ gcWritePort()

void gcWritePort ( gc::PORT_HANDLE  ph,
uint64_t  address,
const std::vector< char > &  data 
)

Writes data.size bytes into ph 's registers space.

Exceptions
unexpected_data_sizeif some bytes couldn't be sent.

◆ gcReadPortData()

void gcReadPortData ( gc::PORT_HANDLE  ph,
uint64_t  address,
void *  data,
size_t  size 
)

Read data from port.

Exceptions
unexpected_data_sizeif all requested bytes could not be read.

◆ gcWritePortData()

void gcWritePortData ( gc::PORT_HANDLE  ph,
uint64_t  address,
const void *  data,
size_t  size 
)

Write data to port.

Exceptions
unexpected_data_sizeif all given bytes could not be written.

◆ gcGetPortURL()

std::vector<std::string> gcGetPortURL ( gc::PORT_HANDLE  ph)

Returns the list of XML description URL for the given port.

◆ gcGetPortInfo()

T gcGetPortInfo ( gc::PORT_HANDLE  ph,
gc::PORT_INFO_CMD  cmd 
)

retrieve numerical information for a port module.

See GenTL::PORT_INFO_CMD_LIST for allowed cmd values.

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ gcRegisterEvent()

gc::EVENT_HANDLE gcRegisterEvent ( gc::EVENTSRC_HANDLE  h,
gc::EVENT_TYPE  event 
)

Returns the handle to a newly registered event.

◆ gcUnregisterEvent()

void gcUnregisterEvent ( gc::EVENTSRC_HANDLE  h,
gc::EVENT_TYPE  event 
)

◆ eventGetData()

size_t eventGetData ( gc::EVENT_HANDLE  eh,
void *  buffer,
size_t  size,
uint64_t  timeout 
)

Waits for event to happen for at most timeout ms and returns filled data size.

Exceptions
gentl_erroron timeout or termination through eventKill.

◆ eventsGetData()

void eventsGetData ( std::vector< ge::EURESYS_EVENT_GET_DATA_ENTRY > &  entries,
uint64_t *  timeout 
)

Waits for multiple events to happen for at most timeout ms.

Exceptions
gentl_erroron timeout (unless timeout is NULL) or termination through eventKill.
Warning
see documentation of underlying function GenTL::EuresysCustomGenTL::EuresysEventsGetData

◆ eventGetDataInfo()

T eventGetDataInfo ( gc::EVENT_HANDLE  eh,
const void *  buffer,
size_t  size,
gc::EVENT_DATA_INFO_CMD  cmd 
)

Retrieves numerical information for an event data given in buffer.

See GenTL::EVENT_DATA_INFO_CMD_LIST for allowed cmd values.

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ eventGetInfo()

T eventGetInfo ( gc::EVENT_HANDLE  eh,
gc::EVENT_INFO_CMD  cmd 
)

Retrieves numerical information for an event.

See GenTL::EVENT_INFO_CMD_LIST for allowed cmd values.

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ eventFlush()

void eventFlush ( gc::EVENT_HANDLE  eh)

Discards all the past occurrences.

◆ eventKill()

void eventKill ( gc::EVENT_HANDLE  eh)

Terminates a pending operation.

◆ tlOpen()

gc::TL_HANDLE tlOpen ( )

◆ tlClose()

void tlClose ( gc::TL_HANDLE  tlh)

◆ tlGetInfo()

T tlGetInfo ( gc::TL_HANDLE  tlh,
gc::TL_INFO_CMD  cmd 
)

Retrieves numerical information for the TL module.

See GenTL::TL_INFO_CMD_LIST for allowed cmd values

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ tlGetNumInterfaces()

uint32_t tlGetNumInterfaces ( gc::TL_HANDLE  tlh)

◆ tlGetInterfaceID()

std::string tlGetInterfaceID ( gc::TL_HANDLE  tlh,
uint32_t  index 
)

◆ tlGetInterfaceInfo()

T tlGetInterfaceInfo ( gc::TL_HANDLE  tlh,
const std::string &  ifID,
gc::TL_INFO_CMD  cmd 
)

Retrieves numerical information for the Interface module identified by its ID.

See GenTL::INTERFACE_INFO_CMD_LIST for allowed cmd values

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ tlOpenInterface()

gc::IF_HANDLE tlOpenInterface ( gc::TL_HANDLE  tlh,
const std::string &  ifID 
)

◆ tlUpdateInterfaceList()

bool tlUpdateInterfaceList ( gc::TL_HANDLE  tlh,
uint64_t  timeout = GENTL_INFINITE 
)

Checks whether the list of interface modules has changed.

◆ ifClose()

void ifClose ( gc::IF_HANDLE  ifh)

◆ ifGetInfo()

T ifGetInfo ( gc::IF_HANDLE  ifh,
gc::INTERFACE_INFO_CMD  cmd 
)

Retrieves numerical information for the Interface module.

See GenTL::INTERFACE_INFO_CMD_LIST for allowed cmd values

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ ifGetNumDevices()

uint32_t ifGetNumDevices ( gc::IF_HANDLE  ifh)

◆ ifGetDeviceID()

std::string ifGetDeviceID ( gc::IF_HANDLE  ifh,
uint32_t  index 
)

◆ ifUpdateDeviceList()

bool ifUpdateDeviceList ( gc::IF_HANDLE  ifh,
uint64_t  timeout = GENTL_INFINITE 
)

Checks whether the list of devices has changed.

◆ ifGetDeviceInfo()

T ifGetDeviceInfo ( gc::IF_HANDLE  ifh,
const std::string &  devID,
gc::INTERFACE_INFO_CMD  cmd 
)

Retrieves numerical information for the Device module identified by its ID.

See GenTL::DEVICE_INFO_CMD_LIST for allowed cmd values

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ ifOpenDevice()

gc::DEV_HANDLE ifOpenDevice ( gc::IF_HANDLE  ifh,
const std::string &  devID,
gc::DEVICE_ACCESS_FLAGS  flags = defaultDeviceOpenFlags 
)

◆ devGetPort()

gc::PORT_HANDLE devGetPort ( gc::DEV_HANDLE  devh)

◆ devGetNumDataStreams()

uint32_t devGetNumDataStreams ( gc::DEV_HANDLE  devh)

◆ devGetDataStreamID()

std::string devGetDataStreamID ( gc::DEV_HANDLE  devh,
uint32_t  index 
)

◆ devOpenDataStream()

gc::DS_HANDLE devOpenDataStream ( gc::DEV_HANDLE  devh,
const std::string &  dsID 
)

◆ devClose()

void devClose ( gc::DEV_HANDLE  devh)

◆ devGetInfo()

T devGetInfo ( gc::DEV_HANDLE  devh,
gc::DEVICE_INFO_CMD  cmd 
)

Retrieves numerical information for the Device module.

See GenTL::DEVICE_INFO_CMD_LIST for allowed cmd values

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ dsAnnounceBuffer()

gc::BUFFER_HANDLE dsAnnounceBuffer ( gc::DS_HANDLE  dsh,
void *  buffer,
size_t  size,
void *  userPointer = 0 
)

Gets the handle of a new DataStream buffer allocated by the user.

  • buffer: user buffer address
  • size: user buffer size
  • userPointer: pointer to private data (passed to new buffer events)

◆ dsAllocAndAnnounceBuffer()

gc::BUFFER_HANDLE dsAllocAndAnnounceBuffer ( gc::DS_HANDLE  dsh,
size_t  size,
void *  userPointer = 0 
)

Gets the handle of a new DataStream buffer allocated automatically.

  • size: desired buffer size
  • userPointer: pointer to private data (passed to new buffer events)

◆ dsAnnounceBusBuffer()

gc::BUFFER_HANDLE dsAnnounceBusBuffer ( gc::DS_HANDLE  dsh,
uint64_t  busAddress,
size_t  size,
void *  userPointer = 0 
)

Gets the handle of a new DataStream buffer allocated by the user and addressable on the PCIe bus.

  • buffer: bus buffer address
  • size: buffer size
  • userPointer: pointer to private data (passed to new buffer events)

◆ dsAnnounceDeviceBuffer()

gc::BUFFER_HANDLE dsAnnounceDeviceBuffer ( gc::DS_HANDLE  dsh,
void *  deviceAddress,
size_t  size,
ge::MEMORY_TYPE  memoryType,
void *  userPointer = 0 
)

Gets the handle of a new DataStream buffer allocated by the user on a device and addressable by dma.

◆ dsAllocAndAnnounceBuffers()

void dsAllocAndAnnounceBuffers ( gc::DS_HANDLE  dsh,
size_t  size,
std::vector< gc::BUFFER_HANDLE > &  buffers 
)

Fills buffers vector with buffers.size handles to newly allocated buffers.

  • size: desired size for the buffers.

◆ dsFlushQueue()

void dsFlushQueue ( gc::DS_HANDLE  dsh,
gc::ACQ_QUEUE_TYPE  operation 
)

Flushes a buffers pool/queue.

◆ dsStartAcquisition()

void dsStartAcquisition ( gc::DS_HANDLE  dsh,
gc::ACQ_START_FLAGS  flags = gc::ACQ_START_FLAGS_DEFAULT,
uint64_t  count = GENTL_INFINITE 
)

Declares the DataStream ready for acquisition.

does not execute a GenApi StartAcquisition command.

◆ dsStopAcquisition()

void dsStopAcquisition ( gc::DS_HANDLE  dsh,
gc::ACQ_STOP_FLAGS  flags = gc::ACQ_STOP_FLAGS_DEFAULT 
)

Declares the DataStream as done with acquisition.

does not execute a GenApi StopAcquisition command.

◆ dsClose()

void dsClose ( gc::DS_HANDLE  dsh)

◆ dsGetInfo()

T dsGetInfo ( gc::DS_HANDLE  dsh,
gc::STREAM_INFO_CMD  cmd 
)

Retrieves numerical information for the DataStream module.

See GenTL::STREAM_INFO_CMD_LIST for allowed cmd values

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ dsGetBufferID()

gc::BUFFER_HANDLE dsGetBufferID ( gc::DS_HANDLE  dsh,
uint32_t  index 
)

◆ dsRevokeBuffer()

void dsRevokeBuffer ( gc::DS_HANDLE  dsh,
gc::BUFFER_HANDLE  bh,
void **  buffer = 0,
void **  userPointer = 0 
)

◆ dsRevokeBuffers()

void dsRevokeBuffers ( gc::DS_HANDLE  dsh,
std::vector< gc::BUFFER_HANDLE > &  buffers 
)

Revokes the buffers contained in the buffers vector.

◆ dsQueueBuffer()

void dsQueueBuffer ( gc::DS_HANDLE  dsh,
gc::BUFFER_HANDLE  bh 
)

Adds a buffer to the input buffer queue.

◆ dsQueueBuffers()

void dsQueueBuffers ( gc::DS_HANDLE  dsh,
const std::vector< gc::BUFFER_HANDLE > &  buffers 
)

Adds the buffers contained in the buffers vector to the input buffer queue.

◆ dsGetBufferInfo() [1/2]

T dsGetBufferInfo ( gc::DS_HANDLE  dsh,
gc::BUFFER_HANDLE  bh,
gc::BUFFER_INFO_CMD  cmd 
)

Retrieves numerical information for a buffer.

See GenTL::BUFFER_INFO_CMD_LIST for allowed cmd values.

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ dsGetBufferInfo() [2/2]

BufferInfo dsGetBufferInfo ( gc::DS_HANDLE  dsh,
gc::BUFFER_HANDLE  bh 
)

Retrieves useful buffer information in one operation.

◆ dsGetNumBufferParts()

uint32_t dsGetNumBufferParts ( gc::DS_HANDLE  dsh,
gc::BUFFER_HANDLE  bh 
)

◆ dsGetBufferPartInfo()

T dsGetBufferPartInfo ( gc::DS_HANDLE  dsh,
gc::BUFFER_HANDLE  bh,
uint32_t  index,
gc::BUFFER_PART_INFO_CMD  cmd 
)

Retrieves numerical information for a buffer part.

See GenTL::BUFFER_PART_INFO_CMD_LIST for allowed cmd values.

Exceptions
unexpected_data_typeif the size of the argument type T does not match the actual size.

◆ gcGetNumPortURLs()

uint32_t gcGetNumPortURLs ( gc::PORT_HANDLE  h)

◆ gcGetPortURLInfo()

T gcGetPortURLInfo ( gc::PORT_HANDLE  h,
uint32_t  index,
gc::URL_INFO_CMD  cmd 
)

◆ gcReadPortStacked()

void gcReadPortStacked ( gc::PORT_HANDLE  h,
std::vector< gc::PORT_REGISTER_STACK_ENTRY > &  entries 
)

Reads a number of bytes from the given address on the specified port for every element in the entries vector.

Note
If an exception occurs, entries is resized according to the number of successful operations.

◆ gcWritePortStacked()

void gcWritePortStacked ( gc::PORT_HANDLE  h,
std::vector< gc::PORT_REGISTER_STACK_ENTRY > &  entries 
)

Writes a number of bytes to the given address on the specified port for every element in the entries vector.

Note
If an exception occurs, entries is resized according to the number of successful operations.

◆ ifGetParent()

gc::TL_HANDLE ifGetParent ( gc::IF_HANDLE  ifh)

◆ devGetParent()

gc::IF_HANDLE devGetParent ( gc::DEV_HANDLE  devh)

◆ dsGetParent()

gc::DEV_HANDLE dsGetParent ( gc::DS_HANDLE  dsh)

◆ memento() [1/2]

void memento ( const std::string &  text)

Reports a string to the memento logging system.

◆ memento() [2/2]

void memento ( unsigned char  verbosity,
unsigned char  kind,
const std::string &  text 
)

◆ mementoWaveUp()

void mementoWaveUp ( unsigned char  kind,
unsigned char  id 
)

Injects a user analyzer event UP into the memento logging system with a "+1" semantic on the user wave form of the analyzer event specified by id.

◆ mementoWaveDown()

void mementoWaveDown ( unsigned char  kind,
unsigned char  id 
)

Injects a user analyzer event DOWN into the memento logging system with a "-1" semantic on the user wave form of the analyzer event specified by id.

◆ mementoWaveReset()

void mementoWaveReset ( unsigned char  kind,
unsigned char  id 
)

Injects a user analyzer event RESET into the memento logging system with a "reset to 0" semantic on the user wave form of the analyzer event specified by id.

◆ mementoWaveValue()

void mementoWaveValue ( unsigned char  kind,
unsigned char  id,
uint64_t  value 
)

Injects a user analyzer event VALUE into the memento logging system with a "set to value" semantic on the user wave form of the analyzer event specified by id.

◆ mementoWaveNoValue()

void mementoWaveNoValue ( unsigned char  kind,
unsigned char  id 
)

Injects a user analyzer event NOVALUE into the memento logging system with a "disable value" semantic on the user wave form of the analyzer event specified by id.

◆ getTimestampUs()

uint64_t getTimestampUs ( )

◆ genapiSetString()

void genapiSetString ( gc::PORT_HANDLE  h,
const std::string &  feature,
const std::string &  value 
)

Updates a feature with string contents.

See also
Euresys::action
Exceptions
gentl_errorif feature is missing or read-only.

◆ genapiGetString()

std::string genapiGetString ( gc::PORT_HANDLE  h,
const std::string &  feature 
)

Reads a feature as string.

Exceptions
gentl_errorif feature is missing.
Note
when an integer or a float feature is accessed, optional suffixes (as documented in genapiGetInteger and genapiGetFloat) can be used
See also
Euresys::query

◆ genapiGetStringData()

void genapiGetStringData ( gc::PORT_HANDLE  h,
const std::string &  feature,
std::vector< char > &  data 
)

Reads a feature into a vector, the size of the vector is updated.

Exceptions
gentl_errorif feature is missing.
Note
if the vector is not empty, the read operation is tried on the available vector buffer; if the buffer is too small, the data size is queried and the vector size is updated accordingly before retrying the read operation
when an integer or a float feature is accessed, optional suffixes (as documented in genapiGetInteger and genapiGetFloat) can be used
See also
Euresys::query

◆ genapiGetStringList()

std::vector<std::string> genapiGetStringList ( gc::PORT_HANDLE  h,
const std::string &  what 
)

Reads a list of strings.

Exceptions
gentl_errorif an error occurs.
See also
Euresys::query

◆ genapiSetInteger()

void genapiSetInteger ( gc::PORT_HANDLE  h,
const std::string &  feature,
int64_t  value 
)

Updates a feature with integer value.

Exceptions
gentl_errorif feature is missing or read-only.

◆ genapiGetInteger()

int64_t genapiGetInteger ( gc::PORT_HANDLE  h,
const std::string &  feature 
)

Reads a feature as an integer.

Parameters
hport handle
featurename of feature to read with or without one of the following suffixes:
  • .Min: to read the minimum of the feature
  • .Max: to read the maximum of the feature
  • .Inc: to read the increment of the feature
  • .Value: to read the value of the feature (same as without .Value suffix)
Exceptions
gentl_errorif feature is missing.

Examples:

  • genapiGetInteger(cameraHandle, "Width");
  • genapiGetInteger(deviceHandle, "CxpTriggerMaxResendCount.Max");

◆ genapiGetIntegerWithDefault()

int64_t genapiGetIntegerWithDefault ( gc::PORT_HANDLE  h,
const std::string &  feature,
int64_t  defaultValue 
)

Reads a feature as an integer.

Returns
feature value or defaultValue if feature is missing.

◆ genapiSetFloat()

void genapiSetFloat ( gc::PORT_HANDLE  h,
const std::string &  feature,
double  value 
)

Updates a feature with float value.

Exceptions
gentl_errorif feature is missing or read-only.

◆ genapiGetFloat()

double genapiGetFloat ( gc::PORT_HANDLE  h,
const std::string &  feature 
)

Reads a feature as a float.

Parameters
hport handle
featurename of feature to read with or without one of the following suffixes:
  • .Min: to read the minimum of the feature
  • .Max: to read the maximum of the feature
  • .Inc: to read the increment of the feature (when defined)
  • .Value: to read the value of the feature (same as without .Value suffix)
Exceptions
gentl_errorif feature is missing.

Examples:

  • genapiGetFloat(interfaceHandle, "Temperature");
  • genapiGetFloat(deviceHandle, "CycleMinimumPeriod.Min");

◆ genapiGetFloatWithDefault()

double genapiGetFloatWithDefault ( gc::PORT_HANDLE  h,
const std::string &  feature,
double  defaultValue 
)

Reads a feature as a float.

Returns
feature value or default_value if feature is missing.

◆ genapiSetRegister()

void genapiSetRegister ( gc::PORT_HANDLE  h,
const std::string &  feature,
const void *  data,
size_t  size 
)

Update data of a register feature.

◆ genapiGetRegister()

void genapiGetRegister ( gc::PORT_HANDLE  h,
const std::string &  feature,
void *  data,
size_t  size 
)

Read data of a register feature.

◆ genapiExecuteCommand()

void genapiExecuteCommand ( gc::PORT_HANDLE  h,
const std::string &  feature 
)

Executes a GenApi command.

◆ genapiAttachEvent()

void genapiAttachEvent ( gc::PORT_HANDLE  h,
uint64_t  eventId,
const void *  buffer,
size_t  size 
)

Attach a GenApi event.

◆ genapiInvalidate()

void genapiInvalidate ( gc::PORT_HANDLE  h,
const std::string &  feature 
)

Invalidate a GenApi feature.

◆ genapiRunScript() [1/2]

void genapiRunScript ( gc::PORT_HANDLE  h,
const std::string &  script,
ge::GENAPI_UI_SCRIPT_CONTEXT context = 0 
)

Run a Euresys GenApi script.

◆ genapiRunScript() [2/2]

void genapiRunScript ( const std::vector< gc::PORT_HANDLE > &  handles,
const std::string &  script,
ge::GENAPI_UI_SCRIPT_CONTEXT context = 0 
)

Run a Euresys GenApi script.

◆ genapiInterruptScript()

void genapiInterruptScript ( const std::string &  scriptId)

Interrupt a running Euresys GenApi script.

Precondition
genapiInterruptScript cannot be called from the GenTL::EuresysCustomGenTL::GENAPI_UI_SCRIPT_CONTEXT callback

◆ imageGetPixelFormatValue()

unsigned int imageGetPixelFormatValue ( const std::string &  format,
unsigned int  ns 
)

Get PFNC value from name.

◆ imageGetPixelFormat()

std::string imageGetPixelFormat ( uint64_t  format)

◆ imageGetBytesPerPixel()

unsigned int imageGetBytesPerPixel ( const std::string &  format)

Get Bytes per pixel.

◆ imageGetBitsPerPixel()

unsigned int imageGetBitsPerPixel ( const std::string &  format)

Get Bits per pixel.

◆ imageConvert()

void imageConvert ( const ge::ImageConvertInput input,
const ge::ImageConvertOutput output,
const ge::ImageConvertROI roi = 0 
)

Convert an image.

◆ imageSaveToDisk()

void imageSaveToDisk ( const ge::ImageConvertInput input,
const std::string &  filepath,
int64_t  index = -1,
const ge::ImageSaveToDiskParams params = 0 
)

Save an image to disk.

◆ imageGet()

void* imageGet ( ge::ImageId  id,
size_t *  outSize = 0 
)

Get information of an image.

◆ imageRelease()

void imageRelease ( ge::ImageId  id)

Release an image.

◆ imagePrepareBuffers()

void imagePrepareBuffers ( size_t  bufferSize,
size_t  count 
)

Preallocate buffers in the pool to improve conversion performance.

Parameters
bufferSizesize of the buffers to preallocate in the converter pool
countthe number of buffers to preallocate
Note
this function improves the performance of subsequent image conversions that need one or more buffers of size bufferSize
Warning
a conversion requiring a buffer of a different size (for which there is no preallocated or unused buffer in the pool) will automatically allocate a new buffer prior to applying the conversion

◆ imageTrimBuffers()

void imageTrimBuffers ( )

Reclaim unused buffers managed by the converter to free memory.


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