forked from ItBitCo/JavaFlyCam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFlyCapture2_C.h
3119 lines (2903 loc) · 90.7 KB
/
FlyCapture2_C.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//=============================================================================
// Copyright © 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
//
// This software is the confidential and proprietary information of FLIR
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
// shall not disclose such Confidential Information and shall use it only in
// accordance with the terms of the license agreement you entered into
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
//
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
// THIS SOFTWARE OR ITS DERIVATIVES.
//=============================================================================
//=============================================================================
// $Id: FlyCapture2_C.h,v 1.69 2010-12-13 23:58:00 mgara Exp $
//=============================================================================
#ifndef PGR_FC2_FLYCAPTURE2_C_H
#define PGR_FC2_FLYCAPTURE2_C_H
//=============================================================================
// Global C header file for FlyCapture2.
//
// This file defines the C API for FlyCapture2
//=============================================================================
#include "FlyCapture2Platform_C.h"
#include "FlyCapture2Defs_C.h"
#ifdef __cplusplus
extern "C"
{
#endif
/**
* Create a FC2 context for IIDC camera.
* This call must be made before any other calls that use a context
* will succeed.
*
* @see fc2DestroyContext()
*
* @param pContext A pointer to the fc2Context to be created.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2CreateContext(
fc2Context* pContext );
/**
* Create a FC2 context for a GigE Vision camera.
* This call must be made before any other calls that use a context
* will succeed.
*
* @see fc2DestroyContext()
*
* @param pContext A pointer to the fc2Context to be created.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2CreateGigEContext(
fc2Context* pContext );
/**
* Destroy the FC2 context. This must be called when the user is finished
* with the context in order to prevent memory leaks.
*
* @see fc2CreateContext()
*
* @param context The context to be destroyed.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2DestroyContext(
fc2Context context );
/**
* @defgroup CBusManager Bus Manager Operation
*
* @brief The functions in this section provide access to BusManager
* operations
*/
/*@{*/
/**
* Fire a bus reset. The actual bus reset is only fired for the
* specified 1394 bus, but it will effectively cause a global bus
* reset for the library.
*
* @param context The fc2Context to be used.
* @param pGuid PGRGuid of the camera or the device to cause bus reset.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2FireBusReset(
fc2Context context,
fc2PGRGuid* pGuid);
/**
* Gets the number of cameras attached to the PC.
*
* @param context The fc2Context to be used.
* @param pNumCameras Number of cameras detected.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetNumOfCameras(
fc2Context context,
unsigned int* pNumCameras );
/**
* Gets the PGRGuid for a camera with the specified IPv4 address.
*
* @param context The fc2Context to be used.
* @param ipAddress IP address to get GUID for.
* @param pGuid Unique PGRGuid for the camera.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetCameraFromIPAddress(
fc2Context context,
fc2IPAddress ipAddress,
fc2PGRGuid* pGuid);
/**
* Gets the PGRGuid for a camera on the PC. It uniquely identifies
* the camera specified by the index and is used to identify the camera
* during a fc2Connect() call.
*
* @param context The fc2Context to be used.
* @param index Zero based index of camera.
* @param pGuid Unique PGRGuid for the camera.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetCameraFromIndex(
fc2Context context,
unsigned int index,
fc2PGRGuid* pGuid);
/**
* Gets the PGRGuid for a camera on the PC. It uniquely identifies
* the camera specified by the serial number and is used to identify the camera
* during a fc2Connect() call.
*
* @param context The fc2Context to be used.
* @param serialNumber Serial number of camera.
* @param pGuid Unique PGRGuid for the camera.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetCameraFromSerialNumber(
fc2Context context,
unsigned int serialNumber,
fc2PGRGuid* pGuid );
/**
* Gets the serial number of the camera with the specified index.
*
* @param context The fc2Context to be used.
* @param index Zero based index of desired camera.
* @param pSerialNumber Serial number of camera.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetCameraSerialNumberFromIndex(
fc2Context context,
unsigned int index,
unsigned int* pSerialNumber );
/**
* Gets the interface type associated with a PGRGuid. This is useful
* in situations where there is a need to enumerate all cameras
* for a particular interface.
*
* @param context The fc2Context to be used.
* @param pGuid The PGRGuid to get the interface for.
* @param pInterfaceType The interface type of the PGRGuid.
*
* @return
*/
FLYCAPTURE2_C_API fc2Error
fc2GetInterfaceTypeFromGuid(
fc2Context context,
fc2PGRGuid *pGuid,
fc2InterfaceType* pInterfaceType );
/**
* Gets the number of devices. This may include hubs, host controllers
* and other hardware devices (including cameras).
*
* @param context The fc2Context to be used.
* @param pNumDevices The number of devices found.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetNumOfDevices(
fc2Context context,
unsigned int* pNumDevices );
/**
* Gets the PGRGuid for a device. It uniquely identifies the device
* specified by the index.
*
* @param context The fc2Context to be used.
* @param index Zero based index of device.
* @param pGuid Unique PGRGuid for the device.
*
* @see fc2GetNumOfDevices()
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetDeviceFromIndex(
fc2Context context,
unsigned int index,
fc2PGRGuid* pGuid );
/**
* Read a phy register on the specified device. The full address
* to be read from is determined by the page, port and address.
*
* @param context The fc2Context to be used.
* @param guid Unique PGRGuid for the device.
* @param page Page to read from.
* @param port Port to read from.
* @param address Address to read from.
* @param pValue Value read from the phy register.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2ReadPhyRegister(
fc2Context context,
fc2PGRGuid guid,
unsigned int page,
unsigned int port,
unsigned int address,
unsigned int* pValue );
/**
* Write a phy register on the specified device. The full address
* to be written to is determined by the page, port and address.
*
* @param context The fc2Context to be used.
* @param guid Unique PGRGuid for the device.
* @param page Page to write to.
* @param port Port to write to.
* @param address Address to write to.
* @param value Value to write to phy register.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2WritePhyRegister(
fc2Context context,
fc2PGRGuid guid,
unsigned int page,
unsigned int port,
unsigned int address,
unsigned int value );
/**
* Read usb link info for the port that the specified device is connected to.
*
* @param context The fc2Context to be used.
* @param guid Unique PGRGuid for the device.
* @param pValue Value read from the card register.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetUsbLinkInfo(
fc2Context context,
fc2PGRGuid guid,
unsigned int* pValue );
/**
* Read usb port status for the port that the specified device is connected to.
*
* @param context The fc2Context to be used.
* @param guid Unique PGRGuid for the device.
* @param pValue Value read from the card register.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetUsbPortStatus(
fc2Context context,
fc2PGRGuid guid,
unsigned int* pValue );
/**
* Gets the topology information for the PC.
*
* @param context The fc2Context to be used.
* @param pTopologyNodeContext A Topology Node context that will contain
* the topology information
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetTopology(
fc2Context context,
fc2TopologyNodeContext* pTopologyNodeContext );
/**
* Register a callback function that will be called when the
* specified callback event occurs.
*
* @param context The fc2Context to be used.
* @param enumCallback Pointer to function that will receive the callback.
* @param callbackType Type of callback to register for.
* @param pParameter Callback parameter to be passed to callback.
* @param pCallbackHandle Unique callback handle used for unregistering
* callback.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2RegisterCallback(
fc2Context context,
fc2BusEventCallback enumCallback,
fc2BusCallbackType callbackType,
void* pParameter,
fc2CallbackHandle* pCallbackHandle );
/**
* Unregister a callback function.
*
* @param context The fc2Context to be used.
* @param callbackHandle Unique callback handle.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2UnregisterCallback(
fc2Context context,
fc2CallbackHandle callbackHandle );
/**
* Force a rescan of the buses. This does not trigger a bus reset.
* However, any current connections to a Camera object will be
* invalidated.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2RescanBus( fc2Context context);
/**
* Force the camera with the specific MAC address to the specified
* IP address, subnet mask and default gateway. This is useful in
* situations where a GigE Vision camera is using Persistent IP and the
* application's subnet is different from the device subnet.
*
* @param context The fc2Context to be used.
* @param macAddress MAC address of the camera.
* @param ipAddress IP address to set on the camera.
* @param subnetMask Subnet mask to set on the camera.
* @param defaultGateway Default gateway to set on the camera.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2ForceIPAddressToCamera(
fc2Context context,
fc2MACAddress macAddress,
fc2IPAddress ipAddress,
fc2IPAddress subnetMask,
fc2IPAddress defaultGateway );
/**
* Force all cameras on the network to be assigned sequential IP addresses
* on the same subnet as the network adapters that they are connected to.
* This is useful in situations where GigE Vision cameras are using
* IP addresses in a subnet different from the host's subnet.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2ForceAllIPAddressesAutomatically();
/**
* Force cameras on the network to be assigned sequential IP addresses
* on the same subnet as the network adapters that it is connected to.
* This is useful in situations where GigE Vision cameras are using
* IP addresses in a subnet different from the host's subnet.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2ForceIPAddressAutomatically(unsigned int serialNumber);
/**
* Discover all cameras connected to the network even if they reside
* on a different subnet. This is useful in situations where a GigE
* camera is using Persistent IP and the application's subnet is
* different from the device subnet. After discovering the camera,
* it is easy to use ForceIPAddressToCamera() to set a different IP
* configuration.
*
* @param context The fc2Context to be used.
* @param gigECameras Pointer to an array of CameraInfo structures.
* @param arraySize Size of the array. Number of discovered cameras
* is returned in the same value.
*
* @return An Error indicating the success or failure of the function.
* If the error is PGRERROR_BUFFER_TOO_SMALL then arraySize will
* contain the minimum size needed for gigECameras array.
*/
FLYCAPTURE2_C_API fc2Error
fc2DiscoverGigECameras(
fc2Context context,
fc2CameraInfo* gigECameras,
unsigned int* arraySize );
/**
* Query whether a GigE camera is controllable.
*
* @param context The fc2Context to be used.
* @param pGuid Unique PGRGuid for the camera.
* @param pControllable True indicates camera is controllable
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2IsCameraControlable(
fc2Context context,
fc2PGRGuid* pGuid,
BOOL* pControlable);
/*@}*/
/**
* @defgroup CConnectionAndImage Connection and Image Retrieval
*
* @brief These functions deal with connections and image retrieval from
* the camera.
*/
/*@{*/
/**
* Connects the fc2Context to the camera specified by the GUID.
*
* Be aware that calling fc2CreateGUIContext() releases the CCP acquired
* for GigE cameras in fc2Connect(). Consider calling fc2Connect() after
* fc2CreateGUIContext().
*
* @param context The fc2Context to be used.
* @param guid The unique identifier for a specific camera on the PC.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2Connect(
fc2Context context,
fc2PGRGuid* guid );
/**
* Disconnects the fc2Context from the camera. This allows another physical
* camera specified by a GUID to be connected to the fc2Context.
*
* @see fc2Connect()
*
* @param context The fc2Context to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2Disconnect(
fc2Context context );
/**
* Checks if the fc2Context is connected to a physical camera
* specified by a GUID.
*
* @see fc2Connect()
* @see fc2Disconnect()
*
* @param context The fc2Context to be used.
*
* @return Whether fc2Connect() was called on the fc2Context.
*/
FLYCAPTURE2_C_API BOOL
fc2IsConnected(
fc2Context context );
/**
* Sets the callback data to be used on completion of image transfer.
* To clear the current stored callback data, pass in NULL for both
* callback arguments.
*
* @see fc2StartCapture()
*
* @param context The fc2Context to be used.
* @param pCallbackFn A function to be called when a new image is received.
* @param pCallbackData A pointer to data that can be passed to the
* callback function.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetCallback(
fc2Context context,
fc2ImageEventCallback pCallbackFn,
void* pCallbackData);
/**
* Starts isochronous image capture. It will use either the current
* video mode or the most recently set video mode of the camera.
*
* @see fc2RetrieveBuffer()
* @see fc2StartSyncCapture()
* @see fc2StopCapture()
*
* @param context The fc2Context to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2StartCapture(
fc2Context context );
/**
* Starts isochronous image capture. It will use either the current
* video mode or the most recently set video mode of the camera. The callback
* function is called when a new image is received from the camera.
*
* @see fc2RetrieveBuffer()
* @see fc2StartSyncCapture()
* @see fc2StopCapture()
*
* @param context The fc2Context to be used.
* @param pCallbackFn A function to be called when a new image is received.
* @param pCallbackData A pointer to data that can be passed to the
* callback function. A NULL pointer is acceptable.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2StartCaptureCallback(
fc2Context context,
fc2ImageEventCallback pCallbackFn,
void* pCallbackData);
/**
* Starts synchronized isochronous image capture on multiple cameras.
*
* @see fc2RetrieveBuffer()
* @see fc2StartCapture()
* @see fc2StopCapture()
*
* @param numCameras Number of fc2Contexts in the ppCameras array.
* @param pContexts Array of fc2Contexts.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2StartSyncCapture(
unsigned int numCameras,
fc2Context *pContexts );
/**
* Starts synchronized isochronous image capture on multiple cameras.
*
* @see fc2RetrieveBuffer()
* @see fc2StartCapture()
* @see fc2StopCapture()
*
* @param numCameras Number of fc2Contexts in the ppCameras array.
* @param pContexts Array of fc2Contexts.
* @param pCallbackFns Array of callback functions for each camera.
* @param pCallbackDataArray Array of callback data pointers.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2StartSyncCaptureCallback(
unsigned int numCameras,
fc2Context *pContexts,
fc2ImageEventCallback* pCallbackFns,
void** pCallbackDataArray);
/**
* Retrieves the next image object containing the next image.
*
* @see fc2StartCapture()
* @see fc2StopCapture()
*
* @param context The fc2Context to be used.
* @param pImage Pointer to fc2Image to store image data.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2RetrieveBuffer(
fc2Context context,
fc2Image* pImage );
/**
* Stops isochronous image transfer and cleans up all associated
* resources.
*
* @see fc2StartCapture()
* @see fc2RetrieveBuffer()
*
* @param context The fc2Context to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2StopCapture(
fc2Context context );
/**
* Retrieves the next image event containing the next part of the image.
*
* @see fc2StartCapture()
* @see fc2RetrieveBuffer()
* @see fc2StopCapture()
*
* @param context The fc2Context to be used.
* @param pImage Pointer to fc2Image to store image data.
* @param eventNumber The event number to wait for.
*
* @return An Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2WaitForBufferEvent(
fc2Context context,
fc2Image* pImage,
unsigned int eventNumber );
/**
* Specify user allocated buffers to use as image data buffers.
* To prevent image tearing, the size of each buffer should be equal to
* ((unsigned int)(bufferSize + packetSize - 1)/packetSize) * packetSize.
* The total size should be (size * numBuffers) or larger.
* The packet Size that should be used differs between interfaces:
* Firewire: Use the Format7 packet size.
* Usb2: First round to Format7 packet size then round to 512 bytes.
* Usb3: Use a packet size of 1024 bytes.
* GigE: No need to do any rounding on GigE
*
* @see fc2StartCapture()
* @see fc2RetrieveBuffer()
* @see fc2StopCapture()
*
* @param context The fc2Context to be used.
* @param ppMemBuffers Pointer to memory buffers to be written to. The
* size of the data should be equal to
* (size * numBuffers) or larger.
* @param size The size of each buffer (in bytes).
* @param nNumBuffers Number of buffers in the array.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetUserBuffers(
fc2Context context,
unsigned char* const ppMemBuffers,
int size,
int nNumBuffers );
/**
* Get the configuration associated with the camera.
*
* @see fc2SetConfiguration()
*
* @param context The fc2Context to be used.
* @param config Pointer to the configuration structure to be filled.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetConfiguration(
fc2Context context,
fc2Config* config );
/**
* Set the configuration associated with the camera.
*
* @see fc2GetConfiguration()
*
* @param context The fc2Context to be used.
* @param config Pointer to the configuration structure to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetConfiguration(
fc2Context context,
fc2Config* config );
/*@}*/
/**
* @defgroup CInformationProperties Information and Properties
*
* @brief These functions deal with information and properties can be
* retrieved from the camera.
*/
/*@{*/
/**
* Retrieves information from the camera such as serial number, model
* name and other camera information.
*
* @param context The fc2Context to be used.
* @param pCameraInfo Pointer to the camera information structure
* to be filled.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetCameraInfo(
fc2Context context,
fc2CameraInfo* pCameraInfo );
/**
* Retrieves information about the specified camera property. The
* property type must be specified in the fc2PropertyInfo structure
* passed into the function in order for the function to succeed.
*
* @see fc2GetProperty()
* @see fc2SetProperty()
*
* @param context The fc2Context to be used.
* @param propInfo Pointer to the PropertyInfo structure to be filled.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetPropertyInfo(
fc2Context context,
fc2PropertyInfo* propInfo );
/**
* Reads the settings for the specified property from the camera. The
* property type must be specified in the fc2Property structure passed
* into the function in order for the function to succeed. If auto
* is on, the integer and abs values returned may not be consistent
* with each other.
*
* @see fc2GetPropertyInfo()
* @see fc2SetProperty()
*
* @param context The fc2Context to be used.
* @param prop Pointer to the Property structure to be filled.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetProperty(
fc2Context context,
fc2Property* prop );
/**
* Writes the settings for the specified property to the camera. The
* property type must be specified in the Property structure passed
* into the function in order for the function to succeed.
* The absControl flag controls whether the absolute or integer value
* is written to the camera. Use fc2GetPropertyInfo() to query which
* options are available for a specific property.
*
* @see fc2GetPropertyInfo()
* @see fc2GetProperty()
*
* @param context The fc2Context to be used.
* @param prop Pointer to the Property structure to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetProperty(
fc2Context context,
fc2Property* prop );
/**
* Writes the settings for the specified property to the camera. The
* property type must be specified in the Property structure passed
* into the function in order for the function to succeed.
* The absControl flag controls whether the absolute or integer value
* is written to the camera.
*
* @param context The fc2Context to be used.
* @param prop Pointer to the Property structure to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetPropertyBroadcast(
fc2Context context,
fc2Property* prop );
/*@}*/
/**
* @defgroup CGeneralPurposeIO General Purpose Input / Output
*
* @brief These functions deal with general GPIO pin control on the camera.
*/
/*@{*/
/**
* Get the GPIO pin direction for the specified pin. This is not a
* required call when using the trigger or strobe functions as
* the pin direction is set automatically internally.
*
* @see fc2SetGPIOPinDirection()
* @see fc2SetGPIOPinDirectionBroadcast()
*
* @param context The fc2Context to be used.
* @param pin Pin to get the direction for.
* @param pDirection Direction of the pin. 0 for input, 1 for output.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetGPIOPinDirection(
fc2Context context,
unsigned int pin,
unsigned int* pDirection );
/**
* Set the GPIO pin direction for the specified pin. This is useful if
* there is a need to set the pin into an input pin (i.e. to read the
* voltage) off the pin without setting it as a trigger source. This
* is not a required call when using the trigger or strobe functions as
* the pin direction is set automatically internally.
*
* @see fc2GetGPIOPinDirection()
* @see fc2SetGPIOPinDirectionBroadcast()
*
* @param context The fc2Context to be used.
* @param pin Pin to get the direction for.
* @param direction Direction of the pin. 0 for input, 1 for output.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetGPIOPinDirection(
fc2Context context,
unsigned int pin,
unsigned int direction);
/**
* Set the GPIO pin direction for the specified pin. This is useful if
* there is a need to set the pin into an input pin (i.e. to read the
* voltage) off the pin without setting it as a trigger source. This
* is not a required call when using the trigger or strobe functions as
* the pin direction is set automatically internally.
*
* @see fc2GetGPIOPinDirection()
*
* @param context The fc2Context to be used.
* @param pin Pin to get the direction for.
* @param direction Direction of the pin. 0 for input, 1 for output.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetGPIOPinDirectionBroadcast(
fc2Context context,
unsigned int pin,
unsigned int direction);
/*@}*/
/**
* @defgroup CTrigger Trigger
*
* @brief These functions deal with trigger control on the camera.
*/
/*@{*/
/**
* Retrieve trigger information from the camera.
*
* @see fc2GetTriggerMode()
* @see fc2SetTriggerMode()
* @see fc2SetTriggerModeBroadcast()
* @see fc2GetTriggerDelayInfo()
* @see fc2GetTriggerDelay()
* @see fc2SetTriggerDelay()
*
* @param context The fc2Context to be used.
* @param triggerModeInfo Structure to receive trigger information.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetTriggerModeInfo(
fc2Context context,
fc2TriggerModeInfo* triggerModeInfo );
/**
* Retrieve current trigger settings from the camera.
*
* @see fc2GetTriggerModeInfo()
* @see fc2SetTriggerMode()
* @see fc2SetTriggerModeBroadcast()
* @see fc2GetTriggerDelayInfo()
* @see fc2GetTriggerDelay()
* @see fc2SetTriggerDelay()
*
* @param context The fc2Context to be used.
* @param triggerMode Structure to receive trigger mode settings.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2GetTriggerMode(
fc2Context context,
fc2TriggerMode* triggerMode );
/**
* Set the specified trigger settings to the camera.
*
* @see fc2GetTriggerModeInfo()
* @see fc2GetTriggerMode()
* @see fc2GetTriggerDelayInfo()
* @see fc2GetTriggerDelay()
* @see fc2SetTriggerDelay()
* @see fc2SetTriggerModeBroadcast()
*
* @param context The fc2Context to be used.
* @param triggerMode Structure providing trigger mode settings.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetTriggerMode(
fc2Context context,
fc2TriggerMode* triggerMode );
/**
* Set the specified trigger settings to the camera.
*
* @see fc2GetTriggerModeInfo()
* @see fc2GetTriggerMode()
* @see fc2GetTriggerDelayInfo()
* @see fc2GetTriggerDelay()
* @see fc2SetTriggerDelay()
* @see fc2SetTriggerMode()
*
* @param context The fc2Context to be used.
* @param triggerMode Structure providing trigger mode settings.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2SetTriggerModeBroadcast(
fc2Context context,
fc2TriggerMode* triggerMode );
/**
* Fire the software trigger according to the DCAM specifications.
*
* @param context The fc2Context to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2FireSoftwareTrigger(
fc2Context context );
/**
* Fire the software trigger according to the DCAM specifications.
*
* @param context The fc2Context to be used.
*
* @return A fc2Error indicating the success or failure of the function.
*/
FLYCAPTURE2_C_API fc2Error
fc2FireSoftwareTriggerBroadcast(
fc2Context context );
/**
* Retrieve trigger delay information from the camera.
*
* @see fc2GetTriggerModeInfo()
* @see fc2GetTriggerMode()
* @see fc2SetTriggerMode()
* @see fc2GetTriggerDelay()
* @see fc2SetTriggerDelay()
* @see fc2SetTriggerDelayBroadcast()
*
* @param context The fc2Context to be used.
* @param triggerDelayInfo Structure to receive trigger delay information.
*