eGrabber Reference
24.04.0.8
|
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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 > | |
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... | |
gentl_error | on return codes other than GenTL::GC_ERR_SUCCESS. The error code can then be found in gentl_error.gc_err . |
EGenTL | ( | const std::string & | path = Internal::getEuresysCtiPath() , |
bool | shared = true |
||
) |
Initializes the EGenTL library.
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
EGenTL | ( | const char * | path, |
bool | shared = true |
||
) |
EGenTL | ( | bool | shared, |
const std::string & | path = Internal::getEuresysCtiPath() |
||
) |
|
virtual |
T gcGetInfo | ( | gc::TL_INFO_CMD | cmd | ) |
Retrieves numerical information for the system module.
See GenTL::TL_INFO_CMD_LIST for allowed cmd
values.
unexpected_data_type | if the size of the argument type T does not match the actual size. |
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.
unexpected_data_size | if the vector couldn't be filled. |
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.
uint32_t gcReadPort | ( | gc::PORT_HANDLE | ph, |
uint64_t | address | ||
) |
Reads a single 32-bit value from ph
's registers space.
void gcWritePort | ( | gc::PORT_HANDLE | ph, |
uint64_t | address, | ||
const std::vector< char > & | data | ||
) |
Writes data.size
bytes into ph
's registers space.
unexpected_data_size | if some bytes couldn't be sent. |
void gcReadPortData | ( | gc::PORT_HANDLE | ph, |
uint64_t | address, | ||
void * | data, | ||
size_t | size | ||
) |
Read data from port.
unexpected_data_size | if all requested bytes could not be read. |
void gcWritePortData | ( | gc::PORT_HANDLE | ph, |
uint64_t | address, | ||
const void * | data, | ||
size_t | size | ||
) |
Write data to port.
unexpected_data_size | if all given bytes could not be written. |
std::vector<std::string> gcGetPortURL | ( | gc::PORT_HANDLE | ph | ) |
Returns the list of XML description URL for the given port.
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.
unexpected_data_type | if the size of the argument type T does not match the actual size. |
gc::EVENT_HANDLE gcRegisterEvent | ( | gc::EVENTSRC_HANDLE | h, |
gc::EVENT_TYPE | event | ||
) |
Returns the handle to a newly registered event.
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.
gentl_error | on timeout or termination through eventKill. |
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.
gentl_error | on timeout (unless timeout is NULL) or termination through eventKill. |
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.
unexpected_data_type | if the size of the argument type T does not match the actual size. |
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.
unexpected_data_type | if the size of the argument type T does not match the actual size. |
void eventFlush | ( | gc::EVENT_HANDLE | eh | ) |
Discards all the past occurrences.
void eventKill | ( | gc::EVENT_HANDLE | eh | ) |
Terminates a pending operation.
gc::TL_HANDLE tlOpen | ( | ) |
void tlClose | ( | gc::TL_HANDLE | tlh | ) |
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
unexpected_data_type | if the size of the argument type T does not match the actual size. |
uint32_t tlGetNumInterfaces | ( | gc::TL_HANDLE | tlh | ) |
std::string tlGetInterfaceID | ( | gc::TL_HANDLE | tlh, |
uint32_t | index | ||
) |
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
unexpected_data_type | if the size of the argument type T does not match the actual size. |
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.
void ifClose | ( | gc::IF_HANDLE | ifh | ) |
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
unexpected_data_type | if the size of the argument type T does not match the actual size. |
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.
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
unexpected_data_type | if the size of the argument type T does not match the actual size. |
gc::DEV_HANDLE ifOpenDevice | ( | gc::IF_HANDLE | ifh, |
const std::string & | devID, | ||
gc::DEVICE_ACCESS_FLAGS | flags = defaultDeviceOpenFlags |
||
) |
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 | ) |
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
unexpected_data_type | if the size of the argument type T does not match the actual size. |
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.
gc::BUFFER_HANDLE dsAllocAndAnnounceBuffer | ( | gc::DS_HANDLE | dsh, |
size_t | size, | ||
void * | userPointer = 0 |
||
) |
Gets the handle of a new DataStream buffer allocated automatically.
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.
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.
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.
void dsFlushQueue | ( | gc::DS_HANDLE | dsh, |
gc::ACQ_QUEUE_TYPE | operation | ||
) |
Flushes a buffers pool/queue.
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.
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.
void dsClose | ( | gc::DS_HANDLE | dsh | ) |
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
unexpected_data_type | if the size of the argument type T does not match the actual size. |
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.
void dsQueueBuffer | ( | gc::DS_HANDLE | dsh, |
gc::BUFFER_HANDLE | bh | ||
) |
Adds a buffer to the input buffer queue.
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.
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.
unexpected_data_type | if the size of the argument type T does not match the actual size. |
BufferInfo dsGetBufferInfo | ( | gc::DS_HANDLE | dsh, |
gc::BUFFER_HANDLE | bh | ||
) |
Retrieves useful buffer information in one operation.
uint32_t dsGetNumBufferParts | ( | gc::DS_HANDLE | dsh, |
gc::BUFFER_HANDLE | bh | ||
) |
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.
unexpected_data_type | if the size of the argument type T does not match the actual size. |
uint32_t gcGetNumPortURLs | ( | gc::PORT_HANDLE | h | ) |
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.
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.
gc::TL_HANDLE ifGetParent | ( | gc::IF_HANDLE | ifh | ) |
gc::IF_HANDLE devGetParent | ( | gc::DEV_HANDLE | devh | ) |
gc::DEV_HANDLE dsGetParent | ( | gc::DS_HANDLE | dsh | ) |
void memento | ( | const std::string & | text | ) |
Reports a string to the memento logging system.
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.
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.
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.
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.
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.
uint64_t getTimestampUs | ( | ) |
void genapiSetString | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
const std::string & | value | ||
) |
Updates a feature with string contents.
gentl_error | if feature is missing or read-only. |
std::string genapiGetString | ( | gc::PORT_HANDLE | h, |
const std::string & | feature | ||
) |
Reads a feature as string.
gentl_error | if feature is missing. |
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.
gentl_error | if feature is missing. |
std::vector<std::string> genapiGetStringList | ( | gc::PORT_HANDLE | h, |
const std::string & | what | ||
) |
void genapiSetInteger | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
int64_t | value | ||
) |
Updates a feature with integer value.
gentl_error | if feature is missing or read-only. |
int64_t genapiGetInteger | ( | gc::PORT_HANDLE | h, |
const std::string & | feature | ||
) |
Reads a feature as an integer.
h | port handle |
feature | name of feature to read with or without one of the following suffixes:
|
gentl_error | if feature is missing. |
Examples:
int64_t genapiGetIntegerWithDefault | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
int64_t | defaultValue | ||
) |
Reads a feature as an integer.
void genapiSetFloat | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
double | value | ||
) |
Updates a feature with float value.
gentl_error | if feature is missing or read-only. |
double genapiGetFloat | ( | gc::PORT_HANDLE | h, |
const std::string & | feature | ||
) |
Reads a feature as a float.
h | port handle |
feature | name of feature to read with or without one of the following suffixes:
|
gentl_error | if feature is missing. |
Examples:
double genapiGetFloatWithDefault | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
double | defaultValue | ||
) |
Reads a feature as a float.
void genapiSetRegister | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
const void * | data, | ||
size_t | size | ||
) |
Update data of a register feature.
void genapiGetRegister | ( | gc::PORT_HANDLE | h, |
const std::string & | feature, | ||
void * | data, | ||
size_t | size | ||
) |
Read data of a register feature.
void genapiExecuteCommand | ( | gc::PORT_HANDLE | h, |
const std::string & | feature | ||
) |
Executes a GenApi command.
void genapiAttachEvent | ( | gc::PORT_HANDLE | h, |
uint64_t | eventId, | ||
const void * | buffer, | ||
size_t | size | ||
) |
Attach a GenApi event.
void genapiInvalidate | ( | gc::PORT_HANDLE | h, |
const std::string & | feature | ||
) |
Invalidate a GenApi feature.
void genapiRunScript | ( | gc::PORT_HANDLE | h, |
const std::string & | script, | ||
ge::GENAPI_UI_SCRIPT_CONTEXT * | context = 0 |
||
) |
Run a Euresys GenApi script.
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.
void genapiInterruptScript | ( | const std::string & | scriptId | ) |
Interrupt a running Euresys GenApi script.
unsigned int imageGetPixelFormatValue | ( | const std::string & | format, |
unsigned int | ns | ||
) |
Get PFNC value from name.
std::string imageGetPixelFormat | ( | uint64_t | format | ) |
unsigned int imageGetBytesPerPixel | ( | const std::string & | format | ) |
Get Bytes per pixel.
unsigned int imageGetBitsPerPixel | ( | const std::string & | format | ) |
Get Bits per pixel.
void imageConvert | ( | const ge::ImageConvertInput & | input, |
const ge::ImageConvertOutput & | output, | ||
const ge::ImageConvertROI * | roi = 0 |
||
) |
Convert an image.
void imageSaveToDisk | ( | const ge::ImageConvertInput & | input, |
const std::string & | filepath, | ||
int64_t | index = -1 , |
||
const ge::ImageSaveToDiskParams * | params = 0 |
||
) |
Save an image to disk.
void* imageGet | ( | ge::ImageId | id, |
size_t * | outSize = 0 |
||
) |
Get information of an image.
void imageRelease | ( | ge::ImageId | id | ) |
Release an image.
void imagePrepareBuffers | ( | size_t | bufferSize, |
size_t | count | ||
) |
Preallocate buffers in the pool to improve conversion performance.
bufferSize | size of the buffers to preallocate in the converter pool |
count | the number of buffers to preallocate |
void imageTrimBuffers | ( | ) |
Reclaim unused buffers managed by the converter to free memory.