![]() |
PUCLIB 1.4.0.0
PHOTRON USB Control Library
|
Go to the source code of this file.
Data Structures | |
struct | PUC_DETECT_INFO |
Structure for storing device search results. More... | |
struct | PUC_RESO_LIMIT_INFO |
Structure for storing resolution limit values. More... | |
struct | PUC_FRAMERATE_LIMIT_INFO |
Structure for storing framerate limit values. More... | |
struct | PUC_XFER_DATA_INFO |
Structure for storing the information of transfer data. More... | |
Macros | |
#define | PUC_MAX_DEVICE 16 |
Maximum number of connectable devices. More... | |
#define | PUC_MAX_LEN 256 |
Maximum number of characters. More... | |
#define | PUC_Q_COUNT 64 |
Quantization table count (8*8) More... | |
#define | PUC_MIN_RING_BUF_COUNT 4 |
Minimum ring buffer count for continuous transfer. More... | |
#define | PUC_MAX_RING_BUF_COUNT 65535 |
Maximum ring buffer count for continuous transfer. More... | |
#define | PUC_XFER_TIMEOUT_AUTO 0 |
Mode for automatically setting the timeout duration (ms) based on the frame rate when no response is received from the device. More... | |
#define | PUC_XFER_TIMEOUT_INFINITE 0xFFFFFFFF |
Mode for setting the timeout duration (ms) to infinite when no response is received from the device. More... | |
#define | PUC_SYNC_OUT_MAGNIFICATION_0_5 0 |
Constant value expressing the output magnification rate of synchronization signal is 0.5. More... | |
#define | PUC_MAX_DECODE_THREAD_COUNT 32 |
Constant value expressing the thread count for multi thread decoding. More... | |
#define | PUC_CHK_SUCCEEDED(res) (res == PUC_SUCCEEDED) |
The macro to be positive when an error code is normal. More... | |
#define | PUC_CHK_FAILED(res) (res != PUC_SUCCEEDED) |
The macro to be positive when an error code is not normal. More... | |
Typedefs | |
typedef void * | PUC_HANDLE |
Device handle. More... | |
typedef PUC_HANDLE * | PPUC_HANDLE |
Pointer for the device handle. More... | |
typedef struct PUC_DETECT_INFO * | PPUC_DETECT_INFO |
typedef struct PUC_RESO_LIMIT_INFO * | PPUC_RESO_LIMIT_INFO |
typedef struct PUC_FRAMERATE_LIMIT_INFO * | PPUC_FRAMERATE_LIMIT_INFO |
typedef struct PUC_XFER_DATA_INFO * | PPUC_XFER_DATA_INFO |
typedef void(* | RECIEVE_CALLBACK) (PPUC_XFER_DATA_INFO, void *) |
The callback function type called during continuous transfer. More... | |
Functions | |
PUCRESULT WINAPI | PUC_Initialize () |
This initializes the library. More... | |
PUCRESULT WINAPI | PUC_DetectDevice (PPUC_DETECT_INFO pDetectInfo) |
This searches for the device. More... | |
PUCRESULT WINAPI | PUC_OpenDevice (UINT32 nDeviceNo, PPUC_HANDLE pDeviceHandle) |
This opens the device. More... | |
PUCRESULT WINAPI | PUC_CloseDevice (PUC_HANDLE hDevice) |
This closes the device. More... | |
PUCRESULT WINAPI | PUC_GetColorType (PUC_HANDLE hDevice, PUC_COLOR_TYPE *pType) |
This retrieves color/monochrome information of the device. More... | |
PUCRESULT WINAPI | PUC_GetDeviceName (PUC_HANDLE hDevice, UINT32 *pName) |
This retrieves the device name. More... | |
PUCRESULT WINAPI | PUC_GetDeviceType (PUC_HANDLE hDevice, UINT32 *pType) |
This retrieves the device type. More... | |
PUCRESULT WINAPI | PUC_GetDeviceVersion (PUC_HANDLE hDevice, UINT32 *pVersion) |
This retrieves device version information. More... | |
PUCRESULT WINAPI | PUC_GetSerialNo (PUC_HANDLE hDevice, UINT64 *pSerialNo) |
This retrieves the device serial number. More... | |
PUCRESULT WINAPI | PUC_GetResolution (PUC_HANDLE hDevice, UINT32 *pWidth, UINT32 *pHeight) |
This retrieves the device resolution. More... | |
PUCRESULT WINAPI | PUC_GetMaxResolution (PUC_HANDLE hDevice, UINT32 *pCurMaxWidth, UINT32 *pCurMaxHeight) |
This retrieves the maximum resolution setting allowed for the current frame rate of the device. More... | |
PUCRESULT WINAPI | PUC_GetResolutionLimit (PUC_HANDLE hDevice, PPUC_RESO_LIMIT_INFO pLimitInfo) |
This retrieves the resolution limit for the device, and minimum unit for altering the resolution. More... | |
PUCRESULT WINAPI | PUC_SetResolution (PUC_HANDLE hDevice, UINT32 nWidth, UINT32 nHeight) |
This sets the device resolution. More... | |
PUCRESULT WINAPI | PUC_GetQuantization (PUC_HANDLE hDevice, UINT32 nPoint, USHORT *pVal) |
This retrieves one set of quantization table data stored to the device. More... | |
PUCRESULT WINAPI | PUC_SetQuantization (PUC_HANDLE hDevice, UINT32 nPoint, USHORT nVal) |
This overwrites one set of quantization table data stored to the device. More... | |
PUCRESULT WINAPI | PUC_GetFanState (PUC_HANDLE hDevice, PUC_MODE *pState) |
This retrieves the state of the device fan. More... | |
PUCRESULT WINAPI | PUC_SetFanState (PUC_HANDLE hDevice, PUC_MODE nState) |
This sets the state of the device fan. More... | |
PUCRESULT WINAPI | PUC_GetSyncInMode (PUC_HANDLE hDevice, PUC_SYNC_MODE *pMode, PUC_SIGNAL *pSignal) |
This retrieves the synchronous signal input mode for the device. More... | |
PUCRESULT WINAPI | PUC_SetSyncInMode (PUC_HANDLE hDevice, PUC_SYNC_MODE nMode, PUC_SIGNAL nSignal) |
This sets the synchronous signal input mode for the device. More... | |
PUCRESULT WINAPI | PUC_GetSyncOutSignal (PUC_HANDLE hDevice, PUC_SIGNAL *pSignal) |
This retrieves the synchronization signal output polarity for the device. More... | |
PUCRESULT WINAPI | PUC_SetSyncOutSignal (PUC_HANDLE hDevice, PUC_SIGNAL nSignal) |
This sets the synchronous signal output polarity for the device. More... | |
PUCRESULT WINAPI | PUC_GetSyncOutDelay (PUC_HANDLE hDevice, UINT32 *pDelay) |
This retrieves the delay value of device's synchronization signal output in nsec. The value less than 100nsec is rounded up, so an error will occur. More... | |
PUCRESULT WINAPI | PUC_SetSyncOutDelay (PUC_HANDLE hDevice, UINT32 nDelay) |
This sets the delay value of device's synchronization signal output in nsec. More... | |
PUCRESULT WINAPI | PUC_GetSyncOutWidth (PUC_HANDLE hDevice, UINT32 *pWidth) |
This retrieves the output width of synchronization signal for the device. If it is less than 100nsec, it will be rounded up and an error will occur. More... | |
PUCRESULT WINAPI | PUC_SetSyncOutWidth (PUC_HANDLE hDevice, UINT32 nWidth) |
This sets the output width of synchronization signal for the device. More... | |
PUCRESULT WINAPI | PUC_GetSyncOutMagnification (PUC_HANDLE hDevice, UINT32 *pMagnification) |
This retrieves the output magnification rate for the synchronization signal. More... | |
PUCRESULT WINAPI | PUC_SetSyncOutMagnification (PUC_HANDLE hDevice, UINT32 nMagnification) |
This sets the output magnification rate for the synchronization signal. More... | |
PUCRESULT WINAPI | PUC_GetLEDMode (PUC_HANDLE hDevice, PUC_MODE *pMode) |
This retrieves the LED state of the device. More... | |
PUCRESULT WINAPI | PUC_SetLEDMode (PUC_HANDLE hDevice, PUC_MODE nMode) |
This sets the LED state of the device. More... | |
PUCRESULT WINAPI | PUC_GetSensorTemperature (PUC_HANDLE hDevice, UINT32 *pTemp) |
This retrieves the device sensor temperature. More... | |
PUCRESULT WINAPI | PUC_GetXferDataMode (PUC_HANDLE hDevice, PUC_DATA_MODE *pDataMode) |
This retrieves the data transfer mode of the device. More... | |
PUCRESULT WINAPI | PUC_SetXferDataMode (PUC_HANDLE hDevice, PUC_DATA_MODE nDataMode) |
This sets the data transfer mode of the device. More... | |
PUCRESULT WINAPI | PUC_GetXferDataSize (PUC_HANDLE hDevice, PUC_DATA_MODE nDataMode, UINT32 *pDataSize) |
This retrieves the size of transfer data from the device. More... | |
PUCRESULT WINAPI | PUC_GetMaxXferDataSize (PUC_HANDLE hDevice, PUC_DATA_MODE nDataMode, UINT32 *pDataSize) |
This retrieves the maximum size of transfer data from the device. More... | |
PUCRESULT WINAPI | PUC_GetSingleXferData (PUC_HANDLE hDevice, PPUC_XFER_DATA_INFO pXferData) |
This retrieves the current live image from the device. More... | |
PUCRESULT WINAPI | PUC_BeginXferData (PUC_HANDLE hDevice, RECIEVE_CALLBACK callback, void *arg) |
This starts continuous transfer. More... | |
PUCRESULT WINAPI | PUC_EndXferData (PUC_HANDLE hDevice) |
This finishes continuous transfer. More... | |
PUCRESULT WINAPI | PUC_IsXferring (PUC_HANDLE hDevice, BOOL *pIsXferring) |
This checks whether a continuous transfer is in progress. More... | |
PUCRESULT WINAPI | PUC_ExtractSequenceNo (const PUCHAR pData, UINT32 nWidth, UINT32 nHeight, PUSHORT pSeqNo) |
This extracts the sequence number from the compressed image data. More... | |
PUCRESULT WINAPI | PUC_DecodeData (PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals) |
This unpacks the compressed image data to luminance data. More... | |
PUCRESULT WINAPI | PUC_DecodeDataMultiThread (PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals, UINT32 nThreadCount) |
This unpacks the compressed image data to luminance data. This process is multithreaded. More... | |
PUCRESULT WINAPI | PUC_DecodeDCTData (PINT16 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals) |
This unpacks the compressed image data to DCT coefficients. More... | |
PUCRESULT WINAPI | PUC_DecodeDCData (PUINT8 pDst, UINT32 nBlockX, UINT32 nBlockY, UINT32 nBlockCountX, UINT32 nBlockCountY, const PUINT8 pSrc) |
Decodes the DC component of compressed image data. More... | |
PUCRESULT WINAPI | PUC_GetRingBufferCount (PUC_HANDLE hDevice, UINT32 *pCount) |
This retrieves the ring buffer count for continuous transfer. More... | |
PUCRESULT WINAPI | PUC_SetRingBufferCount (PUC_HANDLE hDevice, UINT32 nCount) |
This sets the ring buffer count for continuous transfer. More... | |
PUCRESULT WINAPI | PUC_GetXferTimeOut (PUC_HANDLE hDevice, UINT32 *pSingleXferTimeOut, UINT32 *pContinuousXferTimeOut) |
This retrieves the timeout duration (ms) for data transfer from the device. More... | |
PUCRESULT WINAPI | PUC_SetXferTimeOut (PUC_HANDLE hDevice, UINT32 nSingleXferTimeOut, UINT32 nContinuousXferTimeOut) |
This sets the timeout duration (ms) for data transfer from the device. More... | |
PUCRESULT WINAPI | PUC_GetMaxFramerate (PUC_HANDLE hDevice, UINT32 *pFramerate) |
This retrieves the maximum framerate for the current resolution. More... | |
PUCRESULT WINAPI | PUC_GetFramerateLimit (PUC_HANDLE hDevice, PPUC_FRAMERATE_LIMIT_INFO pLimitInfo) |
This retrieves the framerate limit information. More... | |
PUCRESULT WINAPI | PUC_GetFramerateShutter (PUC_HANDLE hDevice, UINT32 *pFramerate, UINT32 *pShutterSpeedFps) |
This retrieves the framerate and the shutter speed (1/fps) for the device. More... | |
PUCRESULT WINAPI | PUC_SetFramerateShutter (PUC_HANDLE hDevice, UINT32 nFramerate, UINT32 nShutterSpeedFps) |
This sets the framerate and the shutter speed (1/fps) for the device. More... | |
PUCRESULT WINAPI | PUC_GetExposeTime (PUC_HANDLE hDevice, UINT32 *pExpOnTime, UINT32 *pExpOffTime) |
This retrieves the exposure/non-exposure time of the device. More... | |
PUCRESULT WINAPI | PUC_GetMinExposeTime (PUC_HANDLE hDevice, UINT32 *pMinExpOnTime, UINT32 *pMinExpOffTime) |
This retrieves the minimum exposure/non-exposure time of the device. If it is less than 100nsec, it will be rounded up and an error will occur. More... | |
PUCRESULT WINAPI | PUC_SetExposeTime (PUC_HANDLE hDevice, UINT32 nExpOnTime, UINT32 nExpOffTime) |
This sets the exposure/non-exposure time of the device. More... | |
PUCRESULT WINAPI | PUC_ResetDevice (UINT32 nDeviceNo) |
This resets the device. More... | |
PUCRESULT WINAPI | PUC_ResetSequenceNo (PUC_HANDLE hDevice) |
This resets the sequence number. More... | |
#define PUC_CHK_FAILED | ( | res | ) | (res != PUC_SUCCEEDED) |
#define PUC_CHK_SUCCEEDED | ( | res | ) | (res == PUC_SUCCEEDED) |
#define PUC_MAX_DECODE_THREAD_COUNT 32 |
#define PUC_MAX_DEVICE 16 |
#define PUC_MAX_RING_BUF_COUNT 65535 |
#define PUC_MIN_RING_BUF_COUNT 4 |
#define PUC_SYNC_OUT_MAGNIFICATION_0_5 0 |
#define PUC_XFER_TIMEOUT_AUTO 0 |
#define PUC_XFER_TIMEOUT_INFINITE 0xFFFFFFFF |
typedef struct PUC_DETECT_INFO * PPUC_DETECT_INFO |
typedef struct PUC_FRAMERATE_LIMIT_INFO * PPUC_FRAMERATE_LIMIT_INFO |
typedef PUC_HANDLE* PPUC_HANDLE |
typedef struct PUC_RESO_LIMIT_INFO * PPUC_RESO_LIMIT_INFO |
typedef struct PUC_XFER_DATA_INFO * PPUC_XFER_DATA_INFO |
typedef void* PUC_HANDLE |
typedef void(* RECIEVE_CALLBACK) (PPUC_XFER_DATA_INFO, void *) |
enum PUC_COLOR_TYPE |
enum PUC_DATA_MODE |
enum PUC_MODE |
enum PUC_SIGNAL |
enum PUC_SYNC_MODE |
enum PUCRESULT |
Error code.
PUCRESULT WINAPI PUC_BeginXferData | ( | PUC_HANDLE | hDevice, |
RECIEVE_CALLBACK | callback, | ||
void * | arg | ||
) |
This starts continuous transfer.
If the callback function takes a long time to process, sequential image data will be stored to the ring buffer set in PUC_SetRingBufferCount.
If the ring buffer is used up, it will wait until the callback function process is complete. Be aware that any data received during this period will not be stored to the buffer. (Dropped frames)
[in] | hDevice | The device handle to be controlled |
[in] | callback | This callback function is called every time an image is received from the device in the SDK. |
[in] | arg | The argument passed to the callback function |
PUCRESULT WINAPI PUC_CloseDevice | ( | PUC_HANDLE | hDevice | ) |
This closes the device.
An error will be returned when specifying an unopened device.
[in] | hDevice | The device handle to be closed |
PUCRESULT WINAPI PUC_DecodeData | ( | PUINT8 | pDst, |
UINT32 | nX, | ||
UINT32 | nY, | ||
UINT32 | nWidth, | ||
UINT32 | nHeight, | ||
UINT32 | nLineBytes, | ||
const PUINT8 | pSrc, | ||
const PUSHORT | pQVals | ||
) |
This unpacks the compressed image data to luminance data.
[out] | pDst | The buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) |
[in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
[in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
[in] | nWidth | The width for unpacking |
[in] | nHeight | The height for unpacking |
[in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination |
[in] | pSrc | The compressed image data |
[in] | pQVals | A quantization table |
PUCRESULT WINAPI PUC_DecodeDataMultiThread | ( | PUINT8 | pDst, |
UINT32 | nX, | ||
UINT32 | nY, | ||
UINT32 | nWidth, | ||
UINT32 | nHeight, | ||
UINT32 | nLineBytes, | ||
const PUINT8 | pSrc, | ||
const PUSHORT | pQVals, | ||
UINT32 | nThreadCount | ||
) |
This unpacks the compressed image data to luminance data. This process is multithreaded.
[out] | pDst | The buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) |
[in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
[in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
[in] | nWidth | The width for unpacking |
[in] | nHeight | The height for unpacking |
[in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination |
[in] | pSrc | The compressed image data |
[in] | pQVals | A quantization table |
[in] | nThreadCount | The number of threads to process in multiple threads. |
PUCRESULT WINAPI PUC_DecodeDCData | ( | PUINT8 | pDst, |
UINT32 | nBlockX, | ||
UINT32 | nBlockY, | ||
UINT32 | nBlockCountX, | ||
UINT32 | nBlockCountY, | ||
const PUINT8 | pSrc | ||
) |
Decodes the DC component of compressed image data.
[out] | pDst | The buffer at the decoding destination. Must be allocated for the total number of blocks included in the decoding range. |
[in] | nBlockX | The block coordinates X for starting decoding |
[in] | nBlockY | The block coordinates Y for starting decoding |
[in] | nBlockCountX | Number of blocks in the X direction to be decoded |
[in] | nBlockCountY | Number of blocks in the Y direction to be decoded |
[in] | pSrc | The compressed image data |
PUCRESULT WINAPI PUC_DecodeDCTData | ( | PINT16 | pDst, |
UINT32 | nX, | ||
UINT32 | nY, | ||
UINT32 | nWidth, | ||
UINT32 | nHeight, | ||
UINT32 | nLineBytes, | ||
const PUINT8 | pSrc, | ||
const PUSHORT | pQVals | ||
) |
This unpacks the compressed image data to DCT coefficients.
[out] | pDst | The buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least) |
[in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
[in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
[in] | nWidth | The width for unpacking |
[in] | nHeight | The height for unpacking |
[in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination |
[in] | pSrc | The compressed image data |
[in] | pQVals | A quantization table |
PUCRESULT WINAPI PUC_DetectDevice | ( | PPUC_DETECT_INFO | pDetectInfo | ) |
This searches for the device.
If the device number is already identified, the device can also be opened without searching it.
[out] | pDetectInfo | Stores the information of detected device. |
PUCRESULT WINAPI PUC_EndXferData | ( | PUC_HANDLE | hDevice | ) |
This finishes continuous transfer.
[in] | The | device handle to be controlled |
PUCRESULT WINAPI PUC_ExtractSequenceNo | ( | const PUCHAR | pData, |
UINT32 | nWidth, | ||
UINT32 | nHeight, | ||
PUSHORT | pSeqNo | ||
) |
This extracts the sequence number from the compressed image data.
[in] | pData | The compressed image data |
[in] | nWidth | The image width |
[in] | nHeight | The image height |
[out] | pSeqNo | The storage destination for the sequence number extracted |
PUCRESULT WINAPI PUC_GetColorType | ( | PUC_HANDLE | hDevice, |
PUC_COLOR_TYPE * | pType | ||
) |
This retrieves color/monochrome information of the device.
[in] | hDevice | The device handle to be controlled |
[out] | pType | The storage destination for color/monochrome information |
PUCRESULT WINAPI PUC_GetDeviceName | ( | PUC_HANDLE | hDevice, |
UINT32 * | pName | ||
) |
This retrieves the device name.
[in] | hDevice | The device handle to be controlled |
[out] | pID | The storage destination for the device name |
PUCRESULT WINAPI PUC_GetDeviceType | ( | PUC_HANDLE | hDevice, |
UINT32 * | pType | ||
) |
This retrieves the device type.
[in] | hDevice | The device handle to be controlled |
[out] | pID | The storage destination for the device type |
PUCRESULT WINAPI PUC_GetDeviceVersion | ( | PUC_HANDLE | hDevice, |
UINT32 * | pVersion | ||
) |
This retrieves device version information.
[in] | hDevice | The device handle to be controlled |
[out] | pVersion | The storage destination for the version number |
PUCRESULT WINAPI PUC_GetExposeTime | ( | PUC_HANDLE | hDevice, |
UINT32 * | pExpOnTime, | ||
UINT32 * | pExpOffTime | ||
) |
This retrieves the exposure/non-exposure time of the device.
The return value of this function will change if the frame rate and shutter speed is changed with PUC_SetFramerateShutter function.
Changing the exposure/non-exposure time resets the output magnification rate of synchronization signal to x1.
If it is less than 100nsec, it will be rounded up and an error will occur.
[in] | hDevice | The device handle to be controlled |
[out] | pExpOnTime | The storage destination for the exposure period (nsec units) |
[out] | pExpOffTime | The storage destination for the non-exposure period (nsec units) |
PUCRESULT WINAPI PUC_GetFanState | ( | PUC_HANDLE | hDevice, |
PUC_MODE * | pState | ||
) |
This retrieves the state of the device fan.
[in] | hDevice | The device handle to be controlled |
[out] | nState | The storage destination for the fan state (ON/OFF) |
PUCRESULT WINAPI PUC_GetFramerateLimit | ( | PUC_HANDLE | hDevice, |
PPUC_FRAMERATE_LIMIT_INFO | pLimitInfo | ||
) |
This retrieves the framerate limit information.
[in] | hDevice | The device handle to be controlled. |
[out] | pLimitInfo | Structure for storing framerate limit values. |
PUCRESULT WINAPI PUC_GetFramerateShutter | ( | PUC_HANDLE | hDevice, |
UINT32 * | pFramerate, | ||
UINT32 * | pShutterSpeedFps | ||
) |
This retrieves the framerate and the shutter speed (1/fps) for the device.
Note that the return value with this function will be invalid if the exposure/non-exposure time is set directly with PUC_SetExposeTime function.
[in] | hDevice | The device handle to be controlled |
[out] | pFramerate | The storage destination for the framerate |
[out] | pShutterSpeedFps | The storage destination for the shutter speed (1/fps) |
PUCRESULT WINAPI PUC_GetLEDMode | ( | PUC_HANDLE | hDevice, |
PUC_MODE * | pMode | ||
) |
This retrieves the LED state of the device.
[in] | hDevice | The device handle to be controlled |
[out] | pMode | The storage destination for the LED state (ON/OFF) |
PUCRESULT WINAPI PUC_GetMaxFramerate | ( | PUC_HANDLE | hDevice, |
UINT32 * | pFramerate | ||
) |
This retrieves the maximum framerate for the current resolution.
[in] | hDevice | The device handle to be controlled |
[out] | pFramerate | The storage destination for the maximum framerate |
PUCRESULT WINAPI PUC_GetMaxResolution | ( | PUC_HANDLE | hDevice, |
UINT32 * | pCurMaxWidth, | ||
UINT32 * | pCurMaxHeight | ||
) |
This retrieves the maximum resolution setting allowed for the current frame rate of the device.
[in] | hDevice | The device handle to be controlled |
[out] | pCurMaxWidth | The storage destination for the maximum horizontal resolution setting allowed for the current framerate |
[out] | pCurMaxHeight | The storage destination for the maximum vertical resolution setting allowed for the current framerate |
PUCRESULT WINAPI PUC_GetMaxXferDataSize | ( | PUC_HANDLE | hDevice, |
PUC_DATA_MODE | nDataMode, | ||
UINT32 * | pDataSize | ||
) |
This retrieves the maximum size of transfer data from the device.
This will vary depending on the current resolution.
[in] | hDevice | The device handle to be controlled |
[in] | nDataMode | The data mode. The data size for the mode specified here will be returned. |
[out] | pDataSize | The storage destination for the maximum data size |
PUCRESULT WINAPI PUC_GetMinExposeTime | ( | PUC_HANDLE | hDevice, |
UINT32 * | pMinExpOnTime, | ||
UINT32 * | pMinExpOffTime | ||
) |
This retrieves the minimum exposure/non-exposure time of the device.
If it is less than 100nsec, it will be rounded up and an error will occur.
[in] | hDevice | The device handle to be controlled |
[out] | pMinExpOnTime | The storage destination for the minimum exposure period (nsec units) |
[out] | pMinExpOffTime | The storage destination for the minimum non-exposure period (nsec units) |
PUCRESULT WINAPI PUC_GetQuantization | ( | PUC_HANDLE | hDevice, |
UINT32 | nPoint, | ||
USHORT * | pVal | ||
) |
This retrieves one set of quantization table data stored to the device.
The number of quantization tables is defined in PUC_Q_COUNT.
[in] | hDevice | The device handle to be controlled |
[in] | nPoint | The position of the quantization table |
[out] | pVal | The storage destination of the quantization table data |
PUCRESULT WINAPI PUC_GetResolution | ( | PUC_HANDLE | hDevice, |
UINT32 * | pWidth, | ||
UINT32 * | pHeight | ||
) |
This retrieves the device resolution.
[in] | hDevice | The device handle to be controlled |
[out] | pWidth | The storage destination for the horizontal resolution |
[out] | pHeight | The storage destination for the vertical resolution |
PUCRESULT WINAPI PUC_GetResolutionLimit | ( | PUC_HANDLE | hDevice, |
PPUC_RESO_LIMIT_INFO | pLimitInfo | ||
) |
This retrieves the resolution limit for the device, and minimum unit for altering the resolution.
[in] | hDevice | The device handle to be controlled |
[out] | pLimitInfo | The storage destination for resolution limit, and minimum unit for altering the resolution |
PUCRESULT WINAPI PUC_GetRingBufferCount | ( | PUC_HANDLE | hDevice, |
UINT32 * | pCount | ||
) |
This retrieves the ring buffer count for continuous transfer.
[in] | hDevice | The device handle to be controlled |
[out] | pCount | The storage destination for the buffer count |
PUCRESULT WINAPI PUC_GetSensorTemperature | ( | PUC_HANDLE | hDevice, |
UINT32 * | pTemp | ||
) |
This retrieves the device sensor temperature.
[in] | hDevice | The device handle to be controlled |
[out] | pTemp | The storage destination for the sensor temperature |
PUCRESULT WINAPI PUC_GetSerialNo | ( | PUC_HANDLE | hDevice, |
UINT64 * | pSerialNo | ||
) |
This retrieves the device serial number.
[in] | hDevice | The device handle to be controlled |
[out] | pSerialNo | The storage destination for the serial number |
PUCRESULT WINAPI PUC_GetSingleXferData | ( | PUC_HANDLE | hDevice, |
PPUC_XFER_DATA_INFO | pXferData | ||
) |
This retrieves the current live image from the device.
The image may appear fuzzy during continuous transfer.
Retrieve the size of the image data with PUC_GetXferDataSize.
The type of images to be retrieved can be set with PUC_SetXferDataMode.
Compressed data can be unpacked to luminace data with PUC_DecodeData.
[in] | hDevice | The device handle to be controlled |
[out] | pXferData | The storage destination for transfer data. Retrieve the required memory size with PUC_GetXferDataSize. When using PUC_DATA_DECOMPRESSED_GRAY, a size rounded up to a multiple of 4 must be allocated for the width. |
PUCRESULT WINAPI PUC_GetSyncInMode | ( | PUC_HANDLE | hDevice, |
PUC_SYNC_MODE * | pMode, | ||
PUC_SIGNAL * | pSignal | ||
) |
This retrieves the synchronous signal input mode for the device.
[in] | hDevice | The device handle to be controlled |
[out] | pMode | The storage destination for the synchronous signal input mode (Internal/External) |
[out] | pSignal | The storage destination for the polarity (positive polarity/negative polarity), It can be obtained only when external synchronization is set. |
PUCRESULT WINAPI PUC_GetSyncOutDelay | ( | PUC_HANDLE | hDevice, |
UINT32 * | pDelay | ||
) |
This retrieves the delay value of device's synchronization signal output in nsec.
The value less than 100nsec is rounded up, so an error will occur.
[in] | hDevice | The device handle to be controlled |
[out] | pDelay | The storage destination for the delay amount (nsec units) |
PUCRESULT WINAPI PUC_GetSyncOutMagnification | ( | PUC_HANDLE | hDevice, |
UINT32 * | pMagnification | ||
) |
This retrieves the output magnification rate for the synchronization signal.
[in] | hDevice | The device handle to be controlled |
[out] | pMagnification | The storage destination for the output magnification |
PUCRESULT WINAPI PUC_GetSyncOutSignal | ( | PUC_HANDLE | hDevice, |
PUC_SIGNAL * | pSignal | ||
) |
This retrieves the synchronization signal output polarity for the device.
[in] | hDevice | The device handle to be controlled |
[out] | pSignal | The storage destination for the polarity (positive polarity/negative polarity) |
PUCRESULT WINAPI PUC_GetSyncOutWidth | ( | PUC_HANDLE | hDevice, |
UINT32 * | pWidth | ||
) |
This retrieves the output width of synchronization signal for the device.
If it is less than 100nsec, it will be rounded up and an error will occur.
[in] | hDevice | The device handle to be controlled |
[out] | pWidth | The storage destination for the output width (nsec units) |
PUCRESULT WINAPI PUC_GetXferDataMode | ( | PUC_HANDLE | hDevice, |
PUC_DATA_MODE * | pDataMode | ||
) |
This retrieves the data transfer mode of the device.
[in] | hDevice | The device handle to be controlled |
[out] | pDataMode | The storage destination for the data mode |
PUCRESULT WINAPI PUC_GetXferDataSize | ( | PUC_HANDLE | hDevice, |
PUC_DATA_MODE | nDataMode, | ||
UINT32 * | pDataSize | ||
) |
This retrieves the size of transfer data from the device.
This will vary depending on the current resolution.
[in] | hDevice | The device handle to be controlled |
[in] | nDataMode | The data mode. The data size for the mode specified here will be returned. |
[out] | pDataSize | The storage destination for the data size |
PUCRESULT WINAPI PUC_GetXferTimeOut | ( | PUC_HANDLE | hDevice, |
UINT32 * | pSingleXferTimeOut, | ||
UINT32 * | pContinuousXferTimeOut | ||
) |
This retrieves the timeout duration (ms) for data transfer from the device.
[in] | hDevice | The device handle to be controlled |
[out] | pSingleXferTimeOut | The storage destination for the timeout duration (ms) for a single transfer |
[out] | pContinuousXferTimeOut | The storage destination for the timeout duration (ms) for continuous transfer |
PUCRESULT WINAPI PUC_Initialize | ( | ) |
This initializes the library.
Only use this function once the first time PUCLIB is used.
The termination operation is automatically performed when a process is terminated.
PUCRESULT WINAPI PUC_IsXferring | ( | PUC_HANDLE | hDevice, |
BOOL * | pIsXferring | ||
) |
This checks whether a continuous transfer is in progress.
[in] | hDevice | The device handle to be controlled |
[out] | pIsXferring | If a continuous transfer is in progress this will be TRUE, if not this will be FALSE. |
PUCRESULT WINAPI PUC_OpenDevice | ( | UINT32 | nDeviceNo, |
PPUC_HANDLE | pDeviceHandle | ||
) |
This opens the device.
Note that specifying a device number of the opened device closes the device temporarily.
[in] | nDeviceNo | Specify the retrieved device ID here. |
[out] | pDeviceHandle | Stores the handle to control the opened device. |
PUCRESULT WINAPI PUC_ResetDevice | ( | UINT32 | nDeviceNo | ) |
This resets the device.
There is possibility for PUC_OpenDevice to return error even though device is detected. Please set this to resets device.
[in] | nDeviceNo | Specify the retrieved device ID here. |
PUCRESULT WINAPI PUC_ResetSequenceNo | ( | PUC_HANDLE | hDevice | ) |
This resets the sequence number.
[in] | hDevice | The device handle to be controlled |
PUCRESULT WINAPI PUC_SetExposeTime | ( | PUC_HANDLE | hDevice, |
UINT32 | nExpOnTime, | ||
UINT32 | nExpOffTime | ||
) |
This sets the exposure/non-exposure time of the device.
Opening the device will reset this setting.
Note that the return value of PUC_GetFramerateShutter function will be invalid if the exposure/non-exposure time is set directly with this function.
If it is less than 100nsec, it will be rounded up and an error will occur.
[in] | hDevice | The device handle to be controlled |
[in] | nExpOnTime | The exposure period (nsec units) |
[in] | nExpOffTime | The non-exposure period (nsec units) |
PUCRESULT WINAPI PUC_SetFanState | ( | PUC_HANDLE | hDevice, |
PUC_MODE | nState | ||
) |
This sets the state of the device fan.
Restarting the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nState | The fan state (ON/OFF) |
PUCRESULT WINAPI PUC_SetFramerateShutter | ( | PUC_HANDLE | hDevice, |
UINT32 | nFramerate, | ||
UINT32 | nShutterSpeedFps | ||
) |
This sets the framerate and the shutter speed (1/fps) for the device.
Opening the device will reset this setting.
When executing this function, the return value of PUC_GetExposeTime will change.
Changing the frame rate resets the output magnification rate of synchronization signal to x1.
[in] | hDevice | The device handle to be controlled |
[in] | nFramerate | The framerate |
[in] | nShutterSpeedFps | The shutter speed (1/fps) |
PUCRESULT WINAPI PUC_SetLEDMode | ( | PUC_HANDLE | hDevice, |
PUC_MODE | nMode | ||
) |
This sets the LED state of the device.
Restarting the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nMode | The LED state (ON/OFF) |
PUCRESULT WINAPI PUC_SetQuantization | ( | PUC_HANDLE | hDevice, |
UINT32 | nPoint, | ||
USHORT | nVal | ||
) |
This overwrites one set of quantization table data stored to the device.
The number of quantization tables is defined in PUC_Q_COUNT.
Restarting the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nPoint | The position of the quantization table |
[in] | nVal | The quantization table data being set |
PUCRESULT WINAPI PUC_SetResolution | ( | PUC_HANDLE | hDevice, |
UINT32 | nWidth, | ||
UINT32 | nHeight | ||
) |
This sets the device resolution.
Opening the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nWidth | Horizontal resolution |
[in] | nHeight | Vertical resolution |
PUCRESULT WINAPI PUC_SetRingBufferCount | ( | PUC_HANDLE | hDevice, |
UINT32 | nCount | ||
) |
This sets the ring buffer count for continuous transfer.
Opening the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nCount | The buffer count |
PUCRESULT WINAPI PUC_SetSyncInMode | ( | PUC_HANDLE | hDevice, |
PUC_SYNC_MODE | nMode, | ||
PUC_SIGNAL | nSignal | ||
) |
This sets the synchronous signal input mode for the device.
Restarting the device will reset this setting.
Changing the synchronization signal output mode resets the output magnification rate to x1.
When setting to external device synchronization, the exposure time is automatically adjusted considering the variation of external devices. Set the exposure time and framerate before setting the external device synchronization.
[in] | hDevice | The device handle to be controlled |
[in] | nMode | The synchronous signal input mode (Internal/External) |
[in] | nSignal | Polarity (positive/negative), Specifying the polarity is not supported for devices prior to version 1.01. |
PUCRESULT WINAPI PUC_SetSyncOutDelay | ( | PUC_HANDLE | hDevice, |
UINT32 | nDelay | ||
) |
This sets the delay value of device's synchronization signal output in nsec.
Restarting the device will reset this setting.
The value less than 100nsec is rounded up, so an error will occur.
[in] | hDevice | The device handle to be controlled |
[in] | nDelay | The delay (nsec units) |
PUCRESULT WINAPI PUC_SetSyncOutMagnification | ( | PUC_HANDLE | hDevice, |
UINT32 | nMagnification | ||
) |
This sets the output magnification rate for the synchronization signal.
Opening the device will reset this setting.
Changing the frame rate or exposure/non-exposure time also resets the output magnification rate to x1.
[in] | hDevice | The device handle to be controlled |
[in] | nMagnification | The output magnification (e.g.: for 2x set to 2, for 4x set to 4). For 0.5x, set PUC_SYNC_OUT_MAGNIFICATION_0_5. |
PUCRESULT WINAPI PUC_SetSyncOutSignal | ( | PUC_HANDLE | hDevice, |
PUC_SIGNAL | nSignal | ||
) |
This sets the synchronous signal output polarity for the device.
Restarting the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nSignal | The polarity (positive polarity/negative polarity) |
PUCRESULT WINAPI PUC_SetSyncOutWidth | ( | PUC_HANDLE | hDevice, |
UINT32 | nWidth | ||
) |
This sets the output width of synchronization signal for the device.
Restarting the device will reset this setting.
Changing the output width resets the output magnification rate to x1.
If it is less than 100nsec, it will be rounded up and an error will occur.
[in] | hDevice | The device handle to be controlled |
[in] | nWidth | The output width of the synchronous signal (nsec units). |
PUCRESULT WINAPI PUC_SetXferDataMode | ( | PUC_HANDLE | hDevice, |
PUC_DATA_MODE | nDataMode | ||
) |
This sets the data transfer mode of the device.
Opening the device will reset this setting.
[in] | hDevice | The device handle to be controlled |
[in] | nDataMode | The data mode |
PUCRESULT WINAPI PUC_SetXferTimeOut | ( | PUC_HANDLE | hDevice, |
UINT32 | nSingleXferTimeOut, | ||
UINT32 | nContinuousXferTimeOut | ||
) |
This sets the timeout duration (ms) for data transfer from the device.
Opening the device will reset this setting.
Set PUC_XFER_TIMEOUT_AUTO to automatically adjust the timeout duration based on the framerate.
Set PUC_XFER_TIMEOUT_INFINITE to disable timeout.
[in] | hDevice | The device handle to be controlled |
[in] | nSingleXferTimeOut | The timeout duration (ms) for a single transfer |
[in] | nContinuousXferTimeOut | The timeout duration (ms) for continuous transfer |