Skip to content
⚡ Developer documentation for INFINICAM, the real-time high-speed camera (UC-1.1 / GbE-2)

Device Connection & Capture Settings API

API specifications for managing the connection to an INFINICAM device and controlling its parameters.


PUCRESULT WINAPI PUC_Initialize();

Initializes the SDK library. Call this once when the application starts.

Argument / Return value Type Description
Arguments None -
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_DetectDevice2(const PPUC_DETECT_FILTER pFilter, PPUC_DETECT_INFO pDetectInfo);
PUCRESULT WINAPI PUC_OpenDevice2(UINT32 index, PPUC_HANDLE pDeviceHandle);

Device search and open functions that support both the UC-1.1 (USB connection) and the GbE-2 (Ethernet connection). All C++ / Python samples on this documentation site use this pair of functions.

Argument / Return value Type Description
pFilter PPUC_DETECT_FILTER [in] A structure specifying the search target flags (PUC_DETECT_TARGET_UC1 / PUC_DETECT_TARGET_GBE2 / PUC_DETECT_TARGET_ALL), etc. See Common Constants & Enumerations for details
pDetectInfo PPUC_DETECT_INFO [out] Destination for the detected device information (count, model, IP address, etc.)
index UINT32 [in] Index into pDetectInfo->nDeviceNoList (which of the discovered devices to open)
pDeviceHandle PPUC_HANDLE [out] Destination for the opened device handle
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_CloseDevice(PUC_HANDLE hDevice);

Closes the specified device. This cannot be called from within the callback function of PUC_BeginXferData (it returns PUC_ERROR_XFERRING).

Argument / Return value Type Description
hDevice PUC_HANDLE [in] The device handle to close
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_ResetDevice(UINT32 nDeviceNo);

Performs a hardware reset of the device. Use this for recovery when PUC_OpenDevice2 fails.

Argument / Return value Type Description
nDeviceNo UINT32 [in] The device number to reset
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_IsSupported(PUC_HANDLE hDevice, PUC_CAPABILITY cap, bool* pIsSupported);

Checks whether the connected camera supports the specified feature. Because model-dependent APIs return PUC_ERROR_NOTSUPPORT on unsupported cameras, it is recommended to check support in advance with this function rather than branching on whether the model is a UC-1.1 or GbE-2.

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
cap PUC_CAPABILITY [in] The feature to check (list of feature types)
pIsSupported bool* [out] Destination for the result (true = supported)
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_GetColorType(PUC_HANDLE hDevice, PUC_COLOR_TYPE* pType);

Retrieves whether the camera is a color or monochrome model.

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
pType PUC_COLOR_TYPE* [out] Color type (PUC_COLOR_MONO / PUC_COLOR_COLOR)
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUC_GetDeviceName / PUC_GetDeviceType / PUC_GetDeviceVersion / PUC_GetSerialNo

Section titled “PUC_GetDeviceName / PUC_GetDeviceType / PUC_GetDeviceVersion / PUC_GetSerialNo”
PUCRESULT WINAPI PUC_GetDeviceName(PUC_HANDLE hDevice, UINT32* pName);
PUCRESULT WINAPI PUC_GetDeviceType(PUC_HANDLE hDevice, UINT32* pType);
PUCRESULT WINAPI PUC_GetDeviceVersion(PUC_HANDLE hDevice, UINT32* pVersion);
PUCRESULT WINAPI PUC_GetSerialNo(PUC_HANDLE hDevice, UINT64* pSerialNo);

Retrieves the device’s name, type, version, and serial number.

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
pName / pType / pVersion UINT32* [out] Destination for each respective value
pSerialNo UINT64* [out] Destination for the serial number
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_GetSensorTemperature(PUC_HANDLE hDevice, UINT32* pTemp);

Retrieves the device’s sensor temperature.

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
pTemp UINT32* [out] Destination for the sensor temperature
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUC_GetIPAddress / PUC_GetMacAddress (GbE-2)

Section titled “PUC_GetIPAddress / PUC_GetMacAddress (GbE-2)”
PUCRESULT WINAPI PUC_GetIPAddress(PUC_HANDLE hDevice, UINT32* pIPAddress);
PUCRESULT WINAPI PUC_GetMacAddress(PUC_HANDLE hDevice, UINT8* pMacAddress);

Retrieves the IP address and MAC address of the currently open GbE-2 device.

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
pIPAddress UINT32* [out] Destination for the IP address
pMacAddress UINT8* [out] Destination for the MAC address (PUC_MAC_ADDRESS_SIZE = 6 bytes)
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUC_GetAdaptersInfoList / PUC_DiscoveryDevice (GbE-2)

Section titled “PUC_GetAdaptersInfoList / PUC_DiscoveryDevice (GbE-2)”
PUCRESULT WINAPI PUC_GetAdaptersInfoList(UINT32* pNumAdapters, PPUC_NETWORK_INFO pAdaptersInfo);
PUCRESULT WINAPI PUC_DiscoveryDevice(UINT32 nAdapterIPaddress, UINT32* pNumDetectedDevice, PPUC_NETWORK_INFO pDetectedDevicesInfo);

Retrieves the list of network adapters on the PC, and detailed information (IP, subnet, gateway, MAC address, etc.) about GbE-2 devices found via a broadcast search from the specified adapter. Use this when you want to check the network settings of a device before opening it.

Argument / Return value Type Description
pNumAdapters / pNumDetectedDevice UINT32* [out] Destination for the number of entries retrieved
pAdaptersInfo / pDetectedDevicesInfo PPUC_NETWORK_INFO [out] Destination for the detailed information (array)
nAdapterIPaddress UINT32 [in] The IP address of the adapter to use for the search
Return value PUCRESULT PUC_SUCCEEDED on success / PUC_ERROR_GET_ADAPTER_INFO / PUC_ERROR_DETECT_DEVICE on failure

PUC_ForceSetNetworkSetting / PUC_SetNetworkInfo (GbE-2)

Section titled “PUC_ForceSetNetworkSetting / PUC_SetNetworkInfo (GbE-2)”
PUCRESULT WINAPI PUC_ForceSetNetworkSetting(UINT32 nAdapterIPaddress, const PPUC_NETWORK_INFO pTargetInfo, UINT32 nForTemporary, PPUC_NETWORK_INFO pResultInfo);
PUCRESULT WINAPI PUC_SetNetworkInfo(PUC_HANDLE hDevice, PUC_NETWORK_INFO_TYPE type, UINT32 value);

Changes the network settings of a GbE-2 device (IP address, subnet mask, gateway, and DHCP enable/disable). Use PUC_ForceSetNetworkSetting to force settings onto a device before it is opened — for example, from a state where no IP address is configured — and use PUC_SetNetworkInfo to change the settings of an already-open device.

Argument / Return value Type Description
type PUC_NETWORK_INFO_TYPE [in] The type of setting to change (list)
value UINT32 [in] The value to set
Return value PUCRESULT PUC_SUCCEEDED on success / PUC_ERROR_SET_NETWORK_SETTING on failure

PUCRESULT WINAPI PUC_SetEPOCTime(PUC_HANDLE hDevice, UINT32 year, UINT32 month, UINT32 day, UINT32 hour, UINT32 minute, UINT32 second);
PUCRESULT WINAPI PUC_SetTimeOfDay(PUC_HANDLE hDevice, UINT64 epochSeconds);

Sets the camera’s built-in clock (by specifying the year, month, day, hour, minute, and second, or by specifying epoch seconds). The time code of transferred data (converted with PUC_GetTimeCode2EPOC) is recorded relative to this clock.

Argument / Return value Type Description
year through second UINT32 [in] The date and time to set
epochSeconds UINT64 [in] The epoch seconds to set
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

3. Resolution & capture condition settings

Section titled “3. Resolution & capture condition settings”
PUCRESULT WINAPI PUC_SetResolution(PUC_HANDLE hDevice, UINT32 nWidth, UINT32 nHeight);
PUCRESULT WINAPI PUC_GetResolution(PUC_HANDLE hDevice, UINT32* pWidth, UINT32* pHeight);

Sets and retrieves the capture resolution (width and height). The setting is reset when the device is opened.

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
nWidth / pWidth UINT32 / UINT32* Horizontal resolution (in pixels)
nHeight / pHeight UINT32 / UINT32* Vertical resolution (in pixels)
Return value PUCRESULT PUC_SUCCEEDED on success / PUC_ERROR_ILLEGAL_RESOLUTION for an invalid value

PUC_GetMaxResolution / PUC_GetResolutionLimit

Section titled “PUC_GetMaxResolution / PUC_GetResolutionLimit”
PUCRESULT WINAPI PUC_GetMaxResolution(PUC_HANDLE hDevice, UINT32* pCurMaxWidth, UINT32* pCurMaxHeight);
PUCRESULT WINAPI PUC_GetResolutionLimit(PUC_HANDLE hDevice, PPUC_RESO_LIMIT_INFO pLimitInfo);

Retrieves the maximum resolution settable at the current frame rate (PUC_GetMaxResolution), and the model’s upper/lower resolution limits and the step size for changes (PUC_GetResolutionLimit). Use these to check the settable range before changing the resolution.

Argument / Return value Type Description
pCurMaxWidth / pCurMaxHeight UINT32* [out] The maximum resolution at the current frame rate
pLimitInfo PPUC_RESO_LIMIT_INFO [out] A structure summarizing the maximum/minimum resolution and the step size
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUC_SetFramerateShutter / PUC_GetFramerateShutter

Section titled “PUC_SetFramerateShutter / PUC_GetFramerateShutter”
PUCRESULT WINAPI PUC_SetFramerateShutter(PUC_HANDLE hDevice, UINT32 nFramerate, UINT32 nShutterSpeedFps);
PUCRESULT WINAPI PUC_GetFramerateShutter(PUC_HANDLE hDevice, UINT32* pFramerate, UINT32* pShutterSpeedFps);

Sets and retrieves the frame rate (fps) and the shutter speed (1/fps).

Argument / Return value Type Description
hDevice PUC_HANDLE [in] Device handle
nFramerate / pFramerate UINT32 / UINT32* Frame rate (fps)
nShutterSpeedFps / pShutterSpeedFps UINT32 / UINT32* Shutter speed (in units of 1/fps)
Return value PUCRESULT PUC_SUCCEEDED on success / PUC_ERROR_ILLEGAL_FRAME_RATE for an invalid value

PUC_GetMaxFramerate / PUC_GetFramerateLimit

Section titled “PUC_GetMaxFramerate / PUC_GetFramerateLimit”
PUCRESULT WINAPI PUC_GetMaxFramerate(PUC_HANDLE hDevice, UINT32* pFramerate);
PUCRESULT WINAPI PUC_GetFramerateLimit(PUC_HANDLE hDevice, PPUC_FRAMERATE_LIMIT_INFO pLimitInfo);

Retrieves the maximum frame rate settable at the current resolution, and the model’s upper/lower frame rate limits.

Argument / Return value Type Description
pFramerate UINT32* [out] The maximum frame rate at the current resolution
pLimitInfo PPUC_FRAMERATE_LIMIT_INFO [out] A structure summarizing the maximum/minimum frame rate
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUC_SetExposeTime / PUC_GetExposeTime / PUC_GetMinExposeTime

Section titled “PUC_SetExposeTime / PUC_GetExposeTime / PUC_GetMinExposeTime”
PUCRESULT WINAPI PUC_SetExposeTime(PUC_HANDLE hDevice, UINT32 nExpOnTime, UINT32 nExpOffTime);
PUCRESULT WINAPI PUC_GetExposeTime(PUC_HANDLE hDevice, UINT32* pExpOnTime, UINT32* pExpOffTime);
PUCRESULT WINAPI PUC_GetMinExposeTime(PUC_HANDLE hDevice, UINT32* pMinExpOnTime, UINT32* pMinExpOffTime);

Directly sets and retrieves the exposure and non-exposure periods (in clock units). Whereas PUC_SetFramerateShutter specifies the shutter speed in units of 1/fps, this API provides more detailed exposure time control by letting you control the exposure and non-exposure clocks individually.

Argument / Return value Type Description
nExpOnTime / pExpOnTime UINT32 / UINT32* Exposure period (in clock units)
nExpOffTime / pExpOffTime UINT32 / UINT32* Non-exposure period (in clock units)
pMinExpOnTime / pMinExpOffTime UINT32* [out] The minimum exposure/non-exposure period settable under the current capture conditions
Return value PUCRESULT PUC_SUCCEEDED on success / PUC_ERROR_ILLEGAL_EXPOSE_CLOCK for an invalid value

PUC_SetQuantization / PUC_GetQuantization (/ PUC_SetQuantization2 / PUC_GetQuantization2)

Section titled “PUC_SetQuantization / PUC_GetQuantization (/ PUC_SetQuantization2 / PUC_GetQuantization2)”
PUCRESULT WINAPI PUC_SetQuantization(PUC_HANDLE hDevice, UINT32 nPoint, USHORT nVal);
PUCRESULT WINAPI PUC_GetQuantization(PUC_HANDLE hDevice, UINT32 nPoint, USHORT* pVal);
// Versions that retrieve/set all PUC_Q_COUNT elements at once
PUCRESULT WINAPI PUC_GetQuantization2(PUC_HANDLE hDevice, unsigned short* pQvals);
PUCRESULT WINAPI PUC_SetQuantization2(PUC_HANDLE hDevice, unsigned short* pQvals);

Retrieves and sets the quantization table stored on the device (used during decoding, PUC_Q_COUNT = 64 elements), either one element at a time or all at once. The setting is reset when the device is restarted.

Argument / Return value Type Description
nPoint UINT32 [in] The position in the quantization table (0 to PUC_Q_COUNT-1)
nVal / pVal USHORT / USHORT* Quantization table data
pQvals unsigned short* [in/out] An array of PUC_Q_COUNT elements
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure

PUCRESULT WINAPI PUC_SetFanState(PUC_HANDLE hDevice, PUC_MODE nState);
PUCRESULT WINAPI PUC_GetFanState(PUC_HANDLE hDevice, PUC_MODE* pState);

Sets and retrieves the device’s fan state (PUC_ON / PUC_OFF). The setting is reset when the device is restarted.

Argument / Return value Type Description
nState / pState PUC_MODE / PUC_MODE* Fan state (PUC_ON / PUC_OFF)
Return value PUCRESULT PUC_SUCCEEDED on success / see the error code list on failure