PUCLIB 1.7.0.0
PHOTRON USB Control Library
Loading...
Searching...
No Matches
PUCCONST.h
Go to the documentation of this file.
1#ifndef __PUCCONST_H
2#define __PUCCONST_H
3
4/*
5 * PUCCONST.h
6 * PHOTRON INFINICAM Control SDK
7 *
8 * Copyright (C) 2020-2026 PHOTRON LIMITED
9 */
10
11// PUC_GBE2_XFER_HEADER が UINT8 などの Windows の型を使うため、
12// このヘッダを PUCLIB.h より先に(または単独で)インクルードしても通るようにする
13#include <Windows.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
21#define PUC_MAX_DEVICE 16
24#define PUC_MAX_LEN 256
27#define PUC_Q_COUNT 64
30#define PUC_MIN_RING_BUF_COUNT 4
33#define PUC_MAX_RING_BUF_COUNT 65535
36#define PUC_XFER_TIMEOUT_AUTO 0
39#define PUC_XFER_TIMEOUT_INFINITE 0xFFFFFFFF
42#define PUC_SYNC_OUT_MAGNIFICATION_0_5 0
45#define PUC_MAX_DECODE_THREAD_COUNT 32
46
49#define PUC_MAC_ADDRESS_SIZE 6
50
53typedef enum
54{
60 PUC_ON = 1,
61} PUC_MODE;
62
65typedef enum
66{
74
89
92typedef enum
93{
101
104typedef void* PUC_HANDLE;
108
111typedef enum
112{
197
201
205
209
213
217
221
225
229
232 // NOTE: 現状このエラーを返す箇所はない(クローズ失敗を通知するために確保している)
234
238
239} PUCRESULT;
240
255
258#define PUC_DETECT_TARGET_ALL 0x00000000
261#define PUC_DETECT_TARGET_UC1 0x00000001
264#define PUC_DETECT_TARGET_GBE2 0x00000002
265
268#define PUC_DETECT_MODE_DISCOVERY 0x00000000
271#define PUC_DETECT_MODE_TARGET_IP 0x00000001
272
273
274
279typedef enum
280{
282 VSYNC_POS = 0x0000,
284 VSYNC_NEG = 0x0001,
286 EXPOSE_POS = 0x0002,
288 EXPOSE_NEG = 0x0003,
290 REC_POS = 0x0004,
292 REC_NEG = 0x0005,
294 TRIGGER_POS = 0x0006,
296 TRIGGER_NEG = 0x0007,
298 READY_POS = 0x0008,
300 READY_NEG = 0x0009,
310 PTP_PP_POS = 0x000E,
312 PTP_PP_NEG = 0x000F,
314
319typedef enum
320{
322 EVENT_POS_IN = 0x0000,
324 EVENT_NEG_IN = 0x0001,
326 TRIG_POS_IN = 0x0002,
328 TRIG_NEG_IN = 0x0003,
330 READY_POS_IN = 0x0004,
332 READY_NEG_IN = 0x0005,
334 SYNC_POS_IN = 0x0006,
336 SYNC_NEG_IN = 0x0007,
341
346
348
364
369typedef enum
370{
372 X0_5 = 0x0101,
374 X1 = 1,
376 X2 = 2,
378 X4 = 4,
380 X6 = 6,
382 X8 = 8,
384 X10 = 10,
386 X20 = 20,
388 X30 = 30,
390
441
442
449typedef struct
450{
453 UINT8 nVersion;
454
458
461 UINT16 nImageNo;
462
466
469 UINT8 isNoSync;
470
474
477 UINT8 isPtp;
478
482
486 UINT64 epochTime;
487
489
490
491
494#define PUC_CHK_SUCCEEDED(res) (res == PUC_SUCCEEDED)
497#define PUC_CHK_FAILED(res) (res != PUC_SUCCEEDED)
498
499#ifdef __cplusplus
500}
501#endif
502
503#endif /* __PUCCONST_H */
PUC_GENERAL_OUT_SIGNAL_TYPE
The signal type assigned to a general output port. Names ending with POS are positive polarity and NE...
Definition PUCCONST.h:280
@ READY_POS
Recording ready state (positive)
Definition PUCCONST.h:298
@ PTP_PP_POS
PTP pulse per second (positive)
Definition PUCCONST.h:310
@ IRIG_RESET_NEG
IRIG time code reset (negative)
Definition PUCCONST.h:304
@ STRADDLING_POS
Straddling (two-shot) exposure (positive)
Definition PUCCONST.h:306
@ VSYNC_POS
Vertical synchronization signal (positive)
Definition PUCCONST.h:282
@ REC_POS
Recording state (positive)
Definition PUCCONST.h:290
@ STRADDLING_NEG
Straddling (two-shot) exposure (negative)
Definition PUCCONST.h:308
@ EXPOSE_NEG
Exposure period (negative)
Definition PUCCONST.h:288
@ REC_NEG
Recording state (negative)
Definition PUCCONST.h:292
@ PTP_PP_NEG
PTP pulse per second (negative)
Definition PUCCONST.h:312
@ VSYNC_NEG
Vertical synchronization signal (negative)
Definition PUCCONST.h:284
@ TRIGGER_POS
Trigger input detection (positive)
Definition PUCCONST.h:294
@ IRIG_RESET_POS
IRIG time code reset (positive)
Definition PUCCONST.h:302
@ TRIGGER_NEG
Trigger input detection (negative)
Definition PUCCONST.h:296
@ EXPOSE_POS
Exposure period (positive)
Definition PUCCONST.h:286
@ READY_NEG
Recording ready state (negative)
Definition PUCCONST.h:300
PUC_SYNC_OUT_TIMES
The output count magnification of the synchronization signal, given as a multiple of the framerate....
Definition PUCCONST.h:370
@ X2
x2
Definition PUCCONST.h:376
@ X6
x6
Definition PUCCONST.h:380
@ X30
x30
Definition PUCCONST.h:388
@ X1
x1
Definition PUCCONST.h:374
@ X20
x20
Definition PUCCONST.h:386
@ X10
x10
Definition PUCCONST.h:384
@ X8
x8
Definition PUCCONST.h:382
@ X0_5
x0.5 (once every two frames)
Definition PUCCONST.h:372
@ X4
x4
Definition PUCCONST.h:378
PUC_GENERAL_IN_SIGNAL_TYPE
The signal type assigned to a general input port. Names containing POS are positive polarity and NEG ...
Definition PUCCONST.h:320
@ SYNC_POS_IN
External synchronization input (positive)
Definition PUCCONST.h:334
@ POWER_OFF_NEG_IN
Power off input (negative)
Definition PUCCONST.h:340
@ TRIG_NEG_IN
Trigger input (negative)
Definition PUCCONST.h:328
@ SYNC_NEG_IN
External synchronization input (negative)
Definition PUCCONST.h:336
@ POWER_OFF_POS_IN
Power off input (positive)
Definition PUCCONST.h:338
@ READY_POS_IN
Recording ready input (positive)
Definition PUCCONST.h:330
@ EXPOSE_POS_IN
Exposure control input (positive).
Definition PUCCONST.h:343
@ EXPOSE_NEG_IN
Exposure control input (negative).
Definition PUCCONST.h:345
@ TRIG_POS_IN
Trigger input (positive)
Definition PUCCONST.h:326
@ READY_NEG_IN
Recording ready input (negative)
Definition PUCCONST.h:332
@ EVENT_NEG_IN
Event input (negative)
Definition PUCCONST.h:324
@ EVENT_POS_IN
Event input (positive)
Definition PUCCONST.h:322
struct PUC_GBE2_XFER_HEADER * PPUC_GBE2_XFER_HEADER
void * PUC_HANDLE
Device handle.
Definition PUCCONST.h:104
PUC_DEVICE_TYPE
Enumeration for the device type. Stored in PUC_DETECT_INFO::nDeviceType by the device search function...
Definition PUCCONST.h:244
@ PUC_DEVICE_UC1
INFINICAM UC-1 (USB connection)
Definition PUCCONST.h:247
@ PUC_DEVICE_OTHERS
Other than the above. Not returned by the device search functions; reserved for the application to re...
Definition PUCCONST.h:253
@ PUC_DEVICE_GBE2
INFINICAM GbE-2 (Ethernet connection)
Definition PUCCONST.h:250
PUC_CAPABILITY
Camera capability. Use with PUC_IsSupported to check whether a feature is available on the connected ...
Definition PUCCONST.h:394
@ PUC_CAP_SYNC_OUT_TIMES
SYNC OUT times.
Definition PUCCONST.h:404
@ PUC_CAP_SYNC_IN_DELAY
SYNC IN delay.
Definition PUCCONST.h:406
@ PUC_CAP_XFER_TIMEOUT
Transfer timeout setting takes effect.
Definition PUCCONST.h:434
@ PUC_CAP_KEEP_ALIVE
Keep alive control.
Definition PUCCONST.h:420
@ PUC_CAP_EXPOSE_DELAY
Expose delay.
Definition PUCCONST.h:412
@ PUC_CAP_COMMAND_PASSTHROUGH
Raw command passthrough.
Definition PUCCONST.h:398
@ PUC_CAP_GENERAL_IO
General in/out signal.
Definition PUCCONST.h:430
@ PUC_CAP_SYNC_OUT_MAGNIFICATION
SYNC OUT magnification.
Definition PUCCONST.h:402
@ PUC_CAP_GPU_DECODE
GPU decode for this camera's data format.
Definition PUCCONST.h:436
@ PUC_CAP_EPOC_TIME
Camera clock setting.
Definition PUCCONST.h:418
@ PUC_CAP_MAC_ADDRESS
MAC address.
Definition PUCCONST.h:422
@ PUC_CAP_TRIG_IN_DELAY
TRIG IN delay.
Definition PUCCONST.h:408
@ PUC_CAP_FAN
Fan control.
Definition PUCCONST.h:439
@ PUC_CAP_EXTERNAL_SYNC_STATUS
External sync status.
Definition PUCCONST.h:416
@ PUC_CAP_PIXEL_DEFECT
Pixel defect point.
Definition PUCCONST.h:428
@ PUC_CAP_NETWORK_INFO
Network information.
Definition PUCCONST.h:426
@ PUC_CAP_SYNC_OUT_SIGNAL
SYNC OUT signal polarity.
Definition PUCCONST.h:400
@ PUC_CAP_TRIG_OUT_WIDTH
TRIG OUT width.
Definition PUCCONST.h:410
@ PUC_CAP_PP_OUT
PP OUT width/delay.
Definition PUCCONST.h:414
@ PUC_CAP_RESET_DEVICE
Device reset.
Definition PUCCONST.h:396
@ PUC_CAP_FLASH_RESET
Flash data reset.
Definition PUCCONST.h:432
@ PUC_CAP_HARDWARE_VERSION
Hardware version.
Definition PUCCONST.h:424
PUCRESULT
Error code.
Definition PUCCONST.h:112
@ PUC_ERROR_NOTEQUAL_READ_SIZE
The data of specified size could not be read from the device.
Definition PUCCONST.h:166
@ PUC_ERROR_DETECT_DEVICE
Failed to search for devices. Returned by the device search functions such as PUC_DetectDevice2 / PUC...
Definition PUCCONST.h:224
@ PUC_ERROR_NO_SYNC
External sync signal is not detected.
Definition PUCCONST.h:237
@ PUC_ERROR_DEVICE_CLOSE
Failed to close the device.
Definition PUCCONST.h:233
@ PUC_ERROR_GPU_MEMORY_COPY
Failed to copy GPU memory.
Definition PUCCONST.h:212
@ PUC_ERROR_RING_BUF_COUNT
The specified ring buffer count is invalid.
Definition PUCCONST.h:187
@ PUC_ERROR_DEVICE_WRITE
Failed to write data to the device.
Definition PUCCONST.h:151
@ PUC_ERROR_ILLEGAL_FRAME_RATE
The specified framerate cannot be set.
Definition PUCCONST.h:136
@ PUC_ERROR_INITIALIZED
Initialization is already complete.
Definition PUCCONST.h:121
@ PUC_ERROR_XFER_DATA_FINISH
The data transfer ended abnormally.
Definition PUCCONST.h:181
@ PUC_ERROR_NOTEQUAL_WRITE_SIZE
The data of specified size could not be written to the device.
Definition PUCCONST.h:169
@ PUC_ERROR_GPU_UNINITIALIZE
The setup required for GPU processing is not done, please run PUC_SetupGPUDecode.
Definition PUCCONST.h:216
@ PUC_ERROR_FREE_BUFFER
Failed to release the buffer.
Definition PUCCONST.h:204
@ PUC_ERROR_ILLEGAL_RESOLUTION
The specified resolution cannot be set.
Definition PUCCONST.h:133
@ PUC_ERROR_GPU_DECODE_PROCESS
GPU decode process failed.
Definition PUCCONST.h:196
@ PUC_ERROR_XFER_DATA_WAIT
An unexpected error occurred during waiting for a data transfer from the device.
Definition PUCCONST.h:178
@ PUC_ERROR_MODULE_LOAD
There are modules in the SDK that could not load.
Definition PUCCONST.h:154
@ PUC_ERROR_ALLOCATE_BUFFUER
Failed to allocate buffer.
Definition PUCCONST.h:200
@ PUC_ERROR_XFERRING
Unable to process as a data transfer is in progress.
Definition PUCCONST.h:184
@ PUC_ERROR_DEVICE_NOTOPEN
The device is not open.
Definition PUCCONST.h:145
@ PUC_ERROR_DEVICE_OPEN
Failed to open the device.
Definition PUCCONST.h:142
@ PUC_ERROR_GPU_SYNCHRONIZE
Failed to synchronize GPU processing.
Definition PUCCONST.h:208
@ PUC_ERROR_SET_NETWORK_SETTING
Failed to write the network settings to the device. Returned by PUC_ForceSetNetworkSetting.
Definition PUCCONST.h:228
@ PUC_ERROR_XFER_DATA_INVALID_HEADER
The header information in the data received from the device is invalid.
Definition PUCCONST.h:172
@ PUC_ERROR_NOTSUPPORT
This function is not supprted.
Definition PUCCONST.h:193
@ PUC_ERROR_SET_CMD
Failed to send a SET command to the device.
Definition PUCCONST.h:163
@ PUC_ERROR_GET_CMD
Failed to send a GET command to the device.
Definition PUCCONST.h:160
@ PUC_ERROR_ILLEGAL_EXPOSE_CLOCK
The specified exposure time or non-exposure time (clock units) cannot be set.
Definition PUCCONST.h:139
@ PUC_ERROR_DEVICE_READ
Failed to read data from the device.
Definition PUCCONST.h:148
@ PUC_ERROR_ILLEGAL_ARG
The specified argument is NULL.
Definition PUCCONST.h:130
@ PUC_ERROR_ILLEGAL_DEVICE_HANDLE
The specified device handle is NULL.
Definition PUCCONST.h:127
@ PUC_ERROR_UNINITIALIZE
Initialization has not been performed. Please execute the PUC_Initialize function.
Definition PUCCONST.h:118
@ PUC_SUCCEEDED
Succeeded.
Definition PUCCONST.h:115
@ PUC_ERROR_SYNC_EXTERNAL
Unable to process as a synchronize to external signal is in progress.
Definition PUCCONST.h:190
@ PUC_ERROR_LOCK_TIMEOUT
The exclusive process of the function has timed out.
Definition PUCCONST.h:157
@ PUC_ERROR_GET_ADAPTER_INFO
Failed to get the network adapter information. Returned by PUC_GetAdaptersInfoList.
Definition PUCCONST.h:220
@ PUC_ERROR_XFER_DATA_BEGIN
Unable to start data transfer.
Definition PUCCONST.h:175
@ PUC_ERROR_NOT_EXIST_DEVICE_NO
The specified device number does not exist.
Definition PUCCONST.h:124
PUC_MODE
Enumeration for ON/OFF setting.
Definition PUCCONST.h:54
@ PUC_ON
ON.
Definition PUCCONST.h:60
@ PUC_OFF
OFF.
Definition PUCCONST.h:57
PUC_COLOR_TYPE
Enumeration for device color/monochrome setting.
Definition PUCCONST.h:93
@ PUC_COLOR_MONO
Monochrome.
Definition PUCCONST.h:96
@ PUC_COLOR_COLOR
Color.
Definition PUCCONST.h:99
PUC_SYNC_MODE
Enumeration for synchronization.
Definition PUCCONST.h:78
@ PUC_SYNC_EXTERNAL
Synchronize to external signal.
Definition PUCCONST.h:84
@ PUC_SYNC_EXTERNAL_PTP
Synchronize to the PTP (Precision Time Protocol) master clock. GbE-2 only.
Definition PUCCONST.h:87
@ PUC_SYNC_INTERNAL
Internal operation.
Definition PUCCONST.h:81
PUC_HANDLE * PPUC_HANDLE
Pointer for the device handle.
Definition PUCCONST.h:107
PUC_NETWORK_INFO_TYPE
The network setting to change with PUC_SetNetworkInfo.
Definition PUCCONST.h:352
@ DHCP_ON
Enables DHCP. The value argument is not used.
Definition PUCCONST.h:360
@ NETMASK
Subnet mask. Specify the value as a 32-bit value.
Definition PUCCONST.h:356
@ DHCP_OFF
Disables DHCP. The value argument is not used.
Definition PUCCONST.h:362
@ IPADDRESS
IP address. Specify the value as a 32-bit value.
Definition PUCCONST.h:354
@ GATEWAY
Default gateway. Specify the value as a 32-bit value.
Definition PUCCONST.h:358
PUC_SIGNAL
Enumeration for signal polarity.
Definition PUCCONST.h:66
@ PUC_SIGNAL_NEGA
Negative polarity signal.
Definition PUCCONST.h:72
@ PUC_SIGNAL_POSI
Positive polarity signal.
Definition PUCCONST.h:69
Structure for storing the parsed GbE-2 16-byte transfer header.
Definition PUCCONST.h:450
UINT8 isTrigger
Trigger flag. Set by the camera (1 = trigger active).
Definition PUCCONST.h:481
UINT8 isOverSync
Over-sync flag. Set by the camera (1 = over sync).
Definition PUCCONST.h:473
UINT8 isPacketDropped
Packet dropped flag. Set by the software layer (1 = dropped).
Definition PUCCONST.h:465
UINT8 isNoSync
No-sync flag. Set by the camera (1 = no sync).
Definition PUCCONST.h:469
UINT8 nVersion
Header version (currently 0x01)
Definition PUCCONST.h:453
UINT64 epochTime
Epoch time (seconds) extracted from bytes 6-15 of the header.
Definition PUCCONST.h:486
UINT8 nDeviceType
Device type.
Definition PUCCONST.h:457
UINT16 nImageNo
Image (frame) number from the camera.
Definition PUCCONST.h:461
UINT8 isPtp
PTP flag. Set by the camera (1 = PTP active).
Definition PUCCONST.h:477