PylonGrabResult_t Result data struct for PylonStreamGrabberRetrieveResult(). This data describes grab results (typically image data) retrieved from the device. Some items are optional (marked as "optional") and are only filled in if they are supported by the device.
EPylonImageOrientation { ImageOrientation_TopDown, ImageOrientation_BottomUp} Defines the vertical orientation of an image in memory.
enum
EPylonKeyFrameSelection { KeyFrameSelection_NoKeyFrame, KeyFrameSelection_KeyFrame, KeyFrameSelection_Auto} Lists the possibilities for selecting a key frame when using compression.
PylonGigEForceIp(const char * pMacAddress, const char * pIpAddress, const char * pSubnetMask, const char * pDefaultGateway) 'Force' a static IP address configuration into a device identified by its MAC Address.
GENAPIC_RESULT
PylonGigEGetPersistentIpAddress(PYLON_DEVICE_HANDLE hDev, char * pIpAddress, size_t * pIpAddressLen, char * pSubnetMask, size_t * pSubnetMaskLen, char * pDefaultGateway, size_t * pDefaultGatewayLen) Reads the persistent IP address from the device.
PylonIsDeviceAccessible(size_t index, int accessMode, _Bool * pIsAccessible) This method can be used to check if a camera device can be created and opened.
Images are transferred with Basler lossless compression.
CompressionMode_BaslerFixRatio
Images are transferred with Basler fixed ratio compression (which may lead to lossily compressed images).
Mode used for transferring images.
The compression mode can have three states. Either compression is disabled in the camera (CompressionMode_Off) or the camera compresses the images in one of two ways (CompressionMode_BaslerLossless or CompressionMode_BaslerFixRatio).
The device is not synchronized to a master clock to be used as time reference. Typically used when scheduled action commands cannot be scheduled for a future time since the reference time coming from IEEE 1588 is not locked. The action command has been ignored by the device.
PylonGigEActionCommandStatus_Overflow
-519995371
Returned when the scheduled action commands queue is full and the device cannot accept the additional request. The action command has been discarded by the device.
PylonGigEActionCommandStatus_ActionLate
-519995370
The requested scheduled action command was requested at a point in time that is in the past. If the time tag of the scheduled action command is in the past (relative to the device timestamp), and if it is a valid action command, then the device will execute this action command immediately and return PylonGigEActionCommandStatus_ActionLate. This status code is used as an indicator to the application requesting the action command that a mis-synchronization might have occurred.
Tagged Image File Format, no compression, supports mono images with more than 8 bit bit depth.
ImageFileFormat_Jpeg
2
Joint Photographic Experts Group, lossy data compression.
ImageFileFormat_Png
3
Portable Network Graphics, lossless data compression.
ImageFileFormat_Raw
4
Saves the raw image buffer data. Packed image formats are unpacked. In the format used for saving, the data cannot be loaded using PylonImagePersistenceLoad. The data cannot be loaded in this format.
Every nth frame is a key frame. The value of n is specified by passing its value in the SAviCompressionOptions in the autoKeyFrameInsertionRate member when opening the AVI Writer.
Lists the possibilities for selecting a key frame when using compression.
Depending on the used image format and codec about 5 KB of header information and padding bytes are written to the AVI file. Furthermore, 24 additional bytes are needed per image for chunk header and index entry data.
Provides access to the number of image data bytes written to the AVI file.
Parameters:
hWriter Handle for the AVI writer.
pImageDataBytesWritten Returns the the number of image data bytes written to the the AVI File. Returns 0 if no AVI File has been written yet. This size does not contain the size of the AVI File Header and AVI File Index.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Check, whether the chunk data buffer contains valid data using its CRC checksum. The boolean result pointed to by pResult is set to true if the checksum matches the data, false otherwise.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function creates a chunk parser for a device and returns a handle for it. If the device does not support a chunk parser an invalid handle is returned.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function creates an event adapter for a device and returns a handle for it. If the device does not support an event adapter an invalid handle is returned.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Look up a feature node with a given name and return its value as string. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Given a device handle, this function will return basic information about the device in a PylonDeviceInfo_t struct pointed to by pDeviceInfo. Do not confuse a PylonDeviceInfo_t struct with a PYLON_DEVICE_INFO_HANDLE. They are completly unrelated.
Obtain a transport layer parameter node map from a device.
Parameters:
hDev Device handle
phMap Result pointer
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function returns a handle for the transport layer node map of a device. If the device does not support a transport layer node map an invalid handle is returned. You must use the GenApi functions to access nodes in the node map.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function returns the name of the device property identified by index index. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function returns the value of the device property identified by index index. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.
Return the value of a device property identified by its name.
Parameters:
hDi Device info handle
pName Property name
pBuf Buffer receiving result
pBufLen Pointer to buffer length
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function returns the value of the device property identified by its name. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.
GENAPIC_RESULT PylonDeviceOpen(
PYLON_DEVICE_HANDLE hDev,
int accessMode
)
Open a device.
Parameters:
hDev Device handle
accessMode Intended access mode. You can pass one or more of the flags specified below.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function opens a device. A device must be opened before any operations can be performed on it. The accessMode argument can be used to restrict the type of access allowed by the device. The following access modes are available:
PYLONC_ACCESS_MODE_CONTROL - Allows to read or write camera parameters to configure the camera.
PYLONC_ACCESS_MODE_STREAM - Allows to read image data from the camera's stream grabber object.
PYLONC_ACCESS_MODE_EVENT - Allows to read event data from the camera's stream grabber object.
PYLONC_ACCESS_MODE_EXCLUSIVE - Allows exclusive access. When this flag is specified no other application may access the camera.
PYLONC_ACCESS_MODE_MONITOR - Allows only read access. This flag cannot be combined with any other flags. It is typically used in Multicast/Broadcast applications with GigE cameras.
You can pass one or more flags. If you pass more than one flag you can combine them using the 'or' operator.
Perform a raw read on the standard "Device"-node port.
Parameters:
hDev Node of the port to read from. Use GenApiNodeMapGetNode to get the nodehandle.
pBuffer Points to the buffer to copy the data to.
Address Address to start reading data from.
Length Number of bytes to read starting at Address.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Reads raw data from the "Device" port. Specify the address from where to read data. The count of data bytes passed in Length is read. The data read will be written to the buffer passed in pBuffer. Make sure the buffer has at least a size of Length-bytes.
Perform a raw write on the standard "Device"-node port.
Parameters:
hDev Node of the port to write to. Use GenApiNodeMapGetNode to get the nodehandle.
pBuffer Points to the buffer to read the data from.
Address Address to start writing the data to.
Length Number of bytes to write starting at Address.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Writes raw data to the "Device" port. Specify the address from where to read data. The count of data bytes passed in Length is read. The data read will be read from the buffer passed in pBuffer.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Note The time the callback will be fired can vary depending on the transport layer used. Some devices, e.g. devices with GigE interface, may take some time to detect the device removal (see [Debugging pylon Applications Using GigE Cameras]). If your program is currently grabbing images it is likely to get failed buffers before the callback is fired.
Register a device removal callback on the device. The callback function will be called when the device is removed (unplugged). When the callback is fired all subsequent calls to functions which need to communicate with the device will fail.
Some devices may not support callback removal and will return an invalid handle.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. Depending on device class, other errors are possible as well.
Thread Safety:
The internal list of device information objects changes for all threads.
This function returns the total count of all camera devices detected by the pylon C system regardless of the cameras' interfaces (GigE, Camera Link,…) and creates an internal list of device information objects ordered by device type (USB first, then GigE, CameraLink) and serial number. The device information objects are accessible via the index with PylonGetDeviceInfo() function.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. Depending on device class, other errors are possible as well.
Thread Safety:
The internal list of interface information objects changes for all threads.
This function returns the total count of all interfaces detected by the pylon C system and creates an internal list of interface information objects. The device information objects are accessible via the index with Pylon GetInterfaceInfo() function.
pDeviceClass The device class to check. Using NULL or an empty string matches every deviceclass.
numInterfaces Result value pointer
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. Depending on device class, other errors are possible as well.
Thread Safety:
The internal list of interface information objects changes for all threads.
This function returns the total count of all interfaces detected by the pylon C system matching a given device class and creates an internal list of interface information objects. The device information objects are accessible via the index with PylonGetInterfaceInfo() function.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Pass an event buffer to an event adapter. The events in the buffer will be processed, updating properties of the device associated with the event adapter.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Calling this function returns a boolean status in the variable pointed to by pReady, indicating whether at least one event is available. If so, the event is returned in the result struct pointed to by pEventResult.
Get information about camera device identified by its index.
Parameters:
index Device index.
pDi Pointer to camera device info struct to fill
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Note Do not confuse a PylonDeviceInfo_t struct with a PYLON_DEVICE_INFO_HANDLE. They are completly unrelated.
Given a device index, this function returns information about the camera device in a PylonDeviceInfo_t struct pointed to by pDi. The index parameter must be lower than the numDevices parameter returned from PylonEnumerateDevices().
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function returns a handle for a device info object for the device identified by index index. The index parameter must be lower than the numDevices parameter returned from PylonEnumerateDevices().
Get information about an interface identified by its index.
Parameters:
index Interface index
pIfInfo Pointer to interface info struct to fill
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Note Do not confuse a PylonInterfaceInfo_t struct with a PYLON_INTERFACE_INFO_HANDLE. They are completely unrelated.
Given an interface index, this function will return basic information about the device in a PylonInterfaceInfo_t struct pointed to by pIfInfo. The index parameter must be lower than the numInterfaces parameter returned by PylonEnumerateInterfaces().
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. Depending on device class, other errors are possible as well
Thread Safety:
The internal list of device information objects changes for all threads. This function uses the same internal list of device information objects as the PylonEnumerateDevices() function.
This function returns the total count of all GigE camera devices detected by the pylon C system and creates an internal list of device information objects ordered by serial number. The devices are accessible via the index with PylonGetDeviceInfo() function. In contrast to the PylonEnumerateDevices() function, devices will be listed that have a subnet configured that is different from the subnet of the host system network adapters.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. one of the documented error codes otherwise
When calling this function, there must be no opened camera object for the device to reconfigure! PylonDeviceInfoGetPropertyValueByName() can be used to retrieve the MAC Address using the 'MacAddress' key.
deviceKey The device key addresses devices managed by an application. The device key is only known to the application controlling its camera devices and it ensures that only this application can trigger the camera devices. Therefore the device key cannot be read from a device. An exact match of the send deviceKey and the device key stored in a device is required for executing an action.
groupKey The group key is used to create groups of devices or actions. An exact match of the send groupKey and the group key stored in a device for an action is required for executing an action.
groupMask The groupMask is a bit mask that allows to send an action to a subgroup of the devices addressed by the deviceKey``groupKey pair. The result of a bitwise AND operation of groupMask and the group mask stored in a device for an action must be non-zero for executing an action.
pBroadcastAddress BroadcastAddress in dot notation where the command will be broadcast to, e.g. 255.255.255.255 (all adapters, default), 192.168.1.255 (all devices in a single subnet 192.168.1.xxx), 192.168.1.38 (single device). See the note below.
timeoutMs Optional: Time in milliseconds the call is waiting for acknowledges of the addressed devices. Waiting for acknowledges is stopped if pNumResults have been received. This parameter can be 0 if a check of action command results is not required.
pNumResults Optional: The number of results in the results array. The value passed should be equal to the expected number of devices that acknowledge the command. Returns the number of received results. This parameter is ignored if timeoutMs is 0. Thus, this parameter can be NULL if timeoutMs is 0.
pResults Optional: An array with *pNumResults elements to hold the action command result status. The buffer is filled beginning from the start. Remaining results are not changed if less results are received than result items available. This parameter is ignored if timeoutMs is 0. Thus, this parameter can be NULL if timeoutMs is 0.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Note The request is sent via all existing network adapters. If a network adapter has more than one IP address, the request is sent separately for each address. This is not executed simultaneously but consecutively, IP address by IP address. That's why additional latency is added to the execution time. Directed broadcasts (192.168.1.255) or unicasts (192.168.1.38) are only sent if the request subnet matches the subnet of the IP address, i.e., if no gateway or routing are required.
Precondition:
IP4 addresses must be used.
groupMask must not be 0.
pNumResult, *pNumResult and pResults must not be 0 if a timeoutMs value other than 0 is passed.
Thread Safety:
The function is thread-safe.
The action command feature lets you trigger actions in multiple devices (e.g. cameras) at roughly the same time or at a defined point in time (scheduled action command) by using a single broadcast protocol message (without extra cabling). Action commands are used in cameras in the same way as for example the digital input lines.
deviceKey The device key addresses devices managed by an application. The device key is only known to the application controlling its camera devices and it ensures that only this application can trigger the camera devices. Therefore the device key cannot be read from a device. An exact match of the send deviceKey and the device key stored in a device is required for executing an action.
groupKey The group key is used to create groups of devices or actions. An exact match of the send groupKey and the group key stored in a device for an action is required for executing an action.
groupMask The groupMask is a bit mask that allows to send an action to a subgroup of the devices addressed by the deviceKey``groupKey pair. The result of a bitwise AND operation of groupMask and the group mask stored in a device for an action must be non-zero for executing an action.
actionTimeNs Time in nanoseconds when the action is to be executed. The actual value depends on the used master clock. A master clock value can be obtained for instance for a set of synchronized camera devices by reading the timestamp value (GevTimestampValue) after latching the timestamp value (GevTimestampControlLatch) from one camera device of the set.
pBroadcastAddress BroadcastAddress in dot notation where the command will be broadcast to, e.g. 255.255.255.255 (all adapters, default), 192.168.1.255 (all devices in a single subnet 192.168.1.xxx), 192.168.1.38 (single device). See the note below.
timeoutMs Optional: Time in milliseconds the call is waiting for acknowledges of the addressed devices. Waiting for acknowledges is stopped if pNumResults have been received. This parameter can be 0 if a check of action command results is not required.
pNumResults Optional: The number of results in the results array. The value passed should be equal to the expected number of devices that acknowledge the command. Returns the number of received results. This parameter is ignored if timeoutMs is 0. Thus, this parameter can be NULL if timeoutMs is 0.
pResults Optional: An array with *pNumResults elements to hold the action command result status. The buffer is filled beginning from the start. Remaining results are not changed if less results are received than result items available. This parameter is ignored if timeoutMs is 0. Thus, this parameter can be NULL if timeoutMs is 0.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Note The request is sent via all existing network adapters. If a network adapter has more than one IP address, the request is sent separately for each address. This is not executed simultaneously but consecutively, IP address by IP address. That's why additional latency is added to the execution time. Directed broadcasts (192.168.1.255) or unicasts (192.168.1.38) are only sent if the request subnet matches the subnet of the IP address, i.e., if no gateway or routing are required.
Precondition:
IP4 addresses must be used.
groupMask must not be 0.
pNumResult, *pNumResult and pResults must not be 0 if a timeoutMs value other than 0 is passed.
actionTimeNs must be smaller than or equal INT64_MAX.
Thread Safety:
The function is thread-safe.
The action command feature lets you trigger actions in multiple devices (e.g. cameras) at roughly the same time or at a defined point in time (scheduled action command) by using a single broadcast protocol message (without extra cabling). Action commands are used in cameras in the same way as for example the digital input lines.
pMacAddress MAC address as a string, no delimiters are used. e.g., 003053061a58
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. one of the documented error codes otherwise
This function fails when the device is open, i.e., when a control channel is established. PylonDeviceInfoGetPropertyValueByName() can be used to retrieve the MAC Address using the 'MacAddress' key.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. one of the documented error codes otherwise
Writing the persistent IP address does not change the IP configuration. Use the ChangeIpConfiguration() method to enable the usage of persistent IP addresses.
Creates an empty decompressor without a compression descriptor.
Parameters:
phDecompressor Handle for the decompressor. This parameter must not be NULL.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function creates a default decompressor without a compression descriptor. You will have to initialize the decompressor first by using the PylonImageDecompressorSetCompressionDescriptor() function in order to be able to decompress images. You must call PylonImageDecompressorDestroy() to release the decompressor and free its resources when you don't need it anymore.
pOutputBuffer Pointer to the buffer that will receive the decompressed image. This parameter must not be NULL.
pOutputBufferSize On input, the variable specifies the size of the buffer in bytes of the decompressed image. On output, the variable will receive the actual buffer size required for the decompressed image. This parameter must not be NULL.
pPayload Pointer to the grab buffer that holds the compressed data. This parameter must not be NULL.
payloadSize Payload size (in bytes) of the data received (must be less or equal to the size of the grab buffer).
pCompressionInfo Pointer to a PylonCompressionInfo_t struct. On return, the struct will contain information about the decompressed image. If this parameter is NULL, no info will be returned.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Decompresses the image of the grab buffer provided. This method requires that a compression descriptor has been set previously using PylonImageDecompressorSetCompressionDescriptor function. The grab buffer provided must contain a compressed image that has been received without errors. On successful return the decompressed image data is stored in the buffer passed pOutputBuffer. Information about the decompressed image is stored in the struct passed in pCompressionInfo.
Return information about a compressed grab result.
Parameters:
pPayload Pointer to the grab buffer that holds the compressed data. This parameter must not be NULL.
payloadSize Payload size (in bytes) of the data received.
pCompressionInfo Pointer to a PylonCompressionInfo_t struct. On return, the struct will contain information about the decompressed image. This parameter must not be NULL.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Return information about a compressed grab result. If the function returns success, it does not neccessarily mean the data is compressed. It only indicates that the output parameter has been set. You must check the HasCompressedImage and CompressionStatus fields of the returned PylonCompressionInfo_t struct.
function PylonImageDecompressorSetCompressionDescriptor#
pCompressionDescriptor Pointer to the compression descriptor to set. If this parameter is NULL the descriptor will be reset.
sizeCompressionDescriptor Size of the data (in bytes) of the compression descriptor when a descriptor has been passed in pCompressionDescriptor.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
A decompressor requires a compression descriptor in order to be able to decompress images. You can retrieve the compression descriptor from the camera's node map using the BslImageCompressionBCBDescriptor node.
sourceWidth Number of columns (in pixels) of source image.
sourceHeight Number of rows in (pixels) of source image.
pBufSize Buffer size which is necessary for converted source image.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Gets the buffer size for a converted image. The buffer size depends on the pixel type, the width and the height of the source image and the output padding.
Saves the image to disk. Converts the image to a format that can be saved if required.
Parameters:
imageFileFormat The file format to save the image in.
pFilename Name and path of the image.
pBuffer Buffer which contains the image data.
bufferSize The size of the buffer in byte.
pixelType The pixel type of the image to save.
width The number of pixels in a row of the image to save.
height The number of rows of the image to save.
paddingX The number of extra data bytes at the end of each row.
orientation The vertical orientation of the image in the image buffer.
pOptions The image persistence save options. This parameter can be NULL.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
If required, the image is automatically converted to a new image and then saved. See CanSaveWithoutConversion() for more information. An image with a bit depth higher than 8 bit is stored with 16 bit bit depth if supported by the image file format. In this case the pixel data is MSB aligned.
If more control over the conversion is required then the CImageFormatConverter class can be used to convert the input image before saving it.
GENAPIC_RESULT PylonImageWindowCreate(
size_t winIndex,
int x,
int y,
int nWidth,
int nHeight
)
Creates a window for index passed in winIndex.
Parameters:
winIndex The window used for displaying the image. Valid window indices range from 0 to 31.
x The x-coordinate of the upper-left corner of the window in screen coordinates. You can pass the PYLON_IMAGE_WINDOW_USEDEFAULT value to create the window at the same position as the previous one before it was closed. The other position parameters will be ignored. If the window is shown the very first time the system selects a default position and size for the window.
y The y-coordinate of the upper-left corner of the window in screen-coordinates.
nWidth The width of the window in screen coordinates.
nHeight The height of the window in screen coordinates.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Creates a window for index passed in winIndex. Valid window indices range from 0 to 31.
GENAPIC_RESULT PylonImageWindowShow(
size_t winIndex,
int nShow
)
Shows or hides the image window.
Parameters:
winIndex The window used for displaying the image. Valid window indices range from 0 to 31.
nShow Pass same values for this parameter as described in the official documentation for ShowWindow().
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function calls ShowWindow from the Windows API. Pass the same values for the nShow parameter as described in the official documentation for ShowWindow() The value SW_SHOW will show the window in its current state and position.
Return: GENAPI_E_OK This function is guaranteed not to fail.
This function must be called at least once before any other pylon C functions are called. Its purpose is to set up internal structures used by the pylon C system.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Given an interface handle, this function will return basic information about the interface in a PylonInterfaceInfo_t struct pointed to by pIfInfo. Do not confuse a PylonInterfaceInfo_t struct with a PYLON_INTERFACE_INFO_HANDLE. They are completely unrelated.
GENAPIC_RESULT PylonPixelFormatConverterCreate(
PYLON_DEVICE_HANDLE hDev,
int outAlign,
PYLON_FORMAT_CONVERTER_HANDLE * phConv
)
Deprecated: Create a pixel format converter.
Parameters:
hDev Device handle
outAlign Output buffer line alignment
phConv Pointer to pixel format converter result
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Create a pixel format converter. The selection of the output format is based on the camera's native pixel format. All color formats are converted to RGBA (8888) with the 'A' component set to zero. All monochrome formats are converted to Mono8. The outAlign parameter can be used to enforce a particular address alignment of every line in the output buffer. The start address of every output buffer line will be an integer multiple of the outAlign argument.
Translate a pixel type name to an enumeration value.
Parameters:
pString String to be converted
pPixelType Pointer to pixel format code result
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Converts a text string to a pixel format code that is returned in the variable pointed to by pPixelType. If the string cannot be converted, the result is set to PixelType_Undefined.
Allows to set the real-time thread priority of a thread.
Parameters:
hThread Handle of the thread, for which the priority is to change
priority The new priority
Return: GENAPI_E_OK if everything is o.k.
one of the documented error codes otherwise
This function allows to raise a thread's priority into the range of "realtime" thread priorities. The function can control each thread independently. This means that it is not necessary to raise the process to the "realtime" priority class, which would affect all threads of the process.
If the process is not in the realtime priority class and if the process has the SE_INC_BASE_PRIORITY_NAME privilege, values from 15 to 31 can be set. If the privilege is not granted, only 15 can be set.
If the process is in the realtime priority class, values from 16 to 31 can be set. No special permissions are required.
To grant the privilege, use the Windows policy editor to enable the SE_INC_BASE_PRIORITY_NAME right (User Rights Assignment / Increase scheduling policy). Typically, all members of the Administrators group have the privilege enabled.
Caution: Do not change the process priority class after setting the realtime thread priority.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Tell the stream grabber that grabbing has finished and that it should release all resources allocated by PylonStreamGrabberPrepareGrab(). After this, the stream grabber setup may be modified again.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function returns a wait object handle of the stream grabber. You can use this handle to wait for a buffer using PylonWaitObjectWait() or pass it to wait object set using PylonWaitObjectsAdd().
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Tell the stream grabber that no more setup operations (data buffer registration etc.) will be done, and that it should get ready for grabbing by allocating all required resources. After calling this function, further setup operations will be rejected.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Append the data buffer represented by hBuf to the stream grabber's queue. Continuously processing the queue, the stream grabber will fill the buffer with data as soon as all proceeding buffers have been processed. pContext can be used to attach application-specific data to a buffer. This argument will be returned unmodified along with the buffer when grabbing is done.
Retrieve buffer after processing by stream grabber.
Parameters:
hStg Stream grabber handle
pGrabResult Pointer to result data struct
pReady Pointer to 'buffer ready' flag
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Calling this function returns a boolean status in the variable pointed to by pReady, indicating whether at least one data buffer has been filled with data. If so, information about the first of such buffers is returned in the result struct pointed to by pGrabResult.
Set the maximum data buffer size for a stream grabber.
Parameters:
hStg Stream grabber handle
maxSize Buffer size to set
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
This function is used to prepare a stream grabber for grabbing. It sets up the maximum size of any individual data buffer that will be used to grab data.
Starts streaming for the stream grabber if this is mandatory for operation.
Parameters:
hStg Stream grabber handle
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Some stream grabbers, e.g., some stream grabbers based on GenTL, have limitations on when buffers can be registered. For these stream grabbers it is mandatory to register all buffers first and call StartStreamingIfMandatory() afterwards. Between the StartStreamingIfMandatory() and StopStreamingIfMandatory() calls no buffers can be registered or deregistered if such a limitation exists.
function PylonStreamGrabberStopStreamingIfMandatory#
Stops streaming for the stream grabber if this is mandatory for operation.
Parameters:
hStg Stream grabber handle
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Some stream grabbers, e.g., some stream grabbers based on GenTL, have limitations on when buffers can be registered. For these stream grabbers it is mandatory to call StopStreaming to be able to deregister buffer afterwards.
Return: GENAPI_E_OK This function is guaranteed not to fail.
Call this function when you are done using pylon C. Its purpose is to deallocate structures used by pylon C internally. After calling this function, no more pylon C functions may be called unless another call to PylonInitialize() is made first.
Create a wait object for an existing Win32 handle.
Parameters:
hW32 Win32 handle for a synchronization object
duplicate Bool: clone handle or not
phWobj Pointer to PYLON_WAITOBJECT_HANDLE result
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes. one of the documented error codes otherwise
This function creates a wait object from a Win32 handle that represents a synchronization object (event, thread, etc.). If duplicate equals true, the handle is cloned and ownership of hW32 remains with the caller, otherwise, the wait object takes ownership of hW32.
Wait for all objects in a wait object set to become signaled.
Parameters:
hWos Wait object set handle
timeout Max. time to wait in ms
pResult Pointer to boolean return value
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Wait until either all wait objects in the set become signaled or the timeout expires. The boolean return value pointed to by pResult indicates which one is the case: True - signaled, false - timeout.
Wait for all objects in a wait object set to become signaled.
Parameters:
hWos Wait object set handle
timeout Max. time to wait in ms
alertable Boolean flag selecting alertable or non-alertable wait
pWaitResult Pointer to return value
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Wait until either all wait objects in the set become signaled or the timeout expires. The return value pointed to by pWaitResult indicates the reason why the function returned. The alertable argument, if set to one, allows the wait to be interrupted.
Wait for any one object in a wait object set to become signaled.
Parameters:
hWos Wait object set handle
timeout Max. time to wait in ms
pIndex Pointer to index of wait object signaled
pResult Pointer to boolean return value
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Wait until either any one of the wait objects in the set becomes signaled or the timeout expires. The boolean return value pointed to by pResult indicates which one is the case: True - signaled, false - timeout. The variable pointed to by pIndex is set to the index of the wait object that has been signaled.
Wait for any one object in a wait object set to become signaled.
Parameters:
hWos Wait object set handle
timeout Max. time to wait in ms
pIndex Pointer to index of wait object signaled
alertable Bool: wait can be interrupted
pWaitResult Pointer to return value
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Wait until either any one of the wait objects in the set becomes signaled or the timeout expires. The return value pointed to by pWaitResult indicates the reason why the function returned. The variable pointed to by pIndex is set to the index of the wait object that has been signaled. The alertable argument, if set to one, allows the wait to be interrupted.
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Wait until either the wait object becomes signaled or the timeout expires. The boolean return value pointed to by pResult indicates which on is the case: True - signaled, false - timeout.
alertable Boolean flag selecting alertable or non-alertable wait
pWaitResult Pointer to wait result
Return: If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section ErrorCodes.
Wait, until either the wait object becomes signaled or the timeout expires. The boolean return value pointed to by pResult indicates which on is the case: True - signaled, false - timeout. The alertable argument, if set to one, allows the wait to be interrupted. This is an extended version of PylonWaitObjectWait().