WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
NIIMAQdx.h
1 //==============================================================================
2 //
3 // Title : NIIMAQdx.h
4 // Created : 1403685834 seconds after 1/1/1970 12:00:00 UTC
5 // Copyright : Copyright 2006, National Instruments Corporation, All rights
6 // reserved
7 // Purpose : Include file for NI-IMAQdx library support.
8 //
9 //==============================================================================
10 #ifndef ___niimaqdx_h___
11 #define ___niimaqdx_h___
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #if !defined(niimaqdx_types)
18 #define niimaqdx_types
19 
20 #ifdef _CVI_
21 #pragma EnableLibraryRuntimeChecking
22 #endif
23 
24 //==============================================================================
25 // Typedefs
26 //==============================================================================
27 #ifndef _NI_uInt8_DEFINED_
28 #define _NI_uInt8_DEFINED_
29 typedef unsigned char uInt8;
30 #endif
31 
32 #ifndef _NI_uInt16_DEFINED_
33 #define _NI_uInt16_DEFINED_
34 typedef unsigned short int uInt16;
35 #endif
36 
37 #ifndef _NI_uInt32_DEFINED_
38 #define _NI_uInt32_DEFINED_
39 #if defined(_MSC_VER)
40 typedef unsigned long uInt32;
41 #elif __GNUC__
42 #if __x86_64__
43 typedef unsigned int uInt32;
44 #else
45 typedef unsigned long uInt32;
46 #endif
47 #endif
48 #endif
49 
50 #ifndef _NI_uInt64_DEFINED_
51 #define _NI_uInt64_DEFINED_
52 #if defined(_MSC_VER) || _CVI_ >= 700
53 typedef unsigned __int64 uInt64;
54 #elif __GNUC__
55 typedef unsigned long long uInt64;
56 #endif
57 #endif
58 
59 #ifndef _NI_Int8_DEFINED_
60 #define _NI_Int8_DEFINED_
61 typedef char Int8;
62 #endif
63 
64 #ifndef _NI_Int16_DEFINED_
65 #define _NI_Int16_DEFINED_
66 typedef short int Int16;
67 #endif
68 
69 #ifndef _NI_Int32_DEFINED_
70 #define _NI_Int32_DEFINED_
71 #if defined(_MSC_VER)
72 typedef long Int32;
73 #elif __GNUC__
74 #if __x86_64__
75 typedef int Int32;
76 #else
77 typedef long Int32;
78 #endif
79 #endif
80 #endif
81 
82 #ifndef _NI_Int64_DEFINED_
83 #define _NI_Int64_DEFINED_
84 #if defined(_MSC_VER) || _CVI_ >= 700
85 typedef __int64 Int64;
86 #elif __GNUC__
87 typedef long long int Int64;
88 #endif
89 #endif
90 
91 #ifndef _NI_float32_DEFINED_
92 #define _NI_float32_DEFINED_
93 typedef float float32;
94 #endif
95 
96 #ifndef _NI_float64_DEFINED_
97 #define _NI_float64_DEFINED_
98 typedef double float64;
99 #endif
100 
101 #ifndef TRUE
102 #define TRUE (1L)
103 #endif
104 
105 #ifndef FALSE
106 #define FALSE (0L)
107 #endif
108 
109 #ifndef _NI_GUIDHNDL_DEFINED
110 typedef uInt32 GUIHNDL;
111 #endif
112 
113 #if (defined(_MSC_VER) || defined(_CVI_))
114 #ifndef _NI_FUNC_DEFINED
115 #define NI_FUNC __stdcall
116 #endif
117 
118 #ifndef _NI_FUNCC_DEFINED
119 #define NI_FUNCC __cdecl
120 #endif
121 #elif defined(__GNUC__)
122 #ifndef _NI_FUNC_DEFINED
123 #define NI_FUNC
124 #endif
125 
126 #ifndef _NI_FUNCC_DEFINED
127 #define NI_FUNCC
128 #endif
129 #endif
130 
131 #ifndef _NI_bool32_DEFINED_
132 #define _NI_bool32_DEFINED_
133 typedef uInt32 bool32;
134 #endif
135 
136 #ifndef _NI_IMAQdxSession_DEFINED_
137 #define _NI_IMAQdxSession_DEFINED_
138 typedef uInt32 IMAQdxSession;
139 #endif
140 
141 #define IMAQDX_MAX_API_STRING_LENGTH 512
142 
143 //==============================================================================
144 // Forward Declare Data Structures
145 //==============================================================================
146 typedef struct Image_struct Image;
147 
148 //==============================================================================
149 // Error Codes Enumeration
150 //==============================================================================
151 typedef enum IMAQdxError_enum {
152  IMAQdxErrorSuccess = 0x0, // Success
153  IMAQdxErrorSystemMemoryFull = 0xBFF69000, // Not enough memory
154  IMAQdxErrorInternal, // Internal error
155  IMAQdxErrorInvalidParameter, // Invalid parameter
156  IMAQdxErrorInvalidPointer, // Invalid pointer
157  IMAQdxErrorInvalidInterface, // Invalid camera session
158  IMAQdxErrorInvalidRegistryKey, // Invalid registry key
159  IMAQdxErrorInvalidAddress, // Invalid address
160  IMAQdxErrorInvalidDeviceType, // Invalid device type
161  IMAQdxErrorNotImplemented, // Not implemented
162  IMAQdxErrorCameraNotFound, // Camera not found
163  IMAQdxErrorCameraInUse, // Camera is already in use.
164  IMAQdxErrorCameraNotInitialized, // Camera is not initialized.
165  IMAQdxErrorCameraRemoved, // Camera has been removed.
166  IMAQdxErrorCameraRunning, // Acquisition in progress.
167  IMAQdxErrorCameraNotRunning, // No acquisition in progress.
168  IMAQdxErrorAttributeNotSupported, // Attribute not supported by the camera.
169  IMAQdxErrorAttributeNotSettable, // Unable to set attribute.
170  IMAQdxErrorAttributeNotReadable, // Unable to get attribute.
171  IMAQdxErrorAttributeOutOfRange, // Attribute value is out of range.
172  IMAQdxErrorBufferNotAvailable, // Requested buffer is unavailable.
173  IMAQdxErrorBufferListEmpty, // Buffer list is empty. Add one or more buffers.
174  IMAQdxErrorBufferListLocked, // Buffer list is already locked. Reconfigure
175  // acquisition and try again.
176  IMAQdxErrorBufferListNotLocked, // No buffer list. Reconfigure acquisition
177  // and try again.
178  IMAQdxErrorResourcesAllocated, // Transfer engine resources already
179  // allocated. Reconfigure acquisition and try
180  // again.
181  IMAQdxErrorResourcesUnavailable, // Insufficient transfer engine resources.
182  IMAQdxErrorAsyncWrite, // Unable to perform asychronous register write.
183  IMAQdxErrorAsyncRead, // Unable to perform asychronous register read.
184  IMAQdxErrorTimeout, // Timeout.
185  IMAQdxErrorBusReset, // Bus reset occurred during a transaction.
186  IMAQdxErrorInvalidXML, // Unable to load camera's XML file.
187  IMAQdxErrorFileAccess, // Unable to read/write to file.
188  IMAQdxErrorInvalidCameraURLString, // Camera has malformed URL string.
189  IMAQdxErrorInvalidCameraFile, // Invalid camera file.
190  IMAQdxErrorGenICamError, // Unknown Genicam error.
191  IMAQdxErrorFormat7Parameters, // For format 7: The combination of speed,
192  // image position, image size, and color coding
193  // is incorrect.
194  IMAQdxErrorInvalidAttributeType, // The attribute type is not compatible with
195  // the passed variable type.
196  IMAQdxErrorDLLNotFound, // The DLL could not be found.
197  IMAQdxErrorFunctionNotFound, // The function could not be found.
198  IMAQdxErrorLicenseNotActivated, // License not activated.
199  IMAQdxErrorCameraNotConfiguredForListener, // The camera is not configured
200  // properly to support a listener.
201  IMAQdxErrorCameraMulticastNotAvailable, // Unable to configure the system for
202  // multicast support.
203  IMAQdxErrorBufferHasLostPackets, // The requested buffer has lost packets and
204  // the user requested an error to be
205  // generated.
206  IMAQdxErrorGiGEVisionError, // Unknown GiGE Vision error.
207  IMAQdxErrorNetworkError, // Unknown network error.
208  IMAQdxErrorCameraUnreachable, // Unable to connect to the camera.
209  IMAQdxErrorHighPerformanceNotSupported, // High performance acquisition is
210  // not supported on the specified
211  // network interface. Connect the
212  // camera to a network interface
213  // running the high performance
214  // driver.
215  IMAQdxErrorInterfaceNotRenamed, // Unable to rename interface. Invalid or
216  // duplicate name specified.
217  IMAQdxErrorNoSupportedVideoModes, // The camera does not have any video modes
218  // which are supported.
219  IMAQdxErrorSoftwareTriggerOverrun, // Software trigger overrun.
220  IMAQdxErrorTestPacketNotReceived, // The system did not receive a test packet
221  // from the camera. The packet size may be
222  // too large for the network configuration
223  // or a firewall may be enabled.
224  IMAQdxErrorCorruptedImageReceived, // The camera returned a corrupted image.
225  IMAQdxErrorCameraConfigurationHasChanged, // The camera did not return an
226  // image of the correct type it was
227  // configured for previously.
228  IMAQdxErrorCameraInvalidAuthentication, // The camera is configured with
229  // password authentication and either
230  // the user name and password were
231  // not configured or they are
232  // incorrect.
233  IMAQdxErrorUnknownHTTPError, // The camera returned an unknown HTTP error.
234  IMAQdxErrorKernelDriverUnavailable, // Unable to attach to the kernel mode
235  // driver.
236  IMAQdxErrorPixelFormatDecoderUnavailable, // No decoder available for
237  // selected pixel format.
238  IMAQdxErrorFirmwareUpdateNeeded, // The acquisition hardware needs a firmware
239  // update before it can be used.
240  IMAQdxErrorFirmwareUpdateRebootNeeded, // The firmware on the acquisition
241  // hardware has been updated and the
242  // system must be rebooted before use.
243  IMAQdxErrorLightingCurrentOutOfRange, // The requested current level from the
244  // lighting controller is not possible.
245  IMAQdxErrorUSB3VisionError, // Unknown USB3 Vision error.
246  IMAQdxErrorInvalidU3VUSBDescriptor, // The camera has a USB descriptor that
247  // is incompatible with the USB3 Vision
248  // specification.
249  IMAQdxErrorU3VInvalidControlInterface, // The USB3 Vision control interface
250  // is not implemented or is invalid on
251  // this camera.
252  IMAQdxErrorU3VControlInterfaceError, // There was an error from the control
253  // interface of the USB3 Vision camera.
254  IMAQdxErrorU3VInvalidEventInterface, // The USB3 Vision event interface is
255  // not implemented or is invalid on this
256  // camera.
257  IMAQdxErrorU3VEventInterfaceError, // There was an error from the event
258  // interface of the USB3 Vision camera.
259  IMAQdxErrorU3VInvalidStreamInterface, // The USB3 Vision stream interface is
260  // not implemented or is invalid on
261  // this camera.
262  IMAQdxErrorU3VStreamInterfaceError, // There was an error from the stream
263  // interface of the USB3 Vision camera.
264  IMAQdxErrorU3VUnsupportedConnectionSpeed, // The USB connection speed is not
265  // supported by the camera. Check
266  // whether the camera is plugged
267  // into a USB 2.0 port instead of a
268  // USB 3.0 port. If so, verify
269  // that the camera supports this
270  // use case.
271  IMAQdxErrorU3VInsufficientPower, // The USB3 Vision camera requires more
272  // current than can be supplied by the USB
273  // port in use.
274  IMAQdxErrorU3VInvalidMaxCurrent, // The U3V_MaximumCurrentUSB20_mA registry
275  // value is not valid for the connected USB3
276  // Vision camera.
277  IMAQdxErrorBufferIncompleteData, // The requested buffer has incomplete data
278  // and the user requested an error to be
279  // generated.
280  IMAQdxErrorCameraAcquisitionConfigFailed, // The camera returned an error
281  // starting the acquisition.
282  IMAQdxErrorCameraClosePending, // The camera still has outstanding references
283  // and will be closed when these operations
284  // complete.
285  IMAQdxErrorSoftwareFault, // An unexpected software error occurred.
286  IMAQdxErrorCameraPropertyInvalid, // The value for an invalid camera property
287  // was requested.
288  IMAQdxErrorJumboFramesNotEnabled, // Jumbo frames are not enabled on the
289  // host. Maximum packet size is 1500
290  // bytes.
291  IMAQdxErrorBayerPixelFormatNotSelected, // This operation requires that the
292  // camera has a Bayer pixel format
293  // selected.
294  IMAQdxErrorGuard = 0xFFFFFFFF,
295 } IMAQdxError;
296 
297 //==============================================================================
298 // Bus Type Enumeration
299 //==============================================================================
300 typedef enum IMAQdxBusType_enum {
301  IMAQdxBusTypeFireWire = 0x31333934,
302  IMAQdxBusTypeEthernet = 0x69707634,
303  IMAQdxBusTypeSimulator = 0x2073696D,
304  IMAQdxBusTypeDirectShow = 0x64736877,
305  IMAQdxBusTypeIP = 0x4950636D,
306  IMAQdxBusTypeSmartCam2 = 0x53436132,
307  IMAQdxBusTypeUSB3Vision = 0x55534233,
308  IMAQdxBusTypeUVC = 0x55564320,
309  IMAQdxBusTypeGuard = 0xFFFFFFFF,
310 } IMAQdxBusType;
311 
312 //==============================================================================
313 // Camera Control Mode Enumeration
314 //==============================================================================
315 typedef enum IMAQdxCameraControlMode_enum {
316  IMAQdxCameraControlModeController,
317  IMAQdxCameraControlModeListener,
318  IMAQdxCameraControlModeGuard = 0xFFFFFFFF,
319 } IMAQdxCameraControlMode;
320 
321 //==============================================================================
322 // Buffer Number Mode Enumeration
323 //==============================================================================
324 typedef enum IMAQdxBufferNumberMode_enum {
325  IMAQdxBufferNumberModeNext,
326  IMAQdxBufferNumberModeLast,
327  IMAQdxBufferNumberModeBufferNumber,
328  IMAQdxBufferNumberModeGuard = 0xFFFFFFFF,
329 } IMAQdxBufferNumberMode;
330 
331 //==============================================================================
332 // Plug n Play Event Enumeration
333 //==============================================================================
334 typedef enum IMAQdxPnpEvent_enum {
335  IMAQdxPnpEventCameraAttached,
336  IMAQdxPnpEventCameraDetached,
337  IMAQdxPnpEventBusReset,
338  IMAQdxPnpEventGuard = 0xFFFFFFFF,
339 } IMAQdxPnpEvent;
340 
341 //==============================================================================
342 // Bayer Pattern Enumeration
343 //==============================================================================
344 typedef enum IMAQdxBayerPattern_enum {
345  IMAQdxBayerPatternNone,
346  IMAQdxBayerPatternGB,
347  IMAQdxBayerPatternGR,
348  IMAQdxBayerPatternBG,
349  IMAQdxBayerPatternRG,
350  IMAQdxBayerPatternHardware,
351  IMAQdxBayerPatternGuard = 0xFFFFFFFF,
352 } IMAQdxBayerPattern;
353 
354 //==============================================================================
355 // Bayer Decode Algorithm Enumeration
356 //==============================================================================
357 typedef enum IMAQdxBayerAlgorithm_enum {
358  IMAQdxBayerAlgorithmBilinear,
359  IMAQdxBayerAlgorithmVNG,
360  IMAQdxBayerAlgorithmGuard = 0xFFFFFFFF,
361 } IMAQdxBayerAlgorithm;
362 
363 //==============================================================================
364 // Output Image Types -- Values match Vision Development Module image types
365 //==============================================================================
366 typedef enum IMAQdxOutputImageType_enum {
367  IMAQdxOutputImageTypeU8 = 0,
368  IMAQdxOutputImageTypeI16 = 1,
369  IMAQdxOutputImageTypeU16 = 7,
370  IMAQdxOutputImageTypeRGB32 = 4,
371  IMAQdxOutputImageTypeRGB64 = 6,
372  IMAQdxOutputImageTypeAuto = 0x7FFFFFFF,
373  IMAQdxOutputImageTypeGuard = 0xFFFFFFFF,
374 } IMAQdxOutputImageType;
375 
376 //==============================================================================
377 // Controller Destination Mode Enumeration
378 //==============================================================================
379 typedef enum IMAQdxDestinationMode_enum {
380  IMAQdxDestinationModeUnicast,
381  IMAQdxDestinationModeBroadcast,
382  IMAQdxDestinationModeMulticast,
383  IMAQdxDestinationModeGuard = 0xFFFFFFFF,
384 } IMAQdxDestinationMode;
385 
386 //==============================================================================
387 // Attribute Type Enumeration
388 //==============================================================================
389 typedef enum IMAQdxAttributeType_enum {
390  IMAQdxAttributeTypeU32,
391  IMAQdxAttributeTypeI64,
392  IMAQdxAttributeTypeF64,
393  IMAQdxAttributeTypeString,
394  IMAQdxAttributeTypeEnum,
395  IMAQdxAttributeTypeBool,
396  IMAQdxAttributeTypeCommand,
397  IMAQdxAttributeTypeBlob,
398  IMAQdxAttributeTypeGuard = 0xFFFFFFFF,
399 } IMAQdxAttributeType;
400 
401 //==============================================================================
402 // Value Type Enumeration
403 //==============================================================================
404 typedef enum IMAQdxValueType_enum {
405  IMAQdxValueTypeU32,
406  IMAQdxValueTypeI64,
407  IMAQdxValueTypeF64,
408  IMAQdxValueTypeString,
409  IMAQdxValueTypeEnumItem,
410  IMAQdxValueTypeBool,
411  IMAQdxValueTypeDisposableString,
412  IMAQdxValueTypeGuard = 0xFFFFFFFF,
413 } IMAQdxValueType;
414 
415 //==============================================================================
416 // Interface File Flags Enumeration
417 //==============================================================================
418 typedef enum IMAQdxInterfaceFileFlags_enum {
419  IMAQdxInterfaceFileFlagsConnected = 0x1,
420  IMAQdxInterfaceFileFlagsDirty = 0x2,
421  IMAQdxInterfaceFileFlagsGuard = 0xFFFFFFFF,
422 } IMAQdxInterfaceFileFlags;
423 
424 //==============================================================================
425 // Overwrite Mode Enumeration
426 //==============================================================================
427 typedef enum IMAQdxOverwriteMode_enum {
428  IMAQdxOverwriteModeGetOldest = 0x0,
429  IMAQdxOverwriteModeFail = 0x2,
430  IMAQdxOverwriteModeGetNewest = 0x3,
431  IMAQdxOverwriteModeGuard = 0xFFFFFFFF,
432 } IMAQdxOverwriteMode;
433 
434 //==============================================================================
435 // Incomplete Buffer Mode Enumeration
436 //==============================================================================
437 typedef enum IMAQdxIncompleteBufferMode_enum {
438  IMAQdxIncompleteBufferModeIgnore,
439  IMAQdxIncompleteBufferModeFail,
440  IMAQdxIncompleteBufferModeGuard = 0xFFFFFFFF,
441 } IMAQdxIncompleteBufferMode;
442 
443 //==============================================================================
444 // Lost Packet Mode Enumeration
445 //==============================================================================
446 typedef enum IMAQdxLostPacketMode_enum {
447  IMAQdxLostPacketModeIgnore,
448  IMAQdxLostPacketModeFail,
449  IMAQdxLostPacketModeGuard = 0xFFFFFFFF,
450 } IMAQdxLostPacketMode;
451 
452 //==============================================================================
453 // Attribute Visibility Enumeration
454 //==============================================================================
455 typedef enum IMAQdxAttributeVisibility_enum {
456  IMAQdxAttributeVisibilitySimple = 0x00001000,
457  IMAQdxAttributeVisibilityIntermediate = 0x00002000,
458  IMAQdxAttributeVisibilityAdvanced = 0x00004000,
459  IMAQdxAttributeVisibilityGuard = 0xFFFFFFFF,
460 } IMAQdxAttributeVisibility;
461 
462 //==============================================================================
463 // Stream Channel Mode Enumeration
464 //==============================================================================
465 typedef enum IMAQdxStreamChannelMode_enum {
466  IMAQdxStreamChannelModeAutomatic,
467  IMAQdxStreamChannelModeManual,
468  IMAQdxStreamChannelModeGuard = 0xFFFFFFFF,
469 } IMAQdxStreamChannelMode;
470 
471 //==============================================================================
472 // Pixel Signedness Enumeration
473 //==============================================================================
474 typedef enum IMAQdxPixelSignedness_enum {
475  IMAQdxPixelSignednessUnsigned,
476  IMAQdxPixelSignednessSigned,
477  IMAQdxPixelSignednessHardware,
478  IMAQdxPixelSignednessGuard = 0xFFFFFFFF,
479 } IMAQdxPixelSignedness;
480 
481 //==============================================================================
482 // USB Connection Speed Enumeration
483 //==============================================================================
484 typedef enum IMAQdxUSBConnectionSpeed_enum {
485  IMAQdxUSBConnectionSpeedLow = 1,
486  IMAQdxUSBConnectionSpeedFull = 2,
487  IMAQdxUSBConnectionSpeedHigh = 4,
488  IMAQdxUSBConnectionSpeedSuper = 8,
489  IMAQdxUSBConnectionSpeedGuard = 0xFFFFFFFF,
490 } IMAQdxUSBConnectionSpeed;
491 
492 //==============================================================================
493 // CVI Structures
494 //==============================================================================
495 #pragma pack(push, 4)
496 
497 //==============================================================================
498 // Camera Information Structure
499 //==============================================================================
501  uInt32 Type;
502  uInt32 Version;
503  uInt32 Flags;
504  uInt32 SerialNumberHi;
505  uInt32 SerialNumberLo;
506  IMAQdxBusType BusType;
507  char InterfaceName[IMAQDX_MAX_API_STRING_LENGTH];
508  char VendorName[IMAQDX_MAX_API_STRING_LENGTH];
509  char ModelName[IMAQDX_MAX_API_STRING_LENGTH];
510  char CameraFileName[IMAQDX_MAX_API_STRING_LENGTH];
511  char CameraAttributeURL[IMAQDX_MAX_API_STRING_LENGTH];
513 
514 //==============================================================================
515 // Camera File Structure
516 //==============================================================================
517 typedef struct IMAQdxCameraFile_struct {
518  uInt32 Type;
519  uInt32 Version;
520  char FileName[IMAQDX_MAX_API_STRING_LENGTH];
522 
523 //==============================================================================
524 // Attribute Information Structure
525 //==============================================================================
527  IMAQdxAttributeType Type;
528  bool32 Readable;
529  bool32 Writable;
530  char Name[IMAQDX_MAX_API_STRING_LENGTH];
532 
533 //==============================================================================
534 // Enumeration Item Structure
535 //==============================================================================
536 typedef struct IMAQdxEnumItem_struct {
537  uInt32 Value;
538  uInt32 Reserved;
539  char Name[IMAQDX_MAX_API_STRING_LENGTH];
541 
542 //==============================================================================
543 // Camera Information Structure
544 //==============================================================================
546 
547 #pragma pack(pop)
548 
549 //==============================================================================
550 // Callbacks
551 //==============================================================================
552 typedef uInt32(NI_FUNC* FrameDoneEventCallbackPtr)(IMAQdxSession id,
553  uInt32 bufferNumber,
554  void* callbackData);
555 typedef uInt32(NI_FUNC* PnpEventCallbackPtr)(IMAQdxSession id,
556  IMAQdxPnpEvent pnpEvent,
557  void* callbackData);
558 typedef void(NI_FUNC* AttributeUpdatedEventCallbackPtr)(IMAQdxSession id,
559  const char* name,
560  void* callbackData);
561 
562 #endif // niimaqdx_types
563 //==============================================================================
564 // Attributes
565 //==============================================================================
566 #define IMAQdxAttributeBaseAddress \
567  "CameraInformation::BaseAddress" // Read only. Gets the base address of the
568  // camera registers.
569 #define IMAQdxAttributeBusType \
570  "CameraInformation::BusType" // Read only. Gets the bus type of the camera.
571 #define IMAQdxAttributeModelName \
572  "CameraInformation::ModelName" // Read only. Returns the model name.
573 #define IMAQdxAttributeSerialNumberHigh \
574  "CameraInformation::SerialNumberHigh" // Read only. Gets the upper 32-bits of
575  // the camera 64-bit serial number.
576 #define IMAQdxAttributeSerialNumberLow \
577  "CameraInformation::SerialNumberLow" // Read only. Gets the lower 32-bits of
578  // the camera 64-bit serial number.
579 #define IMAQdxAttributeVendorName \
580  "CameraInformation::VendorName" // Read only. Returns the vendor name.
581 #define IMAQdxAttributeHostIPAddress \
582  "CameraInformation::HostIPAddress" // Read only. Returns the host adapter IP
583  // address.
584 #define IMAQdxAttributeIPAddress \
585  "CameraInformation::IPAddress" // Read only. Returns the IP address.
586 #define IMAQdxAttributePrimaryURLString \
587  "CameraInformation::PrimaryURLString" // Read only. Gets the camera's primary
588  // URL string.
589 #define IMAQdxAttributeSecondaryURLString \
590  "CameraInformation::SecondaryURLString" // Read only. Gets the camera's
591  // secondary URL string.
592 #define IMAQdxAttributeAcqInProgress \
593  "StatusInformation::AcqInProgress" // Read only. Gets the current state of
594  // the acquisition. TRUE if acquiring;
595  // otherwise FALSE.
596 #define IMAQdxAttributeLastBufferCount \
597  "StatusInformation::LastBufferCount" // Read only. Gets the number of
598  // transferred buffers.
599 #define IMAQdxAttributeLastBufferNumber \
600  "StatusInformation::LastBufferNumber" // Read only. Gets the last cumulative
601  // buffer number transferred.
602 #define IMAQdxAttributeLostBufferCount \
603  "StatusInformation::LostBufferCount" // Read only. Gets the number of lost
604  // buffers during an acquisition
605  // session.
606 #define IMAQdxAttributeLostPacketCount \
607  "StatusInformation::LostPacketCount" // Read only. Gets the number of lost
608  // packets during an acquisition
609  // session.
610 #define IMAQdxAttributeRequestedResendPackets \
611  "StatusInformation::RequestedResendPacketCount" // Read only. Gets the number
612  // of packets requested to be
613  // resent during an
614  // acquisition session.
615 #define IMAQdxAttributeReceivedResendPackets \
616  "StatusInformation::ReceivedResendPackets" // Read only. Gets the number of
617  // packets that were requested to
618  // be resent during an acquisition
619  // session and were completed.
620 #define IMAQdxAttributeHandledEventCount \
621  "StatusInformation::HandledEventCount" // Read only. Gets the number of
622  // handled events during an
623  // acquisition session.
624 #define IMAQdxAttributeLostEventCount \
625  "StatusInformation::LostEventCount" // Read only. Gets the number of lost
626  // events during an acquisition session.
627 #define IMAQdxAttributeBayerGainB \
628  "AcquisitionAttributes::Bayer::GainB" // Sets/gets the white balance gain for
629  // the blue component of the Bayer
630  // conversion.
631 #define IMAQdxAttributeBayerGainG \
632  "AcquisitionAttributes::Bayer::GainG" // Sets/gets the white balance gain for
633  // the green component of the Bayer
634  // conversion.
635 #define IMAQdxAttributeBayerGainR \
636  "AcquisitionAttributes::Bayer::GainR" // Sets/gets the white balance gain for
637  // the red component of the Bayer
638  // conversion.
639 #define IMAQdxAttributeBayerPattern \
640  "AcquisitionAttributes::Bayer::Pattern" // Sets/gets the Bayer pattern to
641  // use.
642 #define IMAQdxAttributeStreamChannelMode \
643  "AcquisitionAttributes::Controller::StreamChannelMode" // Gets/sets the mode
644  // for allocating a
645  // FireWire stream
646  // channel.
647 #define IMAQdxAttributeDesiredStreamChannel \
648  "AcquisitionAttributes::Controller::DesiredStreamChannel" // Gets/sets the
649  // stream channel
650  // to manually
651  // allocate.
652 #define IMAQdxAttributeFrameInterval \
653  "AcquisitionAttributes::FrameInterval" // Read only. Gets the duration in
654  // milliseconds between successive
655  // frames.
656 #define IMAQdxAttributeIgnoreFirstFrame \
657  "AcquisitionAttributes::IgnoreFirstFrame" // Gets/sets the video delay of one
658  // frame between starting the
659  // camera and receiving the video
660  // feed.
661 #define IMAQdxAttributeOffsetX \
662  "OffsetX" // Gets/sets the left offset of the image.
663 #define IMAQdxAttributeOffsetY \
664  "OffsetY" // Gets/sets the top offset of the image.
665 #define IMAQdxAttributeWidth "Width" // Gets/sets the width of the image.
666 #define IMAQdxAttributeHeight "Height" // Gets/sets the height of the image.
667 #define IMAQdxAttributePixelFormat \
668  "PixelFormat" // Gets/sets the pixel format of the source sensor.
669 #define IMAQdxAttributePacketSize \
670  "PacketSize" // Gets/sets the packet size in bytes.
671 #define IMAQdxAttributePayloadSize \
672  "PayloadSize" // Gets/sets the frame size in bytes.
673 #define IMAQdxAttributeSpeed \
674  "AcquisitionAttributes::Speed" // Gets/sets the transfer speed in Mbps for a
675  // FireWire packet.
676 #define IMAQdxAttributeShiftPixelBits \
677  "AcquisitionAttributes::ShiftPixelBits" // Gets/sets the alignment of 16-bit
678  // cameras. Downshift the pixel bits
679  // if the camera returns most
680  // significant bit-aligned data.
681 #define IMAQdxAttributeSwapPixelBytes \
682  "AcquisitionAttributes::SwapPixelBytes" // Gets/sets the endianness of 16-bit
683  // cameras. Swap the pixel bytes if
684  // the camera returns little endian
685  // data.
686 #define IMAQdxAttributeOverwriteMode \
687  "AcquisitionAttributes::OverwriteMode" // Gets/sets the overwrite mode, used
688  // to determine acquisition when an
689  // image transfer cannot be completed
690  // due to an overwritten internal
691  // buffer.
692 #define IMAQdxAttributeTimeout \
693  "AcquisitionAttributes::Timeout" // Gets/sets the timeout value in
694  // milliseconds, used to abort an
695  // acquisition when the image transfer
696  // cannot be completed within the delay.
697 #define IMAQdxAttributeVideoMode \
698  "AcquisitionAttributes::VideoMode" // Gets/sets the video mode for a camera.
699 #define IMAQdxAttributeBitsPerPixel \
700  "AcquisitionAttributes::BitsPerPixel" // Gets/sets the actual bits per pixel.
701  // For 16-bit components, this
702  // represents the actual bit depth
703  // (10-, 12-, 14-, or 16-bit).
704 #define IMAQdxAttributePixelSignedness \
705  "AcquisitionAttributes::PixelSignedness" // Gets/sets the signedness of the
706  // pixel. For 16-bit components,
707  // this represents the actual pixel
708  // signedness (Signed, or Unsigned).
709 #define IMAQdxAttributeReserveDualPackets \
710  "AcquisitionAttributes::ReserveDualPackets" // Gets/sets if dual packets will
711  // be reserved for a very large
712  // FireWire packet.
713 #define IMAQdxAttributeReceiveTimestampMode \
714  "AcquisitionAttributes::ReceiveTimestampMode" // Gets/sets the mode for
715  // timestamping images received
716  // by the driver.
717 #define IMAQdxAttributeActualPeakBandwidth \
718  "AcquisitionAttributes::AdvancedEthernet::BandwidthControl::" \
719  "ActualPeakBandwidth" // Read only. Returns the actual maximum peak bandwidth
720  // the camera will be configured to use.
721 #define IMAQdxAttributeDesiredPeakBandwidth \
722  "AcquisitionAttributes::AdvancedEthernet::BandwidthControl::" \
723  "DesiredPeakBandwidth" // Gets/sets the desired maximum peak bandwidth the
724  // camera should use.
725 #define IMAQdxAttributeDestinationMode \
726  "AcquisitionAttributes::AdvancedEthernet::Controller::DestinationMode" // Gets/Sets
727  // where
728  // the
729  // camera
730  // is
731  // instructed
732  // to
733  // send
734  // the
735  // image
736  // stream.
737 #define IMAQdxAttributeDestinationMulticastAddress \
738  "AcquisitionAttributes::AdvancedEthernet::Controller::" \
739  "DestinationMulticastAddress" // Gets/Sets the multicast address the camera
740  // should send data in multicast mode.
741 #define IMAQdxAttributeEventsEnabled \
742  "AcquisitionAttributes::AdvancedEthernet::EventParameters::EventsEnabled" // Gets/Sets if events will be handled.
743 #define IMAQdxAttributeMaxOutstandingEvents \
744  "AcquisitionAttributes::AdvancedEthernet::EventParameters::" \
745  "MaxOutstandingEvents" // Gets/Sets the maximum number of outstanding events
746  // to queue.
747 #define IMAQdxAttributeTestPacketEnabled \
748  "AcquisitionAttributes::AdvancedEthernet::TestPacketParameters::" \
749  "TestPacketEnabled" // Gets/Sets whether the driver will validate the image
750  // streaming settings using test packets prior to an
751  // acquisition
752 #define IMAQdxAttributeTestPacketTimeout \
753  "AcquisitionAttributes::AdvancedEthernet::TestPacketParameters::" \
754  "TestPacketTimeout" // Gets/Sets the timeout for validating test packet
755  // reception (if enabled)
756 #define IMAQdxAttributeMaxTestPacketRetries \
757  "AcquisitionAttributes::AdvancedEthernet::TestPacketParameters::" \
758  "MaxTestPacketRetries" // Gets/Sets the number of retries for validating test
759  // packet reception (if enabled)
760 #define IMAQdxAttributeChunkDataDecodingEnabled \
761  "AcquisitionAttributes::ChunkDataDecoding::ChunkDataDecodingEnabled" // Gets/Sets
762  // whether
763  // the
764  // driver
765  // will
766  // decode
767  // any
768  // chunk
769  // data
770  // in
771  // the
772  // image
773  // stream
774 #define IMAQdxAttributeChunkDataDecodingMaxElementSize \
775  "AcquisitionAttributes::ChunkDataDecoding::MaximumChunkCopySize" // Gets/Sets
776  // the
777  // maximum
778  // size of
779  // any
780  // single
781  // chunk
782  // data
783  // element
784  // that will
785  // be made
786  // available
787 #define IMAQdxAttributeLostPacketMode \
788  "AcquisitionAttributes::AdvancedEthernet::LostPacketMode" // Gets/sets the
789  // behavior when
790  // the user
791  // extracts a
792  // buffer that has
793  // missing packets.
794 #define IMAQdxAttributeMemoryWindowSize \
795  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
796  "MemoryWindowSize" // Gets/sets the size of the memory window of the camera
797  // in kilobytes. Should match the camera's internal buffer
798  // size.
799 #define IMAQdxAttributeResendsEnabled \
800  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::ResendsEnabled" // Gets/sets if resends will be issued for missing packets.
801 #define IMAQdxAttributeResendThresholdPercentage \
802  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
803  "ResendThresholdPercentage" // Gets/sets the threshold of the packet
804  // processing window that will trigger packets to
805  // be resent.
806 #define IMAQdxAttributeResendBatchingPercentage \
807  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
808  "ResendBatchingPercentage" // Gets/sets the percent of the packet resend
809  // threshold that will be issued as one group past
810  // the initial threshold sent in a single request.
811 #define IMAQdxAttributeMaxResendsPerPacket \
812  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
813  "MaxResendsPerPacket" // Gets/sets the maximum number of resend requests that
814  // will be issued for a missing packet.
815 #define IMAQdxAttributeResendResponseTimeout \
816  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
817  "ResendResponseTimeout" // Gets/sets the time to wait for a resend request to
818  // be satisfied before sending another.
819 #define IMAQdxAttributeNewPacketTimeout \
820  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
821  "NewPacketTimeout" // Gets/sets the time to wait for new packets to arrive in
822  // a partially completed image before assuming the rest of
823  // the image was lost.
824 #define IMAQdxAttributeMissingPacketTimeout \
825  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
826  "MissingPacketTimeout" // Gets/sets the time to wait for a missing packet
827  // before issuing a resend.
828 #define IMAQdxAttributeResendTimerResolution \
829  "AcquisitionAttributes::AdvancedEthernet::ResendParameters::" \
830  "ResendTimerResolution" // Gets/sets the resolution of the packet processing
831  // system that is used for all packet-related
832  // timeouts.
833 
834 //==============================================================================
835 // Functions
836 //==============================================================================
837 IMAQdxError NI_FUNC IMAQdxSnap(IMAQdxSession id, Image* image);
838 IMAQdxError NI_FUNC IMAQdxConfigureGrab(IMAQdxSession id);
839 IMAQdxError NI_FUNC IMAQdxGrab(IMAQdxSession id, Image* image,
840  bool32 waitForNextBuffer,
841  uInt32* actualBufferNumber);
842 IMAQdxError NI_FUNC
843 IMAQdxSequence(IMAQdxSession id, Image* images[], uInt32 count);
844 IMAQdxError NI_FUNC
845 IMAQdxDiscoverEthernetCameras(const char* address, uInt32 timeout);
846 IMAQdxError NI_FUNC
847 IMAQdxEnumerateCameras(IMAQdxCameraInformation cameraInformationArray[],
848  uInt32* count, bool32 connectedOnly);
849 IMAQdxError NI_FUNC IMAQdxResetCamera(const char* name, bool32 resetAll);
850 IMAQdxError NI_FUNC IMAQdxOpenCamera(const char* name,
851  IMAQdxCameraControlMode mode,
852  IMAQdxSession* id);
853 IMAQdxError NI_FUNC IMAQdxCloseCamera(IMAQdxSession id);
854 IMAQdxError NI_FUNC IMAQdxConfigureAcquisition(IMAQdxSession id,
855  bool32 continuous,
856  uInt32 bufferCount);
857 IMAQdxError NI_FUNC IMAQdxStartAcquisition(IMAQdxSession id);
858 IMAQdxError NI_FUNC
859 IMAQdxGetImage(IMAQdxSession id, Image* image, IMAQdxBufferNumberMode mode,
860  uInt32 desiredBufferNumber, uInt32* actualBufferNumber);
861 IMAQdxError NI_FUNC
862 IMAQdxGetImageData(IMAQdxSession id, void* buffer, uInt32 bufferSize,
863  IMAQdxBufferNumberMode mode, uInt32 desiredBufferNumber,
864  uInt32* actualBufferNumber);
865 IMAQdxError NI_FUNC IMAQdxStopAcquisition(IMAQdxSession id);
866 IMAQdxError NI_FUNC IMAQdxUnconfigureAcquisition(IMAQdxSession id);
867 IMAQdxError NI_FUNC
868 IMAQdxEnumerateVideoModes(IMAQdxSession id, IMAQdxVideoMode videoModeArray[],
869  uInt32* count, uInt32* currentMode);
870 IMAQdxError NI_FUNC IMAQdxEnumerateAttributes(
871  IMAQdxSession id, IMAQdxAttributeInformation attributeInformationArray[],
872  uInt32* count, const char* root);
873 IMAQdxError NI_FUNC IMAQdxGetAttribute(IMAQdxSession id, const char* name,
874  IMAQdxValueType type, void* value);
875 IMAQdxError NI_FUNCC IMAQdxSetAttribute(IMAQdxSession id, const char* name,
876  IMAQdxValueType type, ...);
877 IMAQdxError NI_FUNC
878 IMAQdxGetAttributeMinimum(IMAQdxSession id, const char* name,
879  IMAQdxValueType type, void* value);
880 IMAQdxError NI_FUNC
881 IMAQdxGetAttributeMaximum(IMAQdxSession id, const char* name,
882  IMAQdxValueType type, void* value);
883 IMAQdxError NI_FUNC
884 IMAQdxGetAttributeIncrement(IMAQdxSession id, const char* name,
885  IMAQdxValueType type, void* value);
886 IMAQdxError NI_FUNC IMAQdxGetAttributeType(IMAQdxSession id, const char* name,
887  IMAQdxAttributeType* type);
888 IMAQdxError NI_FUNC
889 IMAQdxIsAttributeReadable(IMAQdxSession id, const char* name, bool32* readable);
890 IMAQdxError NI_FUNC
891 IMAQdxIsAttributeWritable(IMAQdxSession id, const char* name, bool32* writable);
892 IMAQdxError NI_FUNC
893 IMAQdxEnumerateAttributeValues(IMAQdxSession id, const char* name,
894  IMAQdxEnumItem list[], uInt32* size);
895 IMAQdxError NI_FUNC IMAQdxGetAttributeTooltip(IMAQdxSession id,
896  const char* name, char* tooltip,
897  uInt32 length);
898 IMAQdxError NI_FUNC IMAQdxGetAttributeUnits(IMAQdxSession id, const char* name,
899  char* units, uInt32 length);
900 IMAQdxError NI_FUNC
901 IMAQdxRegisterFrameDoneEvent(IMAQdxSession id, uInt32 bufferInterval,
902  FrameDoneEventCallbackPtr callbackFunction,
903  void* callbackData);
904 IMAQdxError NI_FUNC IMAQdxRegisterPnpEvent(IMAQdxSession id,
905  IMAQdxPnpEvent event,
906  PnpEventCallbackPtr callbackFunction,
907  void* callbackData);
908 IMAQdxError NI_FUNC
909 IMAQdxWriteRegister(IMAQdxSession id, uInt32 offset, uInt32 value);
910 IMAQdxError NI_FUNC
911 IMAQdxReadRegister(IMAQdxSession id, uInt32 offset, uInt32* value);
912 IMAQdxError NI_FUNC IMAQdxWriteMemory(IMAQdxSession id, uInt32 offset,
913  const char* values, uInt32 count);
914 IMAQdxError NI_FUNC
915 IMAQdxReadMemory(IMAQdxSession id, uInt32 offset, char* values, uInt32 count);
916 IMAQdxError NI_FUNC
917 IMAQdxGetErrorString(IMAQdxError error, char* message, uInt32 messageLength);
918 IMAQdxError NI_FUNC
919 IMAQdxWriteAttributes(IMAQdxSession id, const char* filename);
920 IMAQdxError NI_FUNC
921 IMAQdxReadAttributes(IMAQdxSession id, const char* filename);
922 IMAQdxError NI_FUNC
923 IMAQdxResetEthernetCameraAddress(const char* name, const char* address,
924  const char* subnet, const char* gateway,
925  uInt32 timeout);
926 IMAQdxError NI_FUNC IMAQdxEnumerateAttributes2(
927  IMAQdxSession id, IMAQdxAttributeInformation attributeInformationArray[],
928  uInt32* count, const char* root, IMAQdxAttributeVisibility visibility);
929 IMAQdxError NI_FUNC
930 IMAQdxGetAttributeVisibility(IMAQdxSession id, const char* name,
931  IMAQdxAttributeVisibility* visibility);
932 IMAQdxError NI_FUNC
933 IMAQdxGetAttributeDescription(IMAQdxSession id, const char* name,
934  char* description, uInt32 length);
935 IMAQdxError NI_FUNC
936 IMAQdxGetAttributeDisplayName(IMAQdxSession id, const char* name,
937  char* displayName, uInt32 length);
938 IMAQdxError NI_FUNC IMAQdxDispose(void* buffer);
939 IMAQdxError NI_FUNC IMAQdxRegisterAttributeUpdatedEvent(
940  IMAQdxSession id, const char* name,
941  AttributeUpdatedEventCallbackPtr callbackFunction, void* callbackData);
942 IMAQdxError NI_FUNC IMAQdxEnumerateAttributes3(
943  IMAQdxSession id, IMAQdxAttributeInformation attributeInformationArray[],
944  uInt32* count, const char* root, IMAQdxAttributeVisibility visibility);
945 
946 #ifdef __cplusplus
947 }
948 #endif
949 
950 #endif // ___niimaqdx_h___
Definition: NIIMAQdx.h:526
Definition: NIIMAQdx.h:500
Definition: NIIMAQdx.h:536
Definition: NIIMAQdx.h:517