All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CLProtocol.h File Reference

Exported C functions for camera link protocol drivers. More...

#include <CLProtocol/ClSerialTypes.h>
#include <stdarg.h>
Include dependency graph for CLProtocol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  clpLogCallback_t
 

Macros

#define CLPROTOCOL   __attribute__((cdecl))
 
#define CLPROTOCOL_DECL   __attribute__((visibility("default")))
 
#define CLPROTOCOLEXPORT   USER_EXTERN_C __attribute__((visibility("default")))
 
#define USER_EXTERN_C
 
#define USER_EXTERN_C_END
 
#define USER_EXTERN_C_START
 

Typedefs

typedef void(CLPROTOCOLclp_logger_t) (CLINT32 level, const char *stringFormat, va_list argptr)
 
typedef USER_EXTERN_C_START struct clpLogCallback_t clpLogCallback_t
 

Enumerations

enum  CLP_LOG_LEVEL_VALUE {
  CLP_LOG_FATAL = 0, CLP_LOG_ALERT = 100, CLP_LOG_CRIT = 200, CLP_LOG_ERROR = 300,
  CLP_LOG_WARN = 400, CLP_LOG_NOTICE = 500, CLP_LOG_INFO = 600, CLP_LOG_DEBUG = 700,
  CLP_LOG_NOTSET = 800
}
 
enum  CLP_PARAMS {
  CLP_LOG_LEVEL = 1, CLP_LOG_CALLBACK = 2, CLP_STOP_PROBE_DEVICE = 3, CLP_DEVICE_BAUDERATE = -1,
  CLP_DEVICE_SUPPORTED_BAUDERATES = -2
}
 Types of parameters to be accessed by clpGetParam/clpSetParam. More...
 

Functions

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpCloseLib (void)
 This function is call to close the library before unloading. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpContinueWriteRegister (ISerial *pSerial, const CLUINT32 Cookie, const BOOL8 ContinueWaiting, const CLUINT32 TimeOut)
 Calling This function is called after a write function returned CL_ERR_PENDING_WRITE. It either issues another wait for write cycle or cancels the write action. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpDisconnect (const CLUINT32 Cookie)
 This function disconnects the DLL from the device. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetCLProtocolVersion (CLUINT32 *pVersionMajor, CLUINT32 *pVersionMinor)
 This function returns the version of the CLProtocol interface version. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetErrorText (CLINT32 errorCode, CLINT8 *errorText, CLUINT32 *errorTextSize, const CLUINT32 Cookie=0)
 This function converts an error code to error text for display in a dialog box or in a standard I/O window. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetEventData (const CLUINT32 Cookie, CLINT8 *pBuffer, CLUINT32 *pBufferSize)
 This function is call to get a possible event by a CLProtocol. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetParam (ISerial *pSerial, CLP_PARAMS param, const CLUINT32 Cookie, CLINT8 *pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut)
 This function is call to read a CLProtocol parameter value. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetShortDeviceIDTemplates (CLINT8 *pShortDeviceTemplates, CLUINT32 *pBufferSize)
 This function returns a list of short device templates coded into a single string. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetXMLDescription (ISerial *pSerial, const CLUINT32 Cookie, const CLINT8 *pXMLID, CLINT8 *pXMLBuffer, CLUINT32 *pBufferSize, const CLUINT32 TimeOut)
 This function retrieves an XML file from the camera if possible. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetXMLIDs (ISerial *pSerial, const CLUINT32 Cookie, CLINT8 *pXMLIDs, CLUINT32 *pBufferSize, const CLUINT32 TimeOut)
 This function returns a list of XML IDs coded into a single string. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpInitLib (clp_logger_t logger, CLP_LOG_LEVEL_VALUE logLevel)
 This function is call to initialize the library after it is loaded. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpIsParamSupported (CLP_PARAMS param)
 This function is call know if a parameter is supported by a CLProtocol. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpProbeDevice (ISerial *pSerial, const CLINT8 *pDeviceIDTemplate, CLINT8 *pDeviceID, CLUINT32 *pBufferSize, CLUINT32 *pCookie, const CLUINT32 TimeOut)
 Connects and identifies the device and returns a DeviceID. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpReadRegister (ISerial *pSerial, const CLUINT32 Cookie, const CLINT64 Address, CLINT8 *pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut)
 This function reads numBytes from the serial device referred to by serialRef. clSerialRead will return when numBytes are available at the serial port or when the serialTimeout period has passed.
More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpSetParam (ISerial *pSerial, CLP_PARAMS param, const CLUINT32 Cookie, const CLINT8 *pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut)
 This function is call to change a CLProtocol parameter value. More...
 
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpWriteRegister (ISerial *pSerial, const CLUINT32 Cookie, const CLINT64 Address, const CLINT8 *pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut)
 This function writes numBytes to the serial device referred to by serialRef. clSerialRead will return when numBytes are available at the serial port or when the serialTimeout period has passed.
More...
 

Detailed Description

Exported C functions for camera link protocol drivers.

Definition in file CLProtocol.h.

Macro Definition Documentation

◆ CLPROTOCOL

#define CLPROTOCOL   __attribute__((cdecl))

Definition at line 73 of file CLProtocol.h.

◆ CLPROTOCOL_DECL

#define CLPROTOCOL_DECL   __attribute__((visibility("default")))

Definition at line 64 of file CLProtocol.h.

◆ CLPROTOCOLEXPORT

#define CLPROTOCOLEXPORT   USER_EXTERN_C __attribute__((visibility("default")))

Definition at line 63 of file CLProtocol.h.

◆ USER_EXTERN_C

#define USER_EXTERN_C

Definition at line 45 of file CLProtocol.h.

◆ USER_EXTERN_C_END

#define USER_EXTERN_C_END

Definition at line 47 of file CLProtocol.h.

◆ USER_EXTERN_C_START

#define USER_EXTERN_C_START

Definition at line 46 of file CLProtocol.h.

Typedef Documentation

◆ clp_logger_t

typedef void(CLPROTOCOL * clp_logger_t) (CLINT32 level, const char *stringFormat, va_list argptr)

Definition at line 84 of file CLProtocol.h.

◆ clpLogCallback_t

Enumeration Type Documentation

◆ CLP_LOG_LEVEL_VALUE

Enumerator
CLP_LOG_FATAL 
CLP_LOG_ALERT 
CLP_LOG_CRIT 
CLP_LOG_ERROR 
CLP_LOG_WARN 
CLP_LOG_NOTICE 
CLP_LOG_INFO 
CLP_LOG_DEBUG 
CLP_LOG_NOTSET 

Definition at line 116 of file CLProtocol.h.

◆ CLP_PARAMS

enum CLP_PARAMS

Types of parameters to be accessed by clpGetParam/clpSetParam.

Enumerator
CLP_LOG_LEVEL 
CLP_LOG_CALLBACK 

A 32-bit value that contains the current log level. This parameter expects a value represented by the CLP_LOG_LEVEL_VALUE constants.

CLP_STOP_PROBE_DEVICE 

A 32-bit value that contains a clpLogCallback_t pointer to the logger function.

CLP_DEVICE_BAUDERATE 

A 32-bit value that contains a signal to stop all running ProbeDevice.

CLP_DEVICE_SUPPORTED_BAUDERATES 

A 32-bit value that contains the baudrate used to communicate with the device. This parameter expects a value represented by the CL_BAUDRATE_XXX constants.

Definition at line 94 of file CLProtocol.h.

Function Documentation

◆ clpCloseLib()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpCloseLib ( void  )

This function is call to close the library before unloading.

Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred

◆ clpContinueWriteRegister()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpContinueWriteRegister ( ISerial pSerial,
const CLUINT32  Cookie,
const BOOL8  ContinueWaiting,
const CLUINT32  TimeOut 
)

Calling This function is called after a write function returned CL_ERR_PENDING_WRITE. It either issues another wait for write cycle or cancels the write action.

This function must be called if clpWriteRegister or clpContinueWriteRegister returns CL_ERR_PENDING_WRITE.

Note, that the CLProtocol.dll is responsible for preventing an endless number of calls to this function by tracking the total time elapsed since the original call and returning CL_ERR_TIMEOUT if this time is larger than the write operation should normally take place.

Parameters
[in]pSerialThe interface giving access to the serial port
[in]CookieManToken supplied by the driver dll via the clpProbeDevice function.
[in]ContinueWaitingIf true the function will block waiting for the previous call to clpWriteRegister to finish. If false the call will be cancelled.
[in]TimeOutA timeout value in [ms] used during accessing the device.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid
CL_ERR_PENDING_WRITEThe timeout has expired but the write is still pending for a good reason. The next call must be clpContinueWriteRegister

◆ clpDisconnect()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpDisconnect ( const CLUINT32  Cookie)

This function disconnects the DLL from the device.

When this function is called all resources allocated in the driver DLL and associated with the Cookie are deleted and the Cookie becomes invalid.

Parameters
[in]CookieManToken supplied by the driver dll via the clpProbeDevice function.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid

◆ clpGetCLProtocolVersion()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetCLProtocolVersion ( CLUINT32 pVersionMajor,
CLUINT32 pVersionMinor 
)

This function returns the version of the CLProtocol interface version.

The function is required to ensure this interface can be extended.

Parameters
[out]pVersionMajorIf this parameter changes backward compatibility is broken.
[out]pVersionMinorIf this parameter changes backward compatibility is maintained.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred

◆ clpGetErrorText()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetErrorText ( CLINT32  errorCode,
CLINT8 errorText,
CLUINT32 errorTextSize,
const CLUINT32  Cookie = 0 
)

This function converts an error code to error text for display in a dialog box or in a standard I/O window.

Note: clGetErrorText first looks for the error code in CCTserial.dll. If the error code is not found in CCTserial.dll, it is not a standard Camera Link error. clGetErrorText then passes the error code to the manufacturer-specific .dll, which returns the manufacturer-specific error text.

Parameters
[in]errorCodeThe error code used to find the appropriate error text. An error code is returned by every function in this library.
[out]errorTextA caller-allocated buffer which contains the NULL-terminated error text on function return.
[in,out]errorTextSizeOn success, contains the number of bytes written into the buffer, including the NULL-termination character. This value should be the size in bytes of the error text buffer passed in. On CL_ERR__BUFFER_TOO_SMALL, contains the size of the buffer needed to write the error text.
[in]CookieUsed only for CL_ERR_GET_LAST_ERROR. Returns the last error fired on the connection identified by the Cookie
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_BUFFER_TOO_SMALLThe pDeviceID buffer is too small
CL_ERR_ERROR_NOT_FOUNDNo error string could be retrieved for the given error number

◆ clpGetEventData()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetEventData ( const CLUINT32  Cookie,
CLINT8 pBuffer,
CLUINT32 pBufferSize 
)

This function is call to get a possible event by a CLProtocol.

Parameters
[in]pSerialPointer to the interface giving access to the serial port
[in]CookieToken supplied by the driver dll via the clpProbeDevice function.
[out]pBufferA pointer to a user-allocated buffer into which the function copies the event data.
[in,out]pBufferSizeAs an input, the value contains the size of the buffer that is passed through the pBuffer parameter. On successful return, this parameter contains the number of bytes written into the buffer, including the NULL termination character. On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write the data text.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRThe next event is copied to pBuffer
CL_ERR_TIMEOUTThere was no new event received
CL_ERR_BUFFER_TOO_SMALLThe pBuffer is too small
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid

◆ clpGetParam()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetParam ( ISerial pSerial,
CLP_PARAMS  param,
const CLUINT32  Cookie,
CLINT8 pBuffer,
const CLINT64  BufferSize,
const CLUINT32  TimeOut 
)

This function is call to read a CLProtocol parameter value.

Parameters
[in]paramThe parameter to read.
[in]CookieToken supplied by the driver dll via the clpProbeDevice function. Some parameters ignore the Cookie.
[in]pBufferPoints to a user-allocated buffer. Upon a successful call, buffer contains the value of the parameter.
[in]BufferSizeThis is the number of bytes to be written. Caller must ensure that buffer size match the parameters size.
[in]TimeOutA timeout value in [ms] used during accessing the device.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_PARAM_NOT_SUPPORTEDThe parameters is not supported

◆ clpGetShortDeviceIDTemplates()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetShortDeviceIDTemplates ( CLINT8 pShortDeviceTemplates,
CLUINT32 pBufferSize 
)

This function returns a list of short device templates coded into a single string.

   Short device templates can have the following form:
   - <CODE>"CameraManufacturer"</CODE>
   - <CODE>"CameraManufacturer#CameraFamily"</CODE>
   - <CODE>"CameraManufacturer#CameraFamily#CameraModel"</CODE>

   As compared to the long version the protocol driver dll's directory and file name is missing at the beginning.

   The device templates are separated by tabulators.
   The whole list is contained in a NULL terminated string.
Parameters
[out]pShortDeviceTemplatesA pointer to a user-allocated buffer into which the function copies the list of device template names.
[in,out]pBufferSizeAs an input, the value contains the size of the buffer that is passed through the pShortDeviceTemplates parameter. On successful return, this parameter contains the number of bytes written into the buffer, including the NULL termination character. On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write the data text.
Returns
At completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_BUFFER_TOO_SMALLThe pShortDeviceTemplates is too small

◆ clpGetXMLDescription()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetXMLDescription ( ISerial pSerial,
const CLUINT32  Cookie,
const CLINT8 pXMLID,
CLINT8 pXMLBuffer,
CLUINT32 pBufferSize,
const CLUINT32  TimeOut 
)

This function retrieves an XML file from the camera if possible.

The DLL may ask the camera for the XML code, or may have the code as a resource compiled in itself or even may have it's own private registry mechanism installed. In order to support the latter use case the long DeviceID is supplied which contains the driver dll's directory.

Parameters
[in]pSerialPointer to the interface giving access to the serial port
[in]CookieToken supplied by the driver dll via the clpProbeDevice function.
[in]pXMLIDA pointer to a NULL terminated string containing the connected device's XML ID
[out]pXMLBufferA pointer to a user-allocated buffer. Can be NULL if only the size of the buffer is requested (see pBufferSize)
[in,out]pBufferSizepBufferSize As an input, the value contains the size of the buffer that is passed through the pDeviceID parameter. On successful return, this parameter contains the number of bytes written into the buffer, including the NULL termination character. On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write the data text.
[in]TimeOutA timeout value in [ms] used during accessing the device. Note that the execution of the function itself can take longer than TimeOut because more than one access might be necessary.
Returns
At completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_BUFFER_TOO_SMALLThe pDeviceID buffer is too small
CL_ERR_NO_XMLDESCRIPTION_FOUNDNo XML description could be retrieved for the given XML ID
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid

◆ clpGetXMLIDs()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetXMLIDs ( ISerial pSerial,
const CLUINT32  Cookie,
CLINT8 pXMLIDs,
CLUINT32 pBufferSize,
const CLUINT32  TimeOut 
)

This function returns a list of XML IDs coded into a single string.

XML IDs have the following form:

"SchemaVersion.1.1@CameraManufacturer#CameraFamily#CameraModel@XMLVersion.2.3.4"

The first part of the XML ID denotes the major and minor version number of the XML schema. The last part of the XML ID denotes the major, minor, and subminor version number of the camera. Both version numbers mut be the same as given in the attributes of the RegisterDescription node of the corrensponding XML file. The middle part of the XML ID must be a complete DeviceID.

The device templates are separated by tabulators. The whole list is contained in a NULL terminated string.

Parameters
[in]pSerialPointer to the interface giving access to the serial port
[in]CookieToken supplied by the driver dll via the clpProbeDevice function.
[out]pXMLIDsA pointer to a user-allocated buffer into which the function copies the list of XML IDs. The list may be empty in which case is contains of a '0' only.
[in,out]pBufferSizeAs an input, the value contains the size of the buffer that is passed through the pXMLIDs parameter. On successful return, this parameter contains the number of bytes written into the buffer, including the NULL termination character. On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write the data text.
[in]TimeOutA timeout value in [ms] used during accessing the device. Note that the execution of the function itself can take longer than TimeOut because more than one access might be necessary.
Returns
At completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_BUFFER_TOO_SMALLThe pXMLIDs buffer is too small
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid

◆ clpInitLib()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpInitLib ( clp_logger_t  logger,
CLP_LOG_LEVEL_VALUE  logLevel 
)

This function is call to initialize the library after it is loaded.

Parameters
[in]loggerA function pointer that contains a logging function.
[in]logLevelThe log level default value. This argument expects a value represented by the CLP_LOG_LEVEL_VALUE constants.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
Returns
CL_ERR_INVALID_PTR The initialisation parameters are invalid.
CL_ERR_IN_USE The library is already open

◆ clpIsParamSupported()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpIsParamSupported ( CLP_PARAMS  param)

This function is call know if a parameter is supported by a CLProtocol.

Parameters
[in]paramThe parameter to probe.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRThe parameters is supported
CL_ERR_PARAM_NOT_SUPPORTEDThe parameters is not supported

◆ clpProbeDevice()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpProbeDevice ( ISerial pSerial,
const CLINT8 pDeviceIDTemplate,
CLINT8 pDeviceID,
CLUINT32 pBufferSize,
CLUINT32 pCookie,
const CLUINT32  TimeOut 
)

Connects and identifies the device and returns a DeviceID.

This function connects to a device attached to the serial port and attempts to identify it using the DeviceID template as hint. 
If the function is successful it returns a DeviceID as well as a Cookie. The DeviceID has the form:

    <CODE>"CameraManufacturer#CameraFamily#CameraModel#Version.2.3.4#SerialNumber"</CODE>

The connection is made with 9600 baud which is the power up baud rate as defined by the CameraLink standard.

This function attempts to re-connect the device if a DeviceID is passed instead of a template as pDeviceIDTemplate.
Parameters
[in]pSerialPointer to the interface giving access to the serial port
[in]pDeviceIDTemplateA pointer to NULL-terminated string containing a device ID template (in the probe use case) or a device ID (in the connect use case)
[in,out]pDeviceIDA pointer to a user-allocated buffer. If DeviceIDTemplate is valid and a device is found and identified the DLL copies a device ID to the buffer.
[in,out]pBufferSizeAs an input, the value contains the size of the buffer that is passed through the pDeviceID parameter. On successful return, this parameter contains the number of bytes written into the buffer, including the NULL termination character. On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write the data text.
[out]pCookieA token supplied by the driver dll which must be handed in by all functions called later to access the device. The dll's implementation can use this token to cache information about the connected device thus avoiding to have to parse the deviceID again. Note that the cookie value must not be 0.
[in]TimeOutA timeout value in [ms] used during accessing the device. Note that the execution of the function itself can take longer than TimeOut because more than one access might be necessary.
Returns
At completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_BUFFER_TOO_SMALLThe pDeviceID buffer is too small
CL_ERR_INVALID_DEVICEIDThe DeviceID is not recognized as valid by this dll
CL_ERR_NO_DEVICE_FOUNDThere was no device found matching the DeviceID

◆ clpReadRegister()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpReadRegister ( ISerial pSerial,
const CLUINT32  Cookie,
const CLINT64  Address,
CLINT8 pBuffer,
const CLINT64  BufferSize,
const CLUINT32  TimeOut 
)

This function reads numBytes from the serial device referred to by serialRef. clSerialRead will return when numBytes are available at the serial port or when the serialTimeout period has passed.

Upon success, numBytes are copied into buffer. In the case of any error, including CL_ERR_TIMEOUT, no data is copied into buffer.

Parameters
[in]pSerialThe interface giving access to the serial port
[in]CookieToken supplied by the driver dll via the clpProbeDevice function.
[in]AddressAddress the data is to be read from
[out]pBufferPoints to a user-allocated buffer. Upon a successful call, buffer contains the data read from the serial device.
Caller should ensure that buffer is at least numBytes in size.
[in]BufferSizeThis is the number of bytes requested by the caller.
[in]TimeOutA timeout value in [ms] used during accessing the device. Note that there may be specific commands which may take longer than TimeOut to be accessed. Since clpReadRegister is missing a CL_ERR_PENDING_WRITE mechanism the CLProcotol DLL may be forced for these commands to delay the return for more than TimeOut.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid

◆ clpSetParam()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpSetParam ( ISerial pSerial,
CLP_PARAMS  param,
const CLUINT32  Cookie,
const CLINT8 pBuffer,
const CLINT64  BufferSize,
const CLUINT32  TimeOut 
)

This function is call to change a CLProtocol parameter value.

Parameters
[in]paramThe parameter to be changed.
[in]CookieToken supplied by the driver dll via the clpProbeDevice function. Some parameters ignore the Cookie.
[in]pBufferPoints to a buffer containing the data to be written
[in]BufferSizeThis is the number of bytes in the buffer. Caller must ensure that buffer size match the parameters size.
[in]TimeOutA timeout value in [ms] used during accessing the device.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_PARAM_NOT_SUPPORTEDThe parameters is not supported

◆ clpWriteRegister()

CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpWriteRegister ( ISerial pSerial,
const CLUINT32  Cookie,
const CLINT64  Address,
const CLINT8 pBuffer,
const CLINT64  BufferSize,
const CLUINT32  TimeOut 
)

This function writes numBytes to the serial device referred to by serialRef. clSerialRead will return when numBytes are available at the serial port or when the serialTimeout period has passed.

Upon success, numBytes are copied into buffer. In the case of any error, including CL_ERR_TIMEOUT, no data is copied into buffer.

Parameters
[in]pSerialThe interface giving access to the serial port
[in]CookieManToken supplied by the driver dll via the clpProbeDevice function.
[in]AddressAddress the data is to be read from
[in]pBufferPoints to a containing the data to be written Caller should ensure that buffer is at least BufferSize in size.
[in]BufferSizeThis is the number of bytes to be written.
[in]TimeOutA timeout value in [ms] used during accessing the device. If the CLProtocol DLL knowns for specific registers that accessing them will take longer than TiemOut for a good reason, e.g., because some re-calibration is triggered, it can use the CL_ERR_PENDING_WRITE mechanism to inform the client abou this and prolong the waiting time.
Returns
On completion, this function returns one of the following status codes:
Return values
CL_ERR_NO_ERRNo error occurred
CL_ERR_TIMEOUTA timeout occurred
CL_ERR_INVALID_COOKIEThe cookie supplied is invalid
CL_ERR_PENDING_WRITEThe timeout has expired but the write is still pending for a good reason. The next call must be clpContinueWriteRegister


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:12