29 #ifndef CLPROTOCOL_CLSERIAL_H 30 #define CLPROTOCOL_CLSERIAL_H 38 #if (defined(__cplusplus) || defined(__cplusplus__)) 39 #define USER_EXTERN_C extern "C" 44 #ifdef CLSERIAL_EXPORTS 46 #define CLSERIALEXPORT USER_EXTERN_C __declspec(dllexport) 48 #define CLSERIALEXPORT USER_EXTERN_C __attribute__((visibility("default"))) 52 #define CLSERIALEXPORT USER_EXTERN_C __declspec(dllimport) 54 #define CLSERIALEXPORT USER_EXTERN_C __attribute__((visibility("default"))) 61 #define CLSERIALCC __cdecl 63 #if !defined(__x86_64) && !defined(__arm__) && !defined(__aarch64__) && !defined(VXWORKS) 64 #define CLSERIALCC __attribute__((cdecl)) 306 #endif // CLPROTOCOL_CLSERIAL_H
CLSERIALEXPORT CLINT32 CLSERIALCC clSetBaudRate(hSerRef serialRef, CLUINT32 baudRate)
This function sets the baud rate for the serial port of the selected device. Use clGetSupportedBaudRa...
CLSERIALEXPORT CLINT32 CLSERIALCC clGetNumBytesAvail(hSerRef serialRef, CLUINT32 *numBytes)
This function will output how many bytes have are available at the port specified by serialRef...
CLSERIALEXPORT CLINT32 CLSERIALCC clGetSerialPortIdentifier(CLUINT32 serialIndex, CLINT8 *PortID, CLUINT32 *bufferSize)
is passed. On successful return, this parameter contains the number of bytes written into the buffer...
CLSERIALEXPORT CLINT32 CLSERIALCC clGetNumSerialPorts(CLUINT32 *numSerialPorts)
This function returns the number of serial ports in your system from a specified manufacturer. Use this number to determine the number of times you should loop through the clGetSerialPortIdentifier function.
CLSERIALEXPORT CLINT32 CLSERIALCC clSerialInit(CLUINT32 serialIndex, hSerRef *serialRefPtr)
This function initializes the device referred to by serialIndex and returns a pointer to an internal ...
types and constants as used by the Camera Link's API definition
CLSERIALEXPORT CLINT32 CLSERIALCC clGetErrorText(CLINT32 errorCode, CLINT8 *errorText, CLUINT32 *errorTextSize)
This function converts an error code to error text for display in a dialog box or in a standard I/O w...
CLSERIALEXPORT CLINT32 CLSERIALCC clFlushPort(hSerRef serialRef)
This function will discard any bytes that are available in the input buffer.
CLSERIALEXPORT CLINT32 CLSERIALCC clSerialRead(hSerRef serialRef, CLINT8 *buffer, CLUINT32 *bufferSize, CLUINT32 serialTimeOut)
This function reads numBytes from the serial device referred to by serialRef. clSerialRead will retur...
CLSERIALEXPORT void CLSERIALCC clSerialClose(hSerRef serialRef)
This function closes the serial device and cleans up the resources associated with serialRef...
CLSERIALEXPORT CLINT32 CLSERIALCC clGetManufacturerInfo(CLINT8 *ManufacturerName, CLUINT32 *bufferSize, CLUINT32 *version)
This function returns the name of the manufacturer represented by the index parameter and the version...
CLSERIALEXPORT CLINT32 CLSERIALCC clSerialWrite(hSerRef serialRef, CLINT8 *buffer, CLUINT32 *bufferSize, CLUINT32 serialTimeOut)
This function writes the data in the buffer to the serial device referenced by serialRef.
CLSERIALEXPORT CLINT32 CLSERIALCC clGetSupportedBaudRates(hSerRef serialRef, CLUINT32 *baudRates)
This function returns the valid baud rates of the current interface.