-
Notifications
You must be signed in to change notification settings - Fork 2
/
VimbaC.pas
2207 lines (2069 loc) · 107 KB
/
VimbaC.pas
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
Unit VimbaC;
(*=============================================================================
Copyright (C) 2012 - 2017 Allied Vision Technologies. All Rights Reserved.
Redistribution of this header file, in original or modified form, without
prior written consent of Allied Vision Technologies is prohibited.
-------------------------------------------------------------------------------
File: VimbaC.h
Description: Main header file for the VimbaC API.
-------------------------------------------------------------------------------
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============================================================================*)
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
Interface
uses
VmbCommonTypes;
Type
PPANSIchar = ^PAnsiChar;
PPVmbUInt32_t = ^VmbUint32_t;
PPByte = ^Byte;
// This file describes all necessary definitions for using Allied Vision's
// VimbaC API. These type definitions are designed to be portable from other
// languages and other operating systems.
//
// General conventions:
// - Method names are composed in the following manner:
// - Vmb"Action" example: VmbStartup()
// - Vmb"Entity""Action" or Vmb"ActionTarget""Action" example: VmbInterfaceOpen()
// - Vmb"Entity""SubEntity/ActionTarget""Action" example: VmbFeatureCommandRun()
// - Methods dealing with features, memory or registers accept a handle from the following
// entity list as first parameter: System, Camera, Interface and AncillaryData.
// All other methods taking handles accept only a specific handle.
// - Strings (generally declared as "const char *") are assumed to have a trailing 0 character
// - All pointer parameters should of course be valid, except if stated otherwise.
// - To ensure compatibility with older programs linked against a former version of the API,
// all struct* parameters have an accompanying sizeofstruct parameter.
// - Functions returning lists are usually called twice: once with a zero buffer
// to get the length of the list, and then again with a buffer of the correct length.
//===== #DEFINES ==============================================================
(*
{$ifdef WIN32}
{$ifdef AVT_VMBAPI_C_EXPORTS} // DLL exports
{$define IMEXPORTC} // /*__declspec(dllexport) HINT: We export via the .def file */
{$elseifdef AVT_VMBAPI_C_LIB} // static LIB
{$define IMEXPORTC}
{$else} // import
{$define IMEXPORTC __declspec(dllimport)}
{$endif}
{$endif}
*)
//===== TYPES ==============================================================
{$ifdef __cplusplus}
extern "C"
{$endif}
// Timeout parameter signaling a blocking call
const VMBINFINITE = $FFFFFFFF;
{$EXTERNALSYM VMBINFINITE}
// Constant for the Vimba handle to be able to access Vimba system features
//gVimbaHandle = Pointer(1); //access Vimba system features
gVimbaHandle = VmbHandle_t(1);
VMB_CALL = 'VimbaC.dll';
{$IFDEF WIN32}
{$ALIGN 1}
{$ELSE} // Win64
{$ALIGN 8}
{$ENDIF}
// Camera interface type (for instance FireWire, Ethernet);
type
VmbInterfaceType = (
VmbInterfaceUnknown = 0, // Interface is not known to this version of the API
VmbInterfaceFirewire = 1, // 1394
VmbInterfaceEthernet = 2, // GigE
VmbInterfaceUsb = 3, // USB 3.0
VmbInterfaceCL = 4, // Camera Link
VmbInterfaceCSI2 = 5); // CSI-2
VmbInterface_t = VmbUint32_t; // Type for an Interface; for values see VmbInterfaceType
// Access mode for configurable devices (interfaces, cameras).
// Used in VmbCameraInfo_t, VmbInterfaceInfo_t as flags, so multiple modes can be
// announced, while in VmbCameraOpen(), no combination must be used.
VmbAccessModeType = (
VmbAccessModeNone = 0, // No access
VmbAccessModeFull = 1, // Read and write access
VmbAccessModeRead = 2, // Read-only access
VmbAccessModeConfig = 4, // Configuration access (GeV)
VmbAccessModeLite = 8); // Read and write access without feature access (only addresses)
VmbAccessMode_t = VmbUint32_t; // Type for an AccessMode; for values see VmbAccessModeType
// Interface information.
// Holds read-only information about an interface.
VmbInterfaceInfo_t = Record
interfaceIdString : pANSIchar; // Unique identifier for each interface
interfaceType : VmbInterface_t; // Interface type, see VmbInterfaceType
interfaceName : pANSIchar; // Interface name, given by the transport layer
serialString : pANSIchar; // Serial number
permittedAccess : VmbAccessMode_t; // Used access mode, see VmbAccessModeType
end;
VmbCameraInfo_t = Record
cameraIdString : pANSIchar; // Unique identifier for each camera
cameraName : pANSIchar; // Name of the camera
modelName : pANSIchar; // Model name
serialString : pANSIchar; // Serial number
permittedAccess : VmbAccessMode_t; // Used access mode, see VmbAccessModeType
interfaceIdString : pANSIchar; // Unique value for each interface or bus
end;
// Supported feature data types
VmbFeatureDataType = (
VmbFeatureDataUnknown = 0, // Unknown feature type
VmbFeatureDataInt = 1, // 64 bit integer feature
VmbFeatureDataFloat = 2, // 64 bit floating point feature
VmbFeatureDataEnum = 3, // Enumeration feature
VmbFeatureDataString = 4, // String feature
VmbFeatureDataBool = 5, // Boolean feature
VmbFeatureDataCommand = 6, // Command feature
VmbFeatureDataRaw = 7, // Raw (direct register access) feature
VmbFeatureDataNone = 8 // Feature with no data
);
VmbFeatureData_t = VmbUint32_t; // Data type for a Feature; for values see VmbFeatureDataType
// Feature visibility
VmbFeatureVisibilityType = (
VmbFeatureVisibilityUnknown = 0, // Feature visibility is not known
VmbFeatureVisibilityBeginner = 1, // Feature is visible in feature list (beginner level)
VmbFeatureVisibilityExpert = 2, // Feature is visible in feature list (expert level)
VmbFeatureVisibilityGuru = 3, // Feature is visible in feature list (guru level)
VmbFeatureVisibilityInvisible = 4 // Feature is not visible in feature list
);
VmbFeatureVisibility_t = VmbUint32_t; // Type for Feature visibility; for values see VmbFeatureVisibilityType
// Feature flags
VmbFeatureFlagsType = (
VmbFeatureFlagsNone = 0, // No additional information is provided
VmbFeatureFlagsRead = 1, // Static info about read access. Current status depends on access mode, check with VmbFeachtureAccessQuery()
VmbFeatureFlagsWrite = 2, // Static info about write access. Current status depends on access mode, check with VmbFeachtureAccessQuery()
VmbFeatureFlagsVolatile = 8, // Value may change at any time
VmbFeatureFlagsModifyWrite = 16 // Value may change after a write
);
VmbFeatureFlags_t = VmbUint32_t; // Type for Feature flags; for values see VmbFeatureFlagsType
// Feature information. Holds read-only information about a feature.
VmbFeatureInfo_t = Record
name : pANSIchar; // Name used in the API
featureDataType : VmbFeatureData_t; // Data type of this feature
featureFlags : VmbFeatureFlags_t; // Access flags for this feature
category : pANSIchar; // Category this feature can be found in
displayName : pANSIchar; // Feature name to be used in GUIs
pollingTime : VmbUint32_t; // Predefined polling time for volatile features
_unit : pANSIchar; // Measuring unit as given in the XML file
representation : pANSIchar; // Representation of a numeric feature
visibility : VmbFeatureVisibility_t; // GUI visibility
tooltip : pANSIchar; // Short description, e.g. for a tooltip
description : pANSIchar; // Longer description
sfncNamespace : pANSIchar; // Namespace this feature resides in
isStreamable : Boolean; // Indicates if a feature can be stored to / loaded from a file
hasAffectedFeatures : Boolean; // Indicates if the feature potentially affects other features
hasSelectedFeatures : Boolean; // Indicates if the feature selects other features
end;
// Info about possible entries of an enumeration feature
VmbFeatureEnumEntry_t = Record
name : pANSIchar; // Name used in the API
displayName : pANSIchar; // Enumeration entry name to be used in GUIs
visibility : VmbFeatureVisibility_t; // GUI visibility
tooltip : pANSIchar; // Short description, e.g. for a tooltip
description : pANSIchar; // Longer description
sfncNamespace : pANSIchar; // Namespace this feature resides in
intValue : VmbInt64_t; // Integer value of this enumeration entry
end;
// Status of a frame transfer
VmbFrameStatusType_t = (
VmbFrameStatusComplete = 0, // Frame has been completed without errors
VmbFrameStatusIncomplete = -1, // Frame could not be filled to the end
VmbFrameStatusTooSmall = -2, // Frame buffer was too small
VmbFrameStatusInvalid = -3 // Frame buffer was invalid
);
VmbFrameStatus_t = VmbInt32_t; // Type for the frame status; for values see VmbFrameStatusType
// Frame flags
VmbFrameFlagsType_t = (
VmbFrameFlagsNone = 0, // No additional information is provided
VmbFrameFlagsDimension = 1, // Frame's dimension is provided
VmbFrameFlagsOffset = 2, // Frame's offset is provided (ROI)
VmbFrameFlagsFrameID = 4, // Frame's ID is provided
VmbFrameFlagsTimestamp = 8 // Frame's timestamp is provided
);
VmbFrameFlags_t = VmbUint32_t; // Type for Frame flags; for values see VmbFrameFlagsType
// Frame delivered by the camera
VmbFrame_t = Record
//----- In -----
buffer : Pointer; // Image and ancillary data
bufferSize : VmbUint32_t; // Size of data buffer
context : Array[0..3] of Pointer; // 4 void pointer that can be employed by the user (e.g. for storing handles)
//----- Out -----
receiveStatus : VmbFrameStatus_t; // Resulting status of the receive operation
receiveFlags : VmbFrameFlags_t; // Flags indicating which additional frame information is available
imageSize : VmbUint32_t; // Size of the image data inside the data buffer
ancillarySize : VmbUint32_t; // Size of the ancillary data inside the data buffer
pixelFormat : VmbPixelFormat_t; // Pixel format of the image
width : VmbUint32_t; // Width of image
height : VmbUint32_t; // Height of image
offsetX : VmbUint32_t; // Horizontal offset of image
offsetY : VmbUint32_t; // Vertical offset of image
{$ifdef Win32}
frameID : VmbUint32_t; // Unique ID of this frame in the stream
timestamp : VmbUint32_t; // Timestamp set by the camera
{$else}
frameID : VmbUint64_t; // Unique ID of this frame in the stream
timestamp : VmbUint64_t; // Timestamp set by the camera
{$endif}
end;
// Type of features that are to be saved (persisted) to the XML file when using VmbCameraSettingsSave
VmbFeaturePersistType = (
VmbFeaturePersistAll = 0, // Save all features to XML, including look-up tables
VmbFeaturePersistStreamable = 1, // Save only features marked as streamable, excluding look-up tables
VmbFeaturePersistNoLUT = 2 // Save all features except look-up tables (default)
);
VmbFeaturePersist_t = VmbUint32_t; // Type for feature persistence; for values see VmbFeaturePersistType
// Parameters determining the operation mode of VmbCameraSettingsSave and VmbCameraSettingsLoad
VmbFeaturePersistSettings_t = Record
persistType : VmbFeaturePersist_t; // Type of features that are to be saved
maxIterations : VmbUint32_t; // Number of iterations when loading settings
loggingLevel : VmbUint32_t; // Determines level of detail for load/save settings logging
end;
PCamera = VmbCameraInfo_t;
// ----- Callbacks ------------------------------------------------------------
//
// Name: VmbInvalidationCallback
//
// Purpose: Invalidation Callback type for a function that gets called in a separate thread
// and has been registered with VmbFeatureInvalidationRegister()
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [in ] void* pUserContext Pointer to the user context, see VmbFeatureInvalidationRegister
//
// Details: While the callback is run, all feature data is atomic. After the
// callback finishes, the feature data might be updated with new values.
//
// Note: Do not spend too much time in this thread; it will prevent the feature values
// from being updated from any other thread or the lower-level drivers.
//
//typedef void (VMB_CALL *VmbInvalidationCallback)(
// const VmbHandle_t handle,
// const char* name,
// void* pUserContext);
Type
_VmbInvalidationCallback = Record
handle : VmbHandle_t;
name : pANSIchar;
pUserContext: Pointer;
End;
// Name: VmbFrameCallback
//
// Purpose: Frame Callback type for a function that gets called in a separate thread
// if a frame has been queued with VmbCaptureFrameQueue()
//
// Parameters:
//
// [in ] const VmbHandle_t cameraHandle Handle of the camera
// [out] VmbFrame_t* pFrame Frame completed
//
//typedef void (VMB_CALL *VmbFrameCallback)( const VmbHandle_t cameraHandle, VmbFrame_t* pFrame );
_VmbFrameCallback = record
cameraHandle: VmbHandle_t;
var pFrame : VmbFrame_t
end;
//Procedure VmbFrameCallback(cameraHandle: VmbHandle_t;
// var pFrame : VmbFrame_t);
// {$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//===== FUNCTION PROTOTYPES ===================================================
//----- API Version -----------------------------------------------------------
//
// Method: VmbVersionQuery()
//
// Purpose: Retrieve the version number of VimbaC.
//
// Parameters:
//
// [out] VmbVersionInfo_t* pVersionInfo Pointer to the struct where version information
// is copied
// [in ] VmbUint32_t sizeofVersionInfo Size of structure in bytes
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorStructSize: The given struct size is not valid for this version of the API
// - VmbErrorBadParameter: If "pVersionInfo" is NULL.
//
// Details: This function can be called at anytime, even before the API is
// initialized. All other version numbers may be queried via feature access.
//
//IMEXPORTC VmbError_t VMB_CALL VmbVersionQuery ( VmbVersionInfo_t* pVersionInfo,
// VmbUint32_t sizeofVersionInfo );
Function VmbVersionQuery(var pVersionInfo : VmbVersionInfo_t;
sizeofVersionInfo: VmbUint32_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//----- API Initialization ----------------------------------------------------
//
// Method: VmbStartup()
//
// Purpose: Initialize the VimbaC API.
//
// Parameters:
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorInternalFault: An internal fault occurred
//
// Details: On successful return, the API is initialized; this is a necessary call.
//
// Note: This method must be called before any VimbaC function other than VmbVersionQuery() is run.
//
//IMEXPORTC VmbError_t VMB_CALL VmbStartup ( void );
Function VmbStartup: VmbError_t; {$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbShutdown()
//
// Purpose: Perform a shutdown on the API.
//
// Parameters: none
//
// Returns: none
//
// Details: This will free some resources and deallocate all physical resources if applicable.
//
//IMEXPORTC void VMB_CALL VmbShutdown ( void );
Procedure VmbShutdown; {$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//----- Camera Enumeration & Information --------------------------------------
//
// Method: VmbCamerasList()
//
// Purpose: Retrieve a list of all cameras.
//
// Parameters:
//
// [out] VmbCameraInfo_t* pCameraInfo Array of VmbCameraInfo_t, allocated by
// the caller. The camera list is
// copied here. May be NULL if pNumFound is used for size query.
// [in ] VmbUint32_t listLength Number of VmbCameraInfo_t elements provided
// [out] VmbUint32_t* pNumFound Number of VmbCameraInfo_t elements found.
// [in ] VmbUint32_t sizeofCameraInfo Size of the structure (if pCameraInfo == NULL this parameter is ignored)
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorStructSize: The given struct size is not valid for this API version
// - VmbErrorMoreData: The given list length was insufficient to hold all available entries
// - VmbErrorBadParameter: If "pNumFound" was NULL
//
// Details: Camera detection is started with the registration of the "DiscoveryCameraEvent"
// event or the first call of VmbCamerasList(), which may be delayed if no
// "DiscoveryCameraEvent" event is registered (see examples).
// VmbCamerasList() is usually called twice: once with an empty array to query the
// list length, and then again with an array of the correct length. If camera
// lists change between the calls, pNumFound may deviate from the query return.
//
//IMEXPORTC VmbError_t VMB_CALL VmbCamerasList ( VmbCameraInfo_t* pCameraInfo,
// VmbUint32_t listLength,
// VmbUint32_t* pNumFound,
// VmbUint32_t sizeofCameraInfo );
Function VmbCamerasList(pCameraInfo : Pointer;//VmbCameraInfo_t;//pCamera;
listLength : VmbUint32_t;
var pNumFound : VmbUint32_t;
sizeofCameraInfo: VmbUint32_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbCameraInfoQuery()
//
// Purpose: Retrieve information on a camera given by an ID.
//
// Parameters:
//
// [in ] const char* idString ID of the camera
// [out] VmbCameraInfo_t* pInfo Structure where information will be copied. May be NULL.
// [in ] VmbUint32_t sizeofCameraInfo Size of the structure
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorNotFound: The designated camera cannot be found
// - VmbErrorStructSize: The given struct size is not valid for this API version
// - VmbErrorBadParameter: If "idString" was NULL
//
// Details: May be called if a camera has not been opened by the application yet.
// Examples for "idString":
// "DEV_81237473991" for an ID given by a transport layer,
// "169.254.12.13" for an IP address,
// "000F314C4BE5" for a MAC address or
// "DEV_1234567890" for an ID as reported by Vimba
//
Function VmbCameraInfoQuery(idString : pANSIchar;
var pInfo : VmbCameraInfo_t;
sizeofCameraInfo: VmbUint32_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbCameraOpen()
//
// Purpose: Open the specified camera.
//
// Parameters:
//
// [in ] const char* idString ID of the camera
// [in ] VmbAccessMode_t accessMode Determines the level of control you have on the camera
// [out] VmbHandle_t* pCameraHandle A camera handle
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorNotFound: The designated camera cannot be found
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorInvalidCall: If called from frame callback
// - VmbErrorBadParameter: If "idString" or "pCameraHandle" is NULL
//
// Details: A camera may be opened in a specific access mode, which determines
// the level of control you have on a camera.
// Examples for "idString":
// "DEV_81237473991" for an ID given by a transport layer,
// "169.254.12.13" for an IP address,
// "000F314C4BE5" for a MAC address or
// "DEV_1234567890" for an ID as reported by Vimba
//
//IMEXPORTC VmbError_t VMB_CALL VmbCameraOpen ( const char* idString,
// VmbAccessMode_t accessMode,
// VmbHandle_t* pCameraHandle );
Function VmbCameraOpen(idString : pANSIchar;
accessMode : VmbAccessMode_t;
pCameraHandle : VmbHandle_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbCameraClose()
//
// Purpose: Close the specified camera.
//
// Parameters:
//
// [in ] const VmbHandle_t cameraHandle A valid camera handle
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorInvalidCall: If called from frame callback
//
// Details: Depending on the access mode this camera was opened with, events are killed,
// callbacks are unregistered, and camera control is released.
//
//IMEXPORTC VmbError_t VMB_CALL VmbCameraClose ( const VmbHandle_t cameraHandle );
Function VmbCameraClose(cameraHandle: VmbHandle_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//----- Features ----------------------------------------------------------
//
// Method: VmbFeaturesList()
//
// Purpose: List all the features for this entity.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [out] VmbFeatureInfo_t* pFeatureInfoList An array of VmbFeatureInfo_t to be filled by the API. May be NULL if pNumFund is used for size query.
// [in ] VmbUint32_t listLength Number of VmbFeatureInfo_t elements provided
// [out] VmbUint32_t* pNumFound Number of VmbFeatureInfo_t elements found. May be NULL if pFeatureInfoList is not NULL.
// [in ] VmbUint32_t sizeofFeatureInfo Size of a VmbFeatureInfo_t entry
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorStructSize: The given struct size of VmbFeatureInfo_t is not valid for this version of the API
// - VmbErrorMoreData: The given list length was insufficient to hold all available entries
//
// Details: This method lists all implemented features, whether they are currently available or not.
// The list of features does not change as long as the camera/interface is connected.
// "pNumFound" returns the number of VmbFeatureInfo elements.
// This function is usually called twice: once with an empty list to query the length
// of the list, and then again with an list of the correct length.
//
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeaturesList ( const VmbHandle_t handle,
// VmbFeatureInfo_t* pFeatureInfoList,
// VmbUint32_t listLength,
// VmbUint32_t* pNumFound,
// VmbUint32_t sizeofFeatureInfo );
Function VmbFeaturesList(handle : VmbHandle_t;
pFeatureInfoList : VmbFeatureInfo_t;
const listLength : VmbUint32_t;
pNumFound : VmbUint32_t;
const sizeofFeatureInfo: VmbUint32_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
// Method: VmbFeatureInfoQuery()
//
// Purpose: Query information about the constant properties of a feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbFeatureInfo_t* pFeatureInfo The feature info to query
// [in ] VmbUint32_t sizeofFeatureInfo Size of the structure
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorStructSize: The given struct size is not valid for this version of the API
//
// Details: Users provide a pointer to VmbFeatureInfo_t, which is then set to the internal representation.
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureInfoQuery ( const VmbHandle_t handle,
// const char* name,
// VmbFeatureInfo_t* pFeatureInfo,
// VmbUint32_t sizeofFeatureInfo );
Function VmbFeatureInfoQuery(handle : VmbHandle_t;
name : PANSIChar;
var pFeatureInfo : VmbFeatureInfo_t;
sizeofFeatureInfo: VmbUint32_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbFeatureListAffected()
//
// Purpose: List all the features that might be affected by changes to this feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbFeatureInfo_t* pFeatureInfoList An array of VmbFeatureInfo_t to be filled by the API. May be NULL if pNumFound is used for size query.
// [in ] VmbUint32_t listLength Number of VmbFeatureInfo_t elements provided
// [out] VmbUint32_t* pNumFound Number of VmbFeatureInfo_t elements found. May be NULL is pFeatureInfoList is not NULL.
// [in ] VmbUint32_t sizeofFeatureInfo Size of a VmbFeatureInfo_t entry
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorStructSize: The given struct size of VmbFeatureInfo_t is not valid for this version of the API
// - VmbErrorMoreData: The given list length was insufficient to hold all available entries
//
// Details: This method lists all affected features, whether they are currently available or not.
// The value of affected features depends directly or indirectly on this feature
// (including all selected features).
// The list of features does not change as long as the camera/interface is connected.
// This function is usually called twice: once with an empty array to query the length
// of the list, and then again with an array of the correct length.
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureListAffected ( const VmbHandle_t handle,
// const char* name,
// VmbFeatureInfo_t* pFeatureInfoList,
// VmbUint32_t listLength,
// VmbUint32_t* pNumFound,
// VmbUint32_t sizeofFeatureInfo );
Function VmbFeatureListAffected(handle : VmbHandle_t;
name : PANSIChar;
var pFeatureInfoList: VmbFeatureInfo_t;
listLength : VmbUint32_t;
var pNumFound : VmbUint32_t;
sizeofFeatureInfo : VmbUint32_t):VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbFeatureListSelected()
//
// Purpose: List all the features selected by a given feature for this module.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbFeatureInfo_t* pFeatureInfoList An array of VmbFeatureInfo_t to be filled by the API. May be NULL if pNumFound is used for size query.
// [in ] VmbUint32_t listLength Number of VmbFeatureInfo_t elements provided
// [out] VmbUint32_t* pNumFound Number of VmbFeatureInfo_t elements found. May be NULL if pFeatureInfoList is not NULL.
// [in ] VmbUint32_t sizeofFeatureInfo Size of a VmbFeatureInfo_t entry
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorStructSize: The given struct size is not valid for this version of the API
// - VmbErrorMoreData: The given list length was insufficient to hold all available entries
//
// Details: This method lists all selected features, whether they are currently available or not.
// Features with selected features ("selectors") have no direct impact on the camera,
// but only influence the register address that selected features point to.
// The list of features does not change while the camera/interface is connected.
// This function is usually called twice: once with an empty array to query the length
// of the list, and then again with an array of the correct length.
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureListSelected ( const VmbHandle_t handle,
// const char* name,
// VmbFeatureInfo_t* pFeatureInfoList,
// VmbUint32_t listLength,
// VmbUint32_t* pNumFound,
// VmbUint32_t sizeofFeatureInfo );
Function VmbFeatureListSelected(handle : VmbHandle_t;
name : PANSIChar;
var pFeatureInfoList: VmbFeatureInfo_t;
listLength : VmbUint32_t;
var pNumFound : VmbUint32_t;
sizeofFeatureInfo : VmbUint32_t):VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbFeatureAccessQuery()
//
// Purpose: Return the dynamic read and write capabilities of this feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features.
// [in ] const char * name Name of the feature.
// [out] VmbBool_t * pIsReadable Indicates if this feature is readable. May be NULL.
// [out] VmbBool_t * pIsWriteable Indicates if this feature is writable. May be NULL.
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorBadParameter: If "pIsReadable" and "pIsWriteable" were both NULL
// - VmbErrorNotFound: The feature was not found
//
// Details: The access mode of a feature may change. For example, if "PacketSize"
// is locked while image data is streamed, it is only readable.
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureAccessQuery ( const VmbHandle_t handle,
// const char* name,
// VmbBool_t * pIsReadable,
// VmbBool_t * pIsWriteable );
Function VmbFeatureAccessQuery(handle : VmbHandle_t;
name : PANSIChar;
var pIsReadable : VmbBool_t;
var pIsWriteable: VmbBool_t):VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//-----Integer -------
//
// Method: VmbFeatureIntGet()
//
// Purpose: Get the value of an integer feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbInt64_t* pValue Value to get
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Integer
// - VmbErrorNotFound: The feature was not found
// - VmbErrorBadParameter: If "name" or "pValue" is NULL
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntGet ( const VmbHandle_t handle,
// const char* name,
// VmbInt64_t* pValue );
Function VmbFeatureIntGet(handle: VmbHandle_t;
name : pANSIchar;
var pValue: VmbInt64_t): VmbError_t; cdecl;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
// Method: VmbFeatureIntSet()
//
// Purpose: Set the value of an integer feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [in ] VmbInt64_t value Value to set
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Integer
// - VmbErrorInvalidValue: If "value" is either out of bounds or not an increment of the minimum
// - VmbErrorBadParameter: If "name" is NULL
// - VmbErrorNotFound: If the feature was not found
// - VmbErrorInvalidCall: If called from frame callback
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntSet ( const VmbHandle_t handle,
// const char* name,
// VmbInt64_t value );
Function VmbFeatureIntSet(handle: VmbHandle_t;
name : pANSIchar;
value : VmbInt64_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbFeatureIntRangeQuery()
//
// Purpose: Query the range of an integer feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbInt64_t* pMin Minimum value to be returned. May be NULL.
// [out] VmbInt64_t* pMax Maximum value to be returned. May be NULL.
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorBadParameter: If "name" is NULL or "pMin" and "pMax" are NULL
// - VmbErrorWrongType: The type of feature "name" is not Integer
// - VmbErrorNotFound: If the feature was not found
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntRangeQuery ( const VmbHandle_t handle,
// const char* name,
// VmbInt64_t* pMin,
// VmbInt64_t* pMax );
Function VmbFeatureIntRangeQuery(handle: VmbHandle_t;
name : PANSIchar;
pMin : VmbInt64_t;
pMax : VmbInt64_t): VmbError_t;
// {$ifdef Win64} cdecl; {$else} stdcall; {$endif}
// Method: VmbFeatureIntIncrementQuery()
//
// Purpose: Query the increment of an integer feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbInt64_t* pValue Value of the increment to get.
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Integer
// - VmbErrorNotFound: The feature was not found
// VmbErrorBadParameter: If "name" or "pValue" is NULL
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureIntIncrementQuery ( const VmbHandle_t handle,
// const char* name,
// VmbInt64_t* pValue );
Function VmbFeatureIntIncrementQuery(handle: VmbHandle_t;
name: pANSIchar;
pValue: VmbInt64_t): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//-----Float --------
//
// Method: VmbFeatureFloatGet()
//
// Purpose: Get the value of a float feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] double* pValue Value to get
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Float
// - VmbErrorBadParameter: If "name" or "pValue" is NULL
// - VmbErrorNotFound: The feature was not found
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatGet ( const VmbHandle_t handle,
// const char* name,
// double* pValue );
Function VmbFeatureFloatGet(handle : VmbHandle_t;
name : pANSIchar;
var pValue: Double): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
// Method: VmbFeatureFloatSet()
//
// Purpose: Set the value of a float feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [in ] double value Value to set
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Float
// - VmbErrorInvalidValue: If "value" is not within valid bounds
// - VmbErrorNotFound: The feature was not found
// - VmbErrorBadParameter: If "name" is NULL
// - VmbErrorInvalidCall: If called from frame callback
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatSet ( const VmbHandle_t handle,
// const char* name,
// double value );
Function VmbFeatureFloatSet(handle: VmbHandle_t;
name : pANSIchar;
value : Double): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
// Method: VmbFeatureFloatRangeQuery()
//
// Purpose: Query the range of a float feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] double* pMin Minimum value to be returned. May be NULL.
// [out] double* pMax Maximum value to be returned. May be NULL.
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Float
// - VmbErrorNotFound: The feature was not found
// - VmbBadParameter: If "name" is NULL or "pMin" and "pMax" are NULL
//
// Details: Only one of the values may be queried if the other parameter is set to NULL,
// but if both parameters are NULL, an error is returned.
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatRangeQuery ( const VmbHandle_t handle,
// const char* name,
// double* pMin,
// double* pMax );
Function VmbFeatureFloatRangeQuery(handle: VmbHandle_t;
name: pANSIchar;
pMin: double;
pMax: double): VmbError_t;
// {$ifdef Win64} cdecl; {$else} stdcall; {$endif}
// Method: VmbFeatureFloatIncrementQuery()
//
// Purpose: Query the increment of an float feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] VmbBool_t * pHasIncrement "true" if this float feature has an increment.
// [out] double* pValue Value of the increment to get.
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Integer
// - VmbErrorNotFound: The feature was not found
// VmbErrorBadParameter: If "name" or "pValue" is NULL
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureFloatIncrementQuery ( const VmbHandle_t handle,
// const char* name,
// VmbBool_t* pHasIncrement,
// double* pValue );
Function VmbFeatureFloatIncrementQuery(handle : VmbHandle_t;
name : pANSIchar;
pHasIncrement: VmbBool_t;
pValue : double): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//-----Enum --------
//
// Method: VmbFeatureEnumGet()
//
// Purpose: Get the value of an enumeration feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [out] const char** pValue The current enumeration value. The returned value
// is a reference to the API value
//
// Returns:
//
// - VmbErrorSuccess: If no error
// - VmbErrorApiNotStarted: VmbStartup() was not called before the current command
// - VmbErrorBadHandle: The given handle is not valid
// - VmbErrorInvalidAccess: Operation is invalid with the current access mode
// - VmbErrorWrongType: The type of feature "name" is not Enumeration
// - VmbErrorNotFound: The feature was not found
// - VmbErrorBadParameter: If "name" or "pValue" is NULL
//
//IMEXPORTC VmbError_t VMB_CALL VmbFeatureEnumGet ( const VmbHandle_t handle,
// const char* name,
// const char** pValue );
Function VmbFeatureEnumGet(handle: VmbHandle_t;
name : PANSIchar;
pValue: PPANSIchar): VmbError_t;
{$ifdef Win64} cdecl; {$else} stdcall; {$endif}
//
// Method: VmbFeatureEnumSet()
//
// Purpose: Set the value of an enumeration feature.
//
// Parameters:
//
// [in ] const VmbHandle_t handle Handle for an entity that exposes features
// [in ] const char* name Name of the feature
// [in ] const char* value Value to set
//
// Returns: