From 8d6391d23d48a17a6db832b528f78021c5212932 Mon Sep 17 00:00:00 2001 From: jarek Date: Fri, 21 Dec 2018 09:12:54 -0500 Subject: [PATCH] * Upgrade presets for FlyCapture 2.13.3.31 (pull #613) --- CHANGELOG.md | 3 +- ci/install-travis.sh | 27 +- ci/install-windows.sh | 20 +- flycapture/README.md | 4 +- flycapture/cppbuild.sh | 2 +- flycapture/platform/pom.xml | 2 +- flycapture/pom.xml | 2 +- .../org/bytedeco/javacpp/FlyCapture2.java | 8591 ++++++------ .../org/bytedeco/javacpp/FlyCapture2_C.java | 11241 ++++++++-------- .../bytedeco/javacpp/presets/FlyCapture2.java | 22 +- .../javacpp/presets/FlyCapture2_C.java | 13 +- platform/pom.xml | 2 +- 12 files changed, 9919 insertions(+), 10010 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea749b38fbf..61803a1cea5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Add `FlyCapture2Video.h` and `FlyCapture2VideoDef.h`, and remove `AVIRecorder.h` in presets for FlyCapture * Switch to Clang for Android builds with recent versions of the NDK ([issue #562](https://github.com/bytedeco/javacpp-presets/issues/562)) * Include `sys/sysinfo.h` for system API of Linux * Include `ucrtbase.dll` when bundling the runtime for Visual Studio 2015 on Windows ([issue bytedeco/javacv#1098](https://github.com/bytedeco/javacv/issues/1098)) @@ -14,7 +15,7 @@ * Add builds for `linux-mips64el` to presets for ARToolKitPlus, Chilitags, flandmark, OpenBLAS, and FFTW ([pull #637](https://github.com/bytedeco/javacpp-presets/pull/637)) * Update sample code for GSL with a more complex example ([issue #636](https://github.com/bytedeco/javacpp-presets/issues/636)) * Fix CUDA build for OpenCV on Mac OS X missing `libopencv_cudev.dylib` ([issue #626](https://github.com/bytedeco/javacpp-presets/issues/626)) - * Upgrade presets for OpenCV 4.0.0, and FFmpeg 4.1, HDF5 1.10.4, MKL 2019.1, MKL-DNN 0.17.1, OpenBLAS 0.3.4, Leptonica 1.77.0, Tesseract 4.0.0, cuDNN 7.4, MXNet 1.3.1, TensorFlow 1.12.0, and their dependencies + * Upgrade presets for OpenCV 4.0.0, and FFmpeg 4.1, FlyCapture 2.13.3.31, HDF5 1.10.4, MKL 2019.1, MKL-DNN 0.17.1, OpenBLAS 0.3.4, Leptonica 1.77.0, Tesseract 4.0.0, cuDNN 7.4, MXNet 1.3.1, TensorFlow 1.12.0, and their dependencies ### October 15, 2018 version 1.4.3 * Keep globally shared dummy deallocator for `TF_Tensor` out of `PointerScope` diff --git a/ci/install-travis.sh b/ci/install-travis.sh index 5fd401db96c..5895301abaf 100755 --- a/ci/install-travis.sh +++ b/ci/install-travis.sh @@ -79,23 +79,27 @@ if [[ "$OS" == "linux-x86" ]] || [[ "$OS" == "linux-x86_64" ]] || [[ "$OS" =~ an if [[ "$PROJ" =~ flycapture ]]; then if [ "$OS" == "linux-x86_64" ]; then - if [[ $(find $HOME/downloads/flycap.tar.gz -type f -size +1000000c 2>/dev/null) ]]; then + if [[ $(find $HOME/downloads/flycapture2-2.13.3.31-amd64-pkg_xenial.tgz -type f -size +1000000c 2>/dev/null) ]]; then echo "Found flycap64 in cache and size seems ok" else echo "Downloading flycap64 as not found in cache or too small" - python $TRAVIS_BUILD_DIR/ci/gDownload.py 0B2xpvMUzviShS1I1MzN0SmQ1MHc $HOME/downloads/flycap.tar.gz + python $TRAVIS_BUILD_DIR/ci/gDownload.py 1YtVjdnbQLZHX_ocQ6xAmiq6pjftuPOPd $HOME/downloads/flycapture2-2.13.3.31-amd64-pkg_xenial.tgz fi - tar xzvf $HOME/downloads/flycap.tar.gz -C $TRAVIS_BUILD_DIR/../ - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cp -R $HOME/build/include/* /usr/include; cp -R $HOME/build/lib/* /usr/lib" + tar xzvf $HOME/downloads/flycapture2-2.13.3.31-amd64-pkg_xenial.tgz -C $TRAVIS_BUILD_DIR/../ + ls $TRAVIS_BUILD_DIR/../flycapture2-2.13.3.31-amd64/*.deb | while read fName; do ar vx $fName; tar -xvf data.tar.xz; done; + mv usr $TRAVIS_BUILD_DIR/../ + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cp -pr $HOME/build/usr/* /usr/" elif [ "$OS" == "linux-x86" ]; then - if [[ $(find $HOME/downloads/flycaplinux32.tar.gz -type f -size +1000000c 2>/dev/null) ]]; then + if [[ $(find $HOME/downloads/flycapture2-2.13.3.31-i386-pkg_xenial.tgz -type f -size +1000000c 2>/dev/null) ]]; then echo "Found flycap32 in cache and size seems ok" else echo "Downloading flycap32 as not found in cache or too small" - python $TRAVIS_BUILD_DIR/ci/gDownload.py 0B2xpvMUzviShaDhTN1FOUTE3UkE $HOME/downloads/flycaplinux32.tar.gz + python $TRAVIS_BUILD_DIR/ci/gDownload.py 1BOpSik1Fndagzjf4ykwzermt2qlTzsWI $HOME/downloads/flycapture2-2.13.3.31-i386-pkg_xenial.tgz fi - tar xzvf $HOME/downloads/flycaplinux32.tar.gz -C $TRAVIS_BUILD_DIR/../ - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cp -R $HOME/build/include/* /usr/include; cp -R $HOME/build/lib/* /usr/lib" + tar xzvf $HOME/downloads/flycapture2-2.13.3.31-i386-pkg_xenial.tgz -C $TRAVIS_BUILD_DIR/../ + ls $TRAVIS_BUILD_DIR/../flycapture2-2.13.3.31-i386/*.deb | while read fName; do ar vx $fName; tar -xvf data.tar.xz; done; + mv usr $TRAVIS_BUILD_DIR/../ + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cp -pr $HOME/build/usr/* /usr/" fi fi if [[ "$PROJ" =~ spinnaker ]]; then @@ -147,14 +151,15 @@ if [ "$OS" == "linux-armhf" ]; then pushd $HOME/userland bash buildme popd + if [[ "$PROJ" =~ flycapture ]]; then - if [[ $(find $HOME/downloads/flycapture.2.11.3.121_armhf.tar.gz -type f -size +1000000c 2>/dev/null) ]]; then + if [[ $(find $HOME/downloads/flycapture.2.13.3.31_armhf.tar.gz -type f -size +1000000c 2>/dev/null) ]]; then echo "Found flycap-armhf in cache and size seems ok" else echo "Downloading flycap-armhf as not found in cache or too small" - python $TRAVIS_BUILD_DIR/ci/gDownload.py 0B2xpvMUzviShMjVXZFlveXpyWE0 $HOME/downloads/flycapture.2.11.3.121_armhf.tar.gz + python $TRAVIS_BUILD_DIR/ci/gDownload.py 16NuUBs2MXQpVYqzDCEr9KdMng-6rHuDI $HOME/downloads/flycapture.2.13.3.31_armhf.tar.gz fi - cp $HOME/downloads/flycapture.2.11.3.121_armhf.tar.gz $TRAVIS_BUILD_DIR/downloads/ + cp $HOME/downloads/flycapture.2.13.3.31_armhf.tar.gz $TRAVIS_BUILD_DIR/downloads/ fi fi diff --git a/ci/install-windows.sh b/ci/install-windows.sh index 972f9be8c01..d9262d57d91 100755 --- a/ci/install-windows.sh +++ b/ci/install-windows.sh @@ -54,25 +54,21 @@ cd .. if [[ "$PROJ" =~ flycapture ]]; then echo Flycapture install if [ "$OS" == "windows-x86_64" ]; then - if [[ $(find /c/Downloads/pgr.zip -type f -size +1000000c 2>/dev/null) ]]; then + if [[ $(find /c/Downloads/FlyCapture_2.13.3.31_x64.msi -type f -size +1000000c 2>/dev/null) ]]; then echo "Found flycap in cache and size seems ok" else - echo "Downloading pgr.zip to cache as not found" - /c/python27/python $APPVEYOR_BUILD_FOLDER/ci/gDownload.py 0B2xpvMUzviShRFl3aWVWOVFPYlU /c/Downloads/pgr.zip + echo "Downloading flycap to cache as not found" + /c/python27/python $APPVEYOR_BUILD_FOLDER/ci/gDownload.py 14QM7W5RHhvZanF1UBobgEIvwdy6VwTht /c/Downloads/FlyCapture_2.13.3.31_x64.msi fi - unzip /c/Downloads/pgr.zip - mkdir -p /c/Program\ Files/Point\ Grey\ Research - mv Point\ Grey\ Research/* /c/Program\ Files/Point\ Grey\ Research + msiexec //quiet //i c:\\Downloads\\FlyCapture_2.13.3.31_x64.msi ADDLOCAL=ALL elif [ "$OS" == "windows-x86" ]; then - if [[ $(find /c/Downloads/pgr32.zip -type f -size +1000000c 2>/dev/null) ]]; then + if [[ $(find /c/Downloads/FlyCapture_2.13.3.31_x86.msi -type f -size +1000000c 2>/dev/null) ]]; then echo "Found flycap32 in cache and size seems ok" else - echo "Downloading pgr32.zip to cache as not found" - /c/python27/python $APPVEYOR_BUILD_FOLDER/ci/gDownload.py 0B2xpvMUzviShQlpQSEFhZkUwc0U /c/Downloads/pgr32.zip + echo "Downloading flycap32 to cache as not found" + /c/python27/python $APPVEYOR_BUILD_FOLDER/ci/gDownload.py 1ctSSAMF5IkxTKWiiLtID-ltmm27pHFdr /c/Downloads/FlyCapture_2.13.3.31_x86.msi fi - unzip /c/Downloads/pgr32.zip - mkdir -p /c/Program\ Files/Point\ Grey\ Research - mv Point\ Grey\ Research/* /c/Program\ Files/Point\ Grey\ Research + msiexec //quiet //i c:\\Downloads\\FlyCapture_2.13.3.31_x86.msi ADDLOCAL=ALL fi echo "Finished flycapture install" fi diff --git a/flycapture/README.md b/flycapture/README.md index 319853740f5..441fedb2fa6 100644 --- a/flycapture/README.md +++ b/flycapture/README.md @@ -5,7 +5,7 @@ Introduction ------------ This directory contains the JavaCPP Presets module for: - * FlyCapture 2.11.3.121 http://www.ptgrey.com/flycapture-sdk + * FlyCapture 2.13.3.31 http://www.ptgrey.com/flycapture-sdk Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. @@ -42,7 +42,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic org.bytedeco.javacpp-presets flycapture-platform - 2.11.3.121-1.4.3 + 2.13.3.31-1.4.3 diff --git a/flycapture/cppbuild.sh b/flycapture/cppbuild.sh index 9d17b459c1e..0b88f20317b 100755 --- a/flycapture/cppbuild.sh +++ b/flycapture/cppbuild.sh @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then exit fi -FLYCAPTURE_VERSION=2.11.3.121 +FLYCAPTURE_VERSION=2.13.3.31 case $PLATFORM in linux-arm*) diff --git a/flycapture/platform/pom.xml b/flycapture/platform/pom.xml index c5d7d9c50c5..e4e67f0705f 100644 --- a/flycapture/platform/pom.xml +++ b/flycapture/platform/pom.xml @@ -12,7 +12,7 @@ org.bytedeco.javacpp-presets flycapture-platform - 2.11.3.121-${project.parent.version} + 2.13.3.31-${project.parent.version} JavaCPP Presets Platform for FlyCapture diff --git a/flycapture/pom.xml b/flycapture/pom.xml index 4c00461620a..80f373a3800 100644 --- a/flycapture/pom.xml +++ b/flycapture/pom.xml @@ -11,7 +11,7 @@ org.bytedeco.javacpp-presets flycapture - 2.11.3.121-${project.parent.version} + 2.13.3.31-${project.parent.version} JavaCPP Presets for FlyCapture diff --git a/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2.java b/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2.java index e7d0bd45015..93f4db21a6d 100644 --- a/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2.java +++ b/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.4.3: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.4.4-SNAPSHOT: DO NOT EDIT THIS FILE package org.bytedeco.javacpp; @@ -89,7 +89,7 @@ public class FlyCapture2 extends org.bytedeco.javacpp.presets.FlyCapture2 { // Parsed from //============================================================================= -// Copyright � 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved. +// Copyright (c) 2001-2018 FLIR Systems, Inc. All Rights Reserved. // // This software is the confidential and proprietary information of FLIR // Integrated Imaging Solutions, Inc. ("Confidential Information"). You @@ -105,12 +105,8 @@ public class FlyCapture2 extends org.bytedeco.javacpp.presets.FlyCapture2 { // THIS SOFTWARE OR ITS DERIVATIVES. //============================================================================= -//============================================================================= -// $Id: FlyCapture2Defs.h 318533 2017-03-09 22:41:16Z corinal $ -//============================================================================= - -// #ifndef PGR_FC2_FLYCAPTURE2DEFS_H -// #define PGR_FC2_FLYCAPTURE2DEFS_H +// #ifndef FLIR_FC2_FLYCAPTURE2DEFS_H +// #define FLIR_FC2_FLYCAPTURE2DEFS_H // #include @@ -128,4164 +124,4138 @@ public class FlyCapture2 extends org.bytedeco.javacpp.presets.FlyCapture2 { // #ifndef FULL_32BIT_VALUE public static final int FULL_32BIT_VALUE = 0x7FFFFFFF; // #endif - /** - * \defgroup GlobalConstants Global constants - */ - - /*@{*/ - - /** The maximum length that is allocated for a string. */ - @Namespace("FlyCapture2") @MemberGetter public static native @Cast("const unsigned int") int sk_maxStringLength(); - public static final int sk_maxStringLength = sk_maxStringLength(); - - /** The maximum number of ports one device can have. */ - @Namespace("FlyCapture2") @MemberGetter public static native @Cast("const unsigned int") int sk_maxNumPorts(); - public static final int sk_maxNumPorts = sk_maxNumPorts(); - - /*@}*/ - - /** - * \defgroup Enumerations Enumerations - */ - - /*@{*/ - - /** The error types returned by functions. */ - /** enum FlyCapture2::ErrorType */ - public static final int - /** Undefined */ - PGRERROR_UNDEFINED = -1, - /** Function returned with no errors. */ - PGRERROR_OK = 0, - /** General failure. */ - PGRERROR_FAILED = 1, - /** Function has not been implemented. */ - PGRERROR_NOT_IMPLEMENTED = 2, - /** Could not connect to Bus Master. */ - PGRERROR_FAILED_BUS_MASTER_CONNECTION = 3, - /** Camera has not been connected. */ - PGRERROR_NOT_CONNECTED = 4, - /** Initialization failed. */ - PGRERROR_INIT_FAILED = 5, - /** Camera has not been initialized. */ - PGRERROR_NOT_INTITIALIZED = 6, - /** Invalid parameter passed to function. */ - PGRERROR_INVALID_PARAMETER = 7, - /** Setting set to camera is invalid. */ - PGRERROR_INVALID_SETTINGS = 8, - /** Invalid Bus Manager object. */ - PGRERROR_INVALID_BUS_MANAGER = 9, - /** Could not allocate memory. */ - PGRERROR_MEMORY_ALLOCATION_FAILED = 10, - /** Low level error. */ - PGRERROR_LOW_LEVEL_FAILURE = 11, - /** Device not found. */ - PGRERROR_NOT_FOUND = 12, - /** GUID failure. */ - PGRERROR_FAILED_GUID = 13, - /** Packet size set to camera is invalid. */ - PGRERROR_INVALID_PACKET_SIZE = 14, - /** Invalid mode has been passed to function. */ - PGRERROR_INVALID_MODE = 15, - /** Error due to not being in Format7. */ - PGRERROR_NOT_IN_FORMAT7 = 16, - /** This feature is unsupported. */ - PGRERROR_NOT_SUPPORTED = 17, - /** Timeout error. */ - PGRERROR_TIMEOUT = 18, - /** Bus Master Failure. */ - PGRERROR_BUS_MASTER_FAILED = 19, - /** Generation Count Mismatch. */ - PGRERROR_INVALID_GENERATION = 20, - /** Look Up Table failure. */ - PGRERROR_LUT_FAILED = 21, - /** IIDC failure. */ - PGRERROR_IIDC_FAILED = 22, - /** Strobe failure. */ - PGRERROR_STROBE_FAILED = 23, - /** Trigger failure. */ - PGRERROR_TRIGGER_FAILED = 24, - /** Property failure. */ - PGRERROR_PROPERTY_FAILED = 25, - /** Property is not present. */ - PGRERROR_PROPERTY_NOT_PRESENT = 26, - /** Register access failed. */ - PGRERROR_REGISTER_FAILED = 27, - /** Register read failed. */ - PGRERROR_READ_REGISTER_FAILED = 28, - /** Register write failed. */ - PGRERROR_WRITE_REGISTER_FAILED = 29, - /** Isochronous failure. */ - PGRERROR_ISOCH_FAILED = 30, - /** Isochronous transfer has already been started. */ - PGRERROR_ISOCH_ALREADY_STARTED = 31, - /** Isochronous transfer has not been started. */ - PGRERROR_ISOCH_NOT_STARTED = 32, - /** Isochronous start failed. */ - PGRERROR_ISOCH_START_FAILED = 33, - /** Isochronous retrieve buffer failed. */ - PGRERROR_ISOCH_RETRIEVE_BUFFER_FAILED = 34, - /** Isochronous stop failed. */ - PGRERROR_ISOCH_STOP_FAILED = 35, - /** Isochronous image synchronization failed. */ - PGRERROR_ISOCH_SYNC_FAILED = 36, - /** Isochronous bandwidth exceeded. */ - PGRERROR_ISOCH_BANDWIDTH_EXCEEDED = 37, - /** Image conversion failed. */ - PGRERROR_IMAGE_CONVERSION_FAILED = 38, - /** Image library failure. */ - PGRERROR_IMAGE_LIBRARY_FAILURE = 39, - /** Buffer is too small. */ - PGRERROR_BUFFER_TOO_SMALL = 40, - /** There is an image consistency error. */ - PGRERROR_IMAGE_CONSISTENCY_ERROR = 41, - /** The installed driver is not compatible with the library. */ - PGRERROR_INCOMPATIBLE_DRIVER = 42, - PGRERROR_FORCE_32BITS = FULL_32BIT_VALUE; - - /** The type of bus callback to register a callback function for. */ - /** enum FlyCapture2::BusCallbackType */ - public static final int - /** Register for all bus events. */ - BUS_RESET = 0, - /** Register for arrivals only. */ - ARRIVAL = 1, - /** Register for removals only. */ - REMOVAL = 2, - CALLBACK_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * The grab strategy employed during image transfer. This type controls - * how images that stream off the camera accumulate in a user buffer - * for handling. - */ - /* - @remark Unlike earlier versions of the FlyCapture SDK, it is no longer - * necessary to explicitly start the image grabbing process before - * specifying an image grabbing mode. - */ - /** enum FlyCapture2::GrabMode */ - public static final int - /** - * Grabs the newest image in the user buffer each time the - * RetrieveBuffer() function is called. Older images are dropped - * instead of accumulating in the user buffer. Grabbing blocks if the - * camera has not finished transmitting the next available image. If - * the camera is transmitting images faster than the application can - * grab them, images may be dropped and only the most recent image - * is stored for grabbing. Note that this mode is the equivalent of - * flycaptureLockLatest in earlier versions of the FlyCapture SDK. - */ - DROP_FRAMES = 0, - - /** - * Images accumulate in the user buffer, and the oldest image is - * grabbed for handling before being discarded. This member can be - * used to guarantee that each image is seen. However, image processing - * time must not exceed transmission time from the camera to the - * buffer. Grabbing blocks if the camera has not finished transmitting - * the next available image. The buffer size is controlled by the - * numBuffers parameter in the FC2Config struct. Note that this mode is - * the equivalent of flycaptureLockNext in earlier versions of the - * FlyCapture SDK. - */ - BUFFER_FRAMES = 1, - - /** - * Unspecified grab mode. - */ - UNSPECIFIED_GRAB_MODE = 2, - GRAB_MODE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Timeout options for grabbing images. */ - /** enum FlyCapture2::GrabTimeout */ - public static final int - /** Non-blocking wait. */ - TIMEOUT_NONE = 0, - /** Wait indefinitely. */ - TIMEOUT_INFINITE = -1, - /** Unspecified timeout setting. */ - TIMEOUT_UNSPECIFIED = -2, - GRAB_TIMEOUT_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Bandwidth allocation options for 1394 devices. */ - /** enum FlyCapture2::BandwidthAllocation */ - public static final int - /** Do not allocate bandwidth. */ - BANDWIDTH_ALLOCATION_OFF = 0, - /** Allocate bandwidth. This is the default setting. */ - BANDWIDTH_ALLOCATION_ON = 1, - /** - * Bandwidth allocation is not supported by either the camera or - * operating system. - */ - BANDWIDTH_ALLOCATION_UNSUPPORTED = 2, - /** Not specified. This leaves the current setting unchanged. */ - BANDWIDTH_ALLOCATION_UNSPECIFIED = 3, - BANDWIDTH_ALLOCATION_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Interfaces that a camera may use to communicate with a host. */ - /** enum FlyCapture2::InterfaceType */ - public static final int - /** IEEE-1394 (Includes 1394a and 1394b). */ - INTERFACE_IEEE1394 = 0, - /** USB 2.0. */ - INTERFACE_USB2 = 1, - /** USB 3.0. */ - INTERFACE_USB3 = 2, - /** GigE. */ - INTERFACE_GIGE = 3, - /** Unknown interface. */ - INTERFACE_UNKNOWN = 4, - INTERFACE_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * Camera properties. Not all properties may be supported, depending - * on the camera model. - */ - /** enum FlyCapture2::PropertyType */ - public static final int - /** Brightness. */ - BRIGHTNESS = 0, - /** Auto exposure. */ - AUTO_EXPOSURE = 1, - /** Sharpness */ - SHARPNESS = 2, - /** White balance. */ - WHITE_BALANCE = 3, - /** Hue. */ - HUE = 4, - /** Saturation. */ - SATURATION = 5, - /** Gamma. */ - GAMMA = 6, - /** Iris. */ - IRIS = 7, - /** Focus. */ - FOCUS = 8, - /** Zoom. */ - ZOOM = 9, - /** Pan. */ - PAN = 10, - /** Tilt. */ - TILT = 11, - /** Shutter. */ - SHUTTER = 12, - /** Gain. */ - GAIN = 13, - /** Trigger mode. */ - TRIGGER_MODE = 14, - /** Trigger delay. */ - TRIGGER_DELAY = 15, - /** Frame rate. */ - FRAME_RATE = 16, - /** Temperature. */ - TEMPERATURE = 17, - /** Unspecified property type. */ - UNSPECIFIED_PROPERTY_TYPE = 18, - PROPERTY_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Frame rates in frames per second. */ - /** enum FlyCapture2::FrameRate */ - public static final int - /** 1.875 fps. */ - FRAMERATE_1_875 = 0, - /** 3.75 fps. */ - FRAMERATE_3_75 = 1, - /** 7.5 fps. */ - FRAMERATE_7_5 = 2, - /** 15 fps. */ - FRAMERATE_15 = 3, - /** 30 fps. */ - FRAMERATE_30 = 4, - /** 60 fps. */ - FRAMERATE_60 = 5, - /** 120 fps. */ - FRAMERATE_120 = 6, - /** 240 fps. */ - FRAMERATE_240 = 7, - /** Custom frame rate for Format7 functionality. */ - FRAMERATE_FORMAT7 = 8, - /** Number of possible camera frame rates. */ - NUM_FRAMERATES = 9, - FRAMERATE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** DCAM video modes. */ - /** enum FlyCapture2::VideoMode */ - public static final int - /** 160x120 YUV444. */ - VIDEOMODE_160x120YUV444 = 0, - /** 320x240 YUV422. */ - VIDEOMODE_320x240YUV422 = 1, - /** 640x480 YUV411. */ - VIDEOMODE_640x480YUV411 = 2, - /** 640x480 YUV422. */ - VIDEOMODE_640x480YUV422 = 3, - /** 640x480 24-bit RGB. */ - VIDEOMODE_640x480RGB = 4, - /** 640x480 8-bit. */ - VIDEOMODE_640x480Y8 = 5, - /** 640x480 16-bit. */ - VIDEOMODE_640x480Y16 = 6, - /** 800x600 YUV422. */ - VIDEOMODE_800x600YUV422 = 7, - /** 800x600 RGB. */ - VIDEOMODE_800x600RGB = 8, - /** 800x600 8-bit. */ - VIDEOMODE_800x600Y8 = 9, - /** 800x600 16-bit. */ - VIDEOMODE_800x600Y16 = 10, - /** 1024x768 YUV422. */ - VIDEOMODE_1024x768YUV422 = 11, - /** 1024x768 RGB. */ - VIDEOMODE_1024x768RGB = 12, - /** 1024x768 8-bit. */ - VIDEOMODE_1024x768Y8 = 13, - /** 1024x768 16-bit. */ - VIDEOMODE_1024x768Y16 = 14, - /** 1280x960 YUV422. */ - VIDEOMODE_1280x960YUV422 = 15, - /** 1280x960 RGB. */ - VIDEOMODE_1280x960RGB = 16, - /** 1280x960 8-bit. */ - VIDEOMODE_1280x960Y8 = 17, - /** 1280x960 16-bit. */ - VIDEOMODE_1280x960Y16 = 18, - /** 1600x1200 YUV422. */ - VIDEOMODE_1600x1200YUV422 = 19, - /** 1600x1200 RGB. */ - VIDEOMODE_1600x1200RGB = 20, - /** 1600x1200 8-bit. */ - VIDEOMODE_1600x1200Y8 = 21, - /** 1600x1200 16-bit. */ - VIDEOMODE_1600x1200Y16 = 22, - /** Custom video mode for Format7 functionality. */ - VIDEOMODE_FORMAT7 = 23, - /** Number of possible video modes. */ - NUM_VIDEOMODES = 24, - VIDEOMODE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Camera modes for DCAM formats as well as Format7. */ - /** enum FlyCapture2::Mode */ - public static final int - MODE_0 = 0, - MODE_1 = 1, - MODE_2 = 2, - MODE_3 = 3, - MODE_4 = 4, - MODE_5 = 5, - MODE_6 = 6, - MODE_7 = 7, - MODE_8 = 8, - MODE_9 = 9, - MODE_10 = 10, - MODE_11 = 11, - MODE_12 = 12, - MODE_13 = 13, - MODE_14 = 14, - MODE_15 = 15, - MODE_16 = 16, - MODE_17 = 17, - MODE_18 = 18, - MODE_19 = 19, - MODE_20 = 20, - MODE_21 = 21, - MODE_22 = 22, - MODE_23 = 23, - MODE_24 = 24, - MODE_25 = 25, - MODE_26 = 26, - MODE_27 = 27, - MODE_28 = 28, - MODE_29 = 29, - MODE_30 = 30, - MODE_31 = 31, - /** Number of modes */ - NUM_MODES = 32, - MODE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Pixel formats available for Format7 modes. */ - /** enum FlyCapture2::PixelFormat */ - public static final int - /** 8 bits of mono information. */ - PIXEL_FORMAT_MONO8 = 0x80000000, - /** YUV 4:1:1. */ - PIXEL_FORMAT_411YUV8 = 0x40000000, - /** YUV 4:2:2. */ - PIXEL_FORMAT_422YUV8 = 0x20000000, - /** YUV 4:4:4. */ - PIXEL_FORMAT_444YUV8 = 0x10000000, - /** R = G = B = 8 bits. */ - PIXEL_FORMAT_RGB8 = 0x08000000, - /** 16 bits of mono information. */ - PIXEL_FORMAT_MONO16 = 0x04000000, - /** R = G = B = 16 bits. */ - PIXEL_FORMAT_RGB16 = 0x02000000, - /** 16 bits of signed mono information. */ - PIXEL_FORMAT_S_MONO16 = 0x01000000, - /** R = G = B = 16 bits signed. */ - PIXEL_FORMAT_S_RGB16 = 0x00800000, - /** 8 bit raw data output of sensor. */ - PIXEL_FORMAT_RAW8 = 0x00400000, - /** 16 bit raw data output of sensor. */ - PIXEL_FORMAT_RAW16 = 0x00200000, - /** 12 bits of mono information. */ - PIXEL_FORMAT_MONO12 = 0x00100000, - /** 12 bit raw data output of sensor. */ - PIXEL_FORMAT_RAW12 = 0x00080000, - /** 24 bit BGR. */ - PIXEL_FORMAT_BGR = 0x80000008, - /** 32 bit BGRU. */ - PIXEL_FORMAT_BGRU = 0x40000008, - /** 24 bit RGB. */ - PIXEL_FORMAT_RGB = PIXEL_FORMAT_RGB8, - /** 32 bit RGBU. */ - PIXEL_FORMAT_RGBU = 0x40000002, - /** R = G = B = 16 bits. */ - PIXEL_FORMAT_BGR16 = 0x02000001, - /** 64 bit BGRU. */ - PIXEL_FORMAT_BGRU16 = 0x02000002, - /** JPEG compressed stream. */ - PIXEL_FORMAT_422YUV8_JPEG = 0x40000001, - /** Number of pixel formats. */ - NUM_PIXEL_FORMATS = 20, - /** Unspecified pixel format. */ - UNSPECIFIED_PIXEL_FORMAT = 0; - - /** Bus speeds. */ - /** enum FlyCapture2::BusSpeed */ - public static final int - /** 100Mbits/sec. */ - BUSSPEED_S100 = 0, - /** 200Mbits/sec. */ - BUSSPEED_S200 = 1, - /** 400Mbits/sec. */ - BUSSPEED_S400 = 2, - /** 480Mbits/sec. Only for USB2 cameras. */ - BUSSPEED_S480 = 3, - /** 800Mbits/sec. */ - BUSSPEED_S800 = 4, - /** 1600Mbits/sec. */ - BUSSPEED_S1600 = 5, - /** 3200Mbits/sec. */ - BUSSPEED_S3200 = 6, - /** 5000Mbits/sec. Only for USB3 cameras. */ - BUSSPEED_S5000 = 7, - /** 10Base-T. Only for GigE Vision cameras. */ - BUSSPEED_10BASE_T = 8, - /** 100Base-T. Only for GigE Vision cameras.*/ - BUSSPEED_100BASE_T = 9, - /** 1000Base-T (Gigabit Ethernet). Only for GigE Vision cameras. */ - BUSSPEED_1000BASE_T = 10, - /** 10000Base-T. Only for GigE Vision cameras. */ - BUSSPEED_10000BASE_T = 11, - /** The fastest speed available. */ - BUSSPEED_S_FASTEST = 12, - /** Any speed that is available. */ - BUSSPEED_ANY = 13, - /** Unknown bus speed. */ - BUSSPEED_SPEED_UNKNOWN = -1, - BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; - - /** enum FlyCapture2::PCIeBusSpeed */ - public static final int - PCIE_BUSSPEED_2_5 = 0, /** 2.5 Gb/s */ - PCIE_BUSSPEED_5_0 = 1, /** 5.0 Gb/s */ - PCIE_BUSSPEED_UNKNOWN = -1, /** Speed is unknown */ - PCIE_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Types of low level drivers that flycapture uses. */ - /** enum FlyCapture2::DriverType */ - public static final int - /** PGRCam.sys. */ - DRIVER_1394_CAM = 0, - /** PGR1394.sys. */ - DRIVER_1394_PRO = 1, - /** firewire_core. */ - DRIVER_1394_JUJU = 2, - /** video1394. */ - DRIVER_1394_VIDEO1394 = 3, - /** raw1394. */ - DRIVER_1394_RAW1394 = 4, - /** No usb driver used just BSD stack. (Linux only) */ - DRIVER_USB_NONE = 5, - /** PGRUsbCam.sys. */ - DRIVER_USB_CAM = 6, - /** PGRXHCI.sys. */ - DRIVER_USB3_PRO = 7, - /** no gige drivers used,MS/BSD stack. */ - DRIVER_GIGE_NONE = 8, - /** PGRGigE.sys. */ - DRIVER_GIGE_FILTER = 9, - /** PGRGigEPro.sys. */ - DRIVER_GIGE_PRO = 10, - /** PgrLwf.sys. */ - DRIVER_GIGE_LWF = 11, - /** Unknown driver type. */ - DRIVER_UNKNOWN = -1, - DRIVER_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * Color processing algorithms. Please refer to our knowledge base at - * article at http://www.ptgrey.com/support/kb/index.asp?a=4&q=33 for - * complete details for each algorithm. - */ - /** enum FlyCapture2::ColorProcessingAlgorithm */ - public static final int - /** Default method. */ - DEFAULT = 0, - /** No color processing. */ - NO_COLOR_PROCESSING = 1, - /** - * Fastest but lowest quality. Equivalent to - * FLYCAPTURE_NEAREST_NEIGHBOR_FAST in FlyCapture. - */ - NEAREST_NEIGHBOR = 2, - /** Weights surrounding pixels based on localized edge orientation. */ - EDGE_SENSING = 3, - /** Well-balanced speed and quality. */ - HQ_LINEAR = 4, - /** Slowest but produces good results. */ - RIGOROUS = 5, - /** Multithreaded with similar results to edge sensing. */ - IPP = 6, - /** Best quality but much faster than rigorous. */ - DIRECTIONAL_FILTER = 7, - /** Weighted pixel average from different directions*/ - WEIGHTED_DIRECTIONAL_FILTER = 8, - - COLOR_PROCESSING_ALGORITHM_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Bayer tile formats. */ - /** enum FlyCapture2::BayerTileFormat */ - public static final int - /** No bayer tile format. */ - NONE = 0, - /** Red-Green-Green-Blue. */ - RGGB = 1, - /** Green-Red-Blue-Green. */ - GRBG = 2, - /** Green-Blue-Red-Green. */ - GBRG = 3, - /** Blue-Green-Green-Red. */ - BGGR = 4, - BT_FORCE_32BITS = FULL_32BIT_VALUE; - - /** File formats to be used for saving images to disk. */ - /** enum FlyCapture2::ImageFileFormat */ - public static final int - /** Determine file format from file extension. */ - FROM_FILE_EXT = -1, - /** Portable gray map. */ - PGM = 0, - /** Portable pixmap. */ - PPM = 1, - /** Bitmap. */ - BMP = 2, - /** JPEG. */ - JPEG = 3, - /** JPEG 2000. */ - JPEG2000 = 4, - /** Tagged image file format. */ - TIFF = 5, - /** Portable network graphics. */ - PNG = 6, - /** Raw data. */ - RAW = 7, - IMAGE_FILE_FORMAT_FORCE_32BITS = FULL_32BIT_VALUE; - - /*@}*/ - - /** - * \defgroup GigEEnums GigE specific enumerations - * - * These enumerations are specific to GigE camera operation only. - */ - - /*@{*/ + /** + * \defgroup GlobalConstants Global constants + */ + + /*@{*/ + + /** The maximum length that is allocated for a string. */ + @Namespace("FlyCapture2") @MemberGetter public static native @Cast("const unsigned int") int sk_maxStringLength(); + public static final int sk_maxStringLength = sk_maxStringLength(); + + /** The maximum number of ports one device can have. */ + @Namespace("FlyCapture2") @MemberGetter public static native @Cast("const unsigned int") int sk_maxNumPorts(); + public static final int sk_maxNumPorts = sk_maxNumPorts(); + + /*@}*/ + + /** + * \defgroup Enumerations Enumerations + */ + + /*@{*/ + + /** The error types returned by functions. */ + /** enum FlyCapture2::ErrorType */ + public static final int + /** Undefined */ + PGRERROR_UNDEFINED = -1, + /** Function returned with no errors. */ + PGRERROR_OK = 0, + /** General failure. */ + PGRERROR_FAILED = 1, + /** Function has not been implemented. */ + PGRERROR_NOT_IMPLEMENTED = 2, + /** Could not connect to Bus Master. */ + PGRERROR_FAILED_BUS_MASTER_CONNECTION = 3, + /** Camera has not been connected. */ + PGRERROR_NOT_CONNECTED = 4, + /** Initialization failed. */ + PGRERROR_INIT_FAILED = 5, + /** Camera has not been initialized. */ + PGRERROR_NOT_INTITIALIZED = 6, + /** Invalid parameter passed to function. */ + PGRERROR_INVALID_PARAMETER = 7, + /** Setting set to camera is invalid. */ + PGRERROR_INVALID_SETTINGS = 8, + /** Invalid Bus Manager object. */ + PGRERROR_INVALID_BUS_MANAGER = 9, + /** Could not allocate memory. */ + PGRERROR_MEMORY_ALLOCATION_FAILED = 10, + /** Low level error. */ + PGRERROR_LOW_LEVEL_FAILURE = 11, + /** Device not found. */ + PGRERROR_NOT_FOUND = 12, + /** GUID failure. */ + PGRERROR_FAILED_GUID = 13, + /** Packet size set to camera is invalid. */ + PGRERROR_INVALID_PACKET_SIZE = 14, + /** Invalid mode has been passed to function. */ + PGRERROR_INVALID_MODE = 15, + /** Error due to not being in Format7. */ + PGRERROR_NOT_IN_FORMAT7 = 16, + /** This feature is unsupported. */ + PGRERROR_NOT_SUPPORTED = 17, + /** Timeout error. */ + PGRERROR_TIMEOUT = 18, + /** Bus Master Failure. */ + PGRERROR_BUS_MASTER_FAILED = 19, + /** Generation Count Mismatch. */ + PGRERROR_INVALID_GENERATION = 20, + /** Look Up Table failure. */ + PGRERROR_LUT_FAILED = 21, + /** IIDC failure. */ + PGRERROR_IIDC_FAILED = 22, + /** Strobe failure. */ + PGRERROR_STROBE_FAILED = 23, + /** Trigger failure. */ + PGRERROR_TRIGGER_FAILED = 24, + /** Property failure. */ + PGRERROR_PROPERTY_FAILED = 25, + /** Property is not present. */ + PGRERROR_PROPERTY_NOT_PRESENT = 26, + /** Register access failed. */ + PGRERROR_REGISTER_FAILED = 27, + /** Register read failed. */ + PGRERROR_READ_REGISTER_FAILED = 28, + /** Register write failed. */ + PGRERROR_WRITE_REGISTER_FAILED = 29, + /** Isochronous failure. */ + PGRERROR_ISOCH_FAILED = 30, + /** Isochronous transfer has already been started. */ + PGRERROR_ISOCH_ALREADY_STARTED = 31, + /** Isochronous transfer has not been started. */ + PGRERROR_ISOCH_NOT_STARTED = 32, + /** Isochronous start failed. */ + PGRERROR_ISOCH_START_FAILED = 33, + /** Isochronous retrieve buffer failed. */ + PGRERROR_ISOCH_RETRIEVE_BUFFER_FAILED = 34, + /** Isochronous stop failed. */ + PGRERROR_ISOCH_STOP_FAILED = 35, + /** Isochronous image synchronization failed. */ + PGRERROR_ISOCH_SYNC_FAILED = 36, + /** Isochronous bandwidth exceeded. */ + PGRERROR_ISOCH_BANDWIDTH_EXCEEDED = 37, + /** Image conversion failed. */ + PGRERROR_IMAGE_CONVERSION_FAILED = 38, + /** Image library failure. */ + PGRERROR_IMAGE_LIBRARY_FAILURE = 39, + /** Buffer is too small. */ + PGRERROR_BUFFER_TOO_SMALL = 40, + /** There is an image consistency error. */ + PGRERROR_IMAGE_CONSISTENCY_ERROR = 41, + /** The installed driver is not compatible with the library. */ + PGRERROR_INCOMPATIBLE_DRIVER = 42, + PGRERROR_FORCE_32BITS = FULL_32BIT_VALUE; + + /** The type of bus callback to register a callback function for. */ + /** enum FlyCapture2::BusCallbackType */ + public static final int + /** Register for all bus events. */ + BUS_RESET = 0, + /** Register for arrivals only. */ + ARRIVAL = 1, + /** Register for removals only. */ + REMOVAL = 2, + CALLBACK_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * The grab strategy employed during image transfer. This type controls + * how images that stream off the camera accumulate in a user buffer + * for handling. + */ + /* + @remark Unlike earlier versions of the FlyCapture SDK, it is no longer + * necessary to explicitly start the image grabbing process before + * specifying an image grabbing mode. + */ + /** enum FlyCapture2::GrabMode */ + public static final int + /** + * Grabs the newest image in the user buffer each time the + * RetrieveBuffer() function is called. Older images are dropped + * instead of accumulating in the user buffer. Grabbing blocks if the + * camera has not finished transmitting the next available image. If + * the camera is transmitting images faster than the application can + * grab them, images may be dropped and only the most recent image + * is stored for grabbing. Note that this mode is the equivalent of + * flycaptureLockLatest in earlier versions of the FlyCapture SDK. + */ + DROP_FRAMES = 0, + + /** + * Images accumulate in the user buffer, and the oldest image is + * grabbed for handling before being discarded. This member can be + * used to guarantee that each image is seen. However, image processing + * time must not exceed transmission time from the camera to the + * buffer. Grabbing blocks if the camera has not finished transmitting + * the next available image. The buffer size is controlled by the + * numBuffers parameter in the FC2Config struct. Note that this mode is + * the equivalent of flycaptureLockNext in earlier versions of the + * FlyCapture SDK. + */ + BUFFER_FRAMES = 1, - /** Possible properties that can be queried from the camera. */ - /** enum FlyCapture2::GigEPropertyType */ - public static final int - HEARTBEAT = 0, - HEARTBEAT_TIMEOUT = 1, - PACKET_SIZE = 2, - PACKET_DELAY = 3; + /** + * Unspecified grab mode. + */ + UNSPECIFIED_GRAB_MODE = 2, + GRAB_MODE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Timeout options for grabbing images. */ + /** enum FlyCapture2::GrabTimeout */ + public static final int + /** Non-blocking wait. */ + TIMEOUT_NONE = 0, + /** Wait indefinitely. */ + TIMEOUT_INFINITE = -1, + /** Unspecified timeout setting. */ + TIMEOUT_UNSPECIFIED = -2, + GRAB_TIMEOUT_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Bandwidth allocation options for 1394 devices. */ + /** enum FlyCapture2::BandwidthAllocation */ + public static final int + /** Do not allocate bandwidth. */ + BANDWIDTH_ALLOCATION_OFF = 0, + /** Allocate bandwidth. This is the default setting. */ + BANDWIDTH_ALLOCATION_ON = 1, + /** + * Bandwidth allocation is not supported by either the camera or + * operating system. + */ + BANDWIDTH_ALLOCATION_UNSUPPORTED = 2, + /** Not specified. This leaves the current setting unchanged. */ + BANDWIDTH_ALLOCATION_UNSPECIFIED = 3, + BANDWIDTH_ALLOCATION_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Interfaces that a camera may use to communicate with a host. */ + /** enum FlyCapture2::InterfaceType */ + public static final int + /** IEEE-1394 (Includes 1394a and 1394b). */ + INTERFACE_IEEE1394 = 0, + /** USB 2.0. */ + INTERFACE_USB2 = 1, + /** USB 3.0. */ + INTERFACE_USB3 = 2, + /** GigE. */ + INTERFACE_GIGE = 3, + /** Unknown interface. */ + INTERFACE_UNKNOWN = 4, + INTERFACE_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * Camera properties. Not all properties may be supported, depending + * on the camera model. + */ + /** enum FlyCapture2::PropertyType */ + public static final int + /** Brightness. */ + BRIGHTNESS = 0, + /** Auto exposure. */ + AUTO_EXPOSURE = 1, + /** Sharpness */ + SHARPNESS = 2, + /** White balance. */ + WHITE_BALANCE = 3, + /** Hue. */ + HUE = 4, + /** Saturation. */ + SATURATION = 5, + /** Gamma. */ + GAMMA = 6, + /** Iris. */ + IRIS = 7, + /** Focus. */ + FOCUS = 8, + /** Zoom. */ + ZOOM = 9, + /** Pan. */ + PAN = 10, + /** Tilt. */ + TILT = 11, + /** Shutter. */ + SHUTTER = 12, + /** Gain. */ + GAIN = 13, + /** Trigger mode. */ + TRIGGER_MODE = 14, + /** Trigger delay. */ + TRIGGER_DELAY = 15, + /** Frame rate. */ + FRAME_RATE = 16, + /** Temperature. */ + TEMPERATURE = 17, + /** Unspecified property type. */ + UNSPECIFIED_PROPERTY_TYPE = 18, + PROPERTY_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Frame rates in frames per second. */ + /** enum FlyCapture2::FrameRate */ + public static final int + /** 1.875 fps. */ + FRAMERATE_1_875 = 0, + /** 3.75 fps. */ + FRAMERATE_3_75 = 1, + /** 7.5 fps. */ + FRAMERATE_7_5 = 2, + /** 15 fps. */ + FRAMERATE_15 = 3, + /** 30 fps. */ + FRAMERATE_30 = 4, + /** 60 fps. */ + FRAMERATE_60 = 5, + /** 120 fps. */ + FRAMERATE_120 = 6, + /** 240 fps. */ + FRAMERATE_240 = 7, + /** Custom frame rate for Format7 functionality. */ + FRAMERATE_FORMAT7 = 8, + /** Number of possible camera frame rates. */ + NUM_FRAMERATES = 9, + FRAMERATE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** DCAM video modes. */ + /** enum FlyCapture2::VideoMode */ + public static final int + /** 160x120 YUV444. */ + VIDEOMODE_160x120YUV444 = 0, + /** 320x240 YUV422. */ + VIDEOMODE_320x240YUV422 = 1, + /** 640x480 YUV411. */ + VIDEOMODE_640x480YUV411 = 2, + /** 640x480 YUV422. */ + VIDEOMODE_640x480YUV422 = 3, + /** 640x480 24-bit RGB. */ + VIDEOMODE_640x480RGB = 4, + /** 640x480 8-bit. */ + VIDEOMODE_640x480Y8 = 5, + /** 640x480 16-bit. */ + VIDEOMODE_640x480Y16 = 6, + /** 800x600 YUV422. */ + VIDEOMODE_800x600YUV422 = 7, + /** 800x600 RGB. */ + VIDEOMODE_800x600RGB = 8, + /** 800x600 8-bit. */ + VIDEOMODE_800x600Y8 = 9, + /** 800x600 16-bit. */ + VIDEOMODE_800x600Y16 = 10, + /** 1024x768 YUV422. */ + VIDEOMODE_1024x768YUV422 = 11, + /** 1024x768 RGB. */ + VIDEOMODE_1024x768RGB = 12, + /** 1024x768 8-bit. */ + VIDEOMODE_1024x768Y8 = 13, + /** 1024x768 16-bit. */ + VIDEOMODE_1024x768Y16 = 14, + /** 1280x960 YUV422. */ + VIDEOMODE_1280x960YUV422 = 15, + /** 1280x960 RGB. */ + VIDEOMODE_1280x960RGB = 16, + /** 1280x960 8-bit. */ + VIDEOMODE_1280x960Y8 = 17, + /** 1280x960 16-bit. */ + VIDEOMODE_1280x960Y16 = 18, + /** 1600x1200 YUV422. */ + VIDEOMODE_1600x1200YUV422 = 19, + /** 1600x1200 RGB. */ + VIDEOMODE_1600x1200RGB = 20, + /** 1600x1200 8-bit. */ + VIDEOMODE_1600x1200Y8 = 21, + /** 1600x1200 16-bit. */ + VIDEOMODE_1600x1200Y16 = 22, + /** Custom video mode for Format7 functionality. */ + VIDEOMODE_FORMAT7 = 23, + /** Number of possible video modes. */ + NUM_VIDEOMODES = 24, + VIDEOMODE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Camera modes for DCAM formats as well as Format7. */ + /** enum FlyCapture2::Mode */ + public static final int + MODE_0 = 0, + MODE_1 = 1, + MODE_2 = 2, + MODE_3 = 3, + MODE_4 = 4, + MODE_5 = 5, + MODE_6 = 6, + MODE_7 = 7, + MODE_8 = 8, + MODE_9 = 9, + MODE_10 = 10, + MODE_11 = 11, + MODE_12 = 12, + MODE_13 = 13, + MODE_14 = 14, + MODE_15 = 15, + MODE_16 = 16, + MODE_17 = 17, + MODE_18 = 18, + MODE_19 = 19, + MODE_20 = 20, + MODE_21 = 21, + MODE_22 = 22, + MODE_23 = 23, + MODE_24 = 24, + MODE_25 = 25, + MODE_26 = 26, + MODE_27 = 27, + MODE_28 = 28, + MODE_29 = 29, + MODE_30 = 30, + MODE_31 = 31, + /** Number of modes */ + NUM_MODES = 32, + MODE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Pixel formats available for Format7 modes. */ + /** enum FlyCapture2::PixelFormat */ + public static final int + /** 8 bits of mono information. */ + PIXEL_FORMAT_MONO8 = 0x80000000, + /** YUV 4:1:1. */ + PIXEL_FORMAT_411YUV8 = 0x40000000, + /** YUV 4:2:2. */ + PIXEL_FORMAT_422YUV8 = 0x20000000, + /** YUV 4:4:4. */ + PIXEL_FORMAT_444YUV8 = 0x10000000, + /** R = G = B = 8 bits. */ + PIXEL_FORMAT_RGB8 = 0x08000000, + /** 16 bits of mono information. */ + PIXEL_FORMAT_MONO16 = 0x04000000, + /** R = G = B = 16 bits. */ + PIXEL_FORMAT_RGB16 = 0x02000000, + /** 16 bits of signed mono information. */ + PIXEL_FORMAT_S_MONO16 = 0x01000000, + /** R = G = B = 16 bits signed. */ + PIXEL_FORMAT_S_RGB16 = 0x00800000, + /** 8 bit raw data output of sensor. */ + PIXEL_FORMAT_RAW8 = 0x00400000, + /** 16 bit raw data output of sensor. */ + PIXEL_FORMAT_RAW16 = 0x00200000, + /** 12 bits of mono information. */ + PIXEL_FORMAT_MONO12 = 0x00100000, + /** 12 bit raw data output of sensor. */ + PIXEL_FORMAT_RAW12 = 0x00080000, + /** 24 bit BGR. */ + PIXEL_FORMAT_BGR = 0x80000008, + /** 32 bit BGRU. */ + PIXEL_FORMAT_BGRU = 0x40000008, + /** 24 bit RGB. */ + PIXEL_FORMAT_RGB = PIXEL_FORMAT_RGB8, + /** 32 bit RGBU. */ + PIXEL_FORMAT_RGBU = 0x40000002, + /** R = G = B = 16 bits. */ + PIXEL_FORMAT_BGR16 = 0x02000001, + /** 64 bit BGRU. */ + PIXEL_FORMAT_BGRU16 = 0x02000002, + /** JPEG compressed stream. */ + PIXEL_FORMAT_422YUV8_JPEG = 0x40000001, + /** Number of pixel formats. */ + NUM_PIXEL_FORMATS = 20, + /** Unspecified pixel format. */ + UNSPECIFIED_PIXEL_FORMAT = 0; + + /** Bus speeds. */ + /** enum FlyCapture2::BusSpeed */ + public static final int + /** 100Mbits/sec. */ + BUSSPEED_S100 = 0, + /** 200Mbits/sec. */ + BUSSPEED_S200 = 1, + /** 400Mbits/sec. */ + BUSSPEED_S400 = 2, + /** 480Mbits/sec. Only for USB2 cameras. */ + BUSSPEED_S480 = 3, + /** 800Mbits/sec. */ + BUSSPEED_S800 = 4, + /** 1600Mbits/sec. */ + BUSSPEED_S1600 = 5, + /** 3200Mbits/sec. */ + BUSSPEED_S3200 = 6, + /** 5000Mbits/sec. Only for USB3 cameras. */ + BUSSPEED_S5000 = 7, + /** 10Base-T. Only for GigE Vision cameras. */ + BUSSPEED_10BASE_T = 8, + /** 100Base-T. Only for GigE Vision cameras.*/ + BUSSPEED_100BASE_T = 9, + /** 1000Base-T (Gigabit Ethernet). Only for GigE Vision cameras. */ + BUSSPEED_1000BASE_T = 10, + /** 10000Base-T. Only for GigE Vision cameras. */ + BUSSPEED_10000BASE_T = 11, + /** The fastest speed available. */ + BUSSPEED_S_FASTEST = 12, + /** Any speed that is available. */ + BUSSPEED_ANY = 13, + /** Unknown bus speed. */ + BUSSPEED_SPEED_UNKNOWN = -1, + BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; + + /** enum FlyCapture2::PCIeBusSpeed */ + public static final int + PCIE_BUSSPEED_2_5 = 0, /** 2.5 Gb/s */ + PCIE_BUSSPEED_5_0 = 1, /** 5.0 Gb/s */ + PCIE_BUSSPEED_UNKNOWN = -1, /** Speed is unknown */ + PCIE_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Types of low level drivers that flycapture uses. */ + /** enum FlyCapture2::DriverType */ + public static final int + /** PGRCam.sys. */ + DRIVER_1394_CAM = 0, + /** PGR1394.sys. */ + DRIVER_1394_PRO = 1, + /** firewire_core. */ + DRIVER_1394_JUJU = 2, + /** video1394. */ + DRIVER_1394_VIDEO1394 = 3, + /** raw1394. */ + DRIVER_1394_RAW1394 = 4, + /** No usb driver used just BSD stack. (Linux only) */ + DRIVER_USB_NONE = 5, + /** PGRUsbCam.sys. */ + DRIVER_USB_CAM = 6, + /** PGRXHCI.sys. */ + DRIVER_USB3_PRO = 7, + /** no gige drivers used,MS/BSD stack. */ + DRIVER_GIGE_NONE = 8, + /** PGRGigE.sys. */ + DRIVER_GIGE_FILTER = 9, + /** PGRGigEPro.sys. */ + DRIVER_GIGE_PRO = 10, + /** PgrLwf.sys. */ + DRIVER_GIGE_LWF = 11, + /** Unknown driver type. */ + DRIVER_UNKNOWN = -1, + DRIVER_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * Color processing algorithms. Please refer to our knowledge base at + * article at http://www.ptgrey.com/support/kb/index.asp?a=4&q=33 for + * complete details for each algorithm. + */ + /** enum FlyCapture2::ColorProcessingAlgorithm */ + public static final int + /** Default method. */ + DEFAULT = 0, + /** No color processing. */ + NO_COLOR_PROCESSING = 1, + /** + * Fastest but lowest quality. Equivalent to + * FLYCAPTURE_NEAREST_NEIGHBOR_FAST in FlyCapture. + */ + NEAREST_NEIGHBOR = 2, + /** Weights surrounding pixels based on localized edge orientation. */ + EDGE_SENSING = 3, + /** Well-balanced speed and quality. */ + HQ_LINEAR = 4, + /** Slowest but produces good results. */ + RIGOROUS = 5, + /** Multithreaded with similar results to edge sensing. */ + IPP = 6, + /** Best quality but much faster than rigorous. */ + DIRECTIONAL_FILTER = 7, + /** Weighted pixel average from different directions*/ + WEIGHTED_DIRECTIONAL_FILTER = 8, + + COLOR_PROCESSING_ALGORITHM_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Bayer tile formats. */ + /** enum FlyCapture2::BayerTileFormat */ + public static final int + /** No bayer tile format. */ + NONE = 0, + /** Red-Green-Green-Blue. */ + RGGB = 1, + /** Green-Red-Blue-Green. */ + GRBG = 2, + /** Green-Blue-Red-Green. */ + GBRG = 3, + /** Blue-Green-Green-Red. */ + BGGR = 4, + BT_FORCE_32BITS = FULL_32BIT_VALUE; + + /** File formats to be used for saving images to disk. */ + /** enum FlyCapture2::ImageFileFormat */ + public static final int + /** Determine file format from file extension. */ + FROM_FILE_EXT = -1, + /** Portable gray map. */ + PGM = 0, + /** Portable pixmap. */ + PPM = 1, + /** Bitmap. */ + BMP = 2, + /** JPEG. */ + JPEG = 3, + /** JPEG 2000. */ + JPEG2000 = 4, + /** Tagged image file format. */ + TIFF = 5, + /** Portable network graphics. */ + PNG = 6, + /** Raw data. */ + RAW = 7, + IMAGE_FILE_FORMAT_FORCE_32BITS = FULL_32BIT_VALUE; + + /*@}*/ + + /** + * \defgroup GigEEnums GigE specific enumerations + * + * These enumerations are specific to GigE camera operation only. + */ + + /*@{*/ + + /** Possible properties that can be queried from the camera. */ + /** enum FlyCapture2::GigEPropertyType */ + public static final int + HEARTBEAT = 0, + HEARTBEAT_TIMEOUT = 1, + PACKET_SIZE = 2, + PACKET_DELAY = 3; + + /*@}*/ + + /** + * \defgroup Structures Structures + */ + + /*@{*/ + + /** The current version of the library. */ + @Namespace("FlyCapture2") public static class FC2Version extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public FC2Version() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public FC2Version(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public FC2Version(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public FC2Version position(long position) { + return (FC2Version)super.position(position); + } + + /** Major version number. */ + public native @Cast("unsigned int") int major(); public native FC2Version major(int major); + /** Minor version number. */ + public native @Cast("unsigned int") int minor(); public native FC2Version minor(int minor); + /** Type version number. */ + public native @Cast("unsigned int") int type(); public native FC2Version type(int type); + /** Build version number. */ + public native @Cast("unsigned int") int build(); public native FC2Version build(int build); + } + + /** A GUID to the camera. It is used to uniquely identify a camera. */ + @Namespace("FlyCapture2") @NoOffset public static class PGRGuid extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public PGRGuid(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public PGRGuid(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public PGRGuid position(long position) { + return (PGRGuid)super.position(position); + } + + public native @Cast("unsigned int") int value(int i); public native PGRGuid value(int i, int value); + @MemberGetter public native @Cast("unsigned int*") IntPointer value(); + + /** Constructor. */ + public PGRGuid() { super((Pointer)null); allocate(); } + private native void allocate(); + + /** Equality operator. */ + public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef PGRGuid guid ); + + /** Inequality operator. */ + public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef PGRGuid guid ); + } + + /** + * \defgroup GigEStructures GigE specific structures + * + * These structures are specific to GigE camera operation only. + */ + + /*@{*/ + + /** IPv4 address. */ + @Namespace("FlyCapture2") @NoOffset public static class IPAddress extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public IPAddress(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public IPAddress(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public IPAddress position(long position) { + return (IPAddress)super.position(position); + } + + public native @Cast("unsigned char") byte octets(int i); public native IPAddress octets(int i, byte octets); + @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); + + public IPAddress() { super((Pointer)null); allocate(); } + private native void allocate(); + + public IPAddress( @Cast("unsigned int") int ipAddressVal ) { super((Pointer)null); allocate(ipAddressVal); } + private native void allocate( @Cast("unsigned int") int ipAddressVal ); + + /** Equality operator. */ + public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef IPAddress address ); + + /** Inequality operator. */ + public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef IPAddress address ); + } + + /** MAC address. */ + @Namespace("FlyCapture2") @NoOffset public static class MACAddress extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public MACAddress(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public MACAddress(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public MACAddress position(long position) { + return (MACAddress)super.position(position); + } + + public native @Cast("unsigned char") byte octets(int i); public native MACAddress octets(int i, byte octets); + @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); + + public MACAddress() { super((Pointer)null); allocate(); } + private native void allocate(); + + public MACAddress( @Cast("unsigned int") int macAddressValHigh, @Cast("unsigned int") int macAddressValLow ) { super((Pointer)null); allocate(macAddressValHigh, macAddressValLow); } + private native void allocate( @Cast("unsigned int") int macAddressValHigh, @Cast("unsigned int") int macAddressValLow ); + + /** Equality operator. */ + public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef MACAddress address ); + + /** Inequality operator. */ + public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef MACAddress address ); + } + + /** A GigE property. */ + @Namespace("FlyCapture2") public static class GigEProperty extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public GigEProperty() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public GigEProperty(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public GigEProperty(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public GigEProperty position(long position) { + return (GigEProperty)super.position(position); + } + + /** The type of property. */ + public native @Cast("FlyCapture2::GigEPropertyType") int propType(); public native GigEProperty propType(int propType); + /** + * Whether the property is readable. If this is false, then + * no other value in this structure is valid. + */ + public native @Cast("bool") boolean isReadable(); public native GigEProperty isReadable(boolean isReadable); + /** Whether the property is writable. */ + public native @Cast("bool") boolean isWritable(); public native GigEProperty isWritable(boolean isWritable); + /** Minimum value. */ + public native @Cast("unsigned int") int min(); public native GigEProperty min(int min); + /** Maximum value. */ + public native @Cast("unsigned int") int max(); public native GigEProperty max(int max); + /** Current value. */ + public native @Cast("unsigned int") int value(); public native GigEProperty value(int value); + } + + /** Information about a single GigE stream channel. */ + @Namespace("FlyCapture2") @NoOffset public static class GigEStreamChannel extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public GigEStreamChannel(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public GigEStreamChannel(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public GigEStreamChannel position(long position) { + return (GigEStreamChannel)super.position(position); + } + + /** Network interface index used (or to use). */ + public native @Cast("unsigned int") int networkInterfaceIndex(); public native GigEStreamChannel networkInterfaceIndex(int networkInterfaceIndex); + /** Host port on the PC where the camera will send the data stream. */ + public native @Cast("unsigned int") int hostPort(); public native GigEStreamChannel hostPort(int hostPort); + /** Disable IP fragmentation of packets. */ + public native @Cast("bool") boolean doNotFragment(); public native GigEStreamChannel doNotFragment(boolean doNotFragment); + /** Packet size, in bytes. */ + public native @Cast("unsigned int") int packetSize(); public native GigEStreamChannel packetSize(int packetSize); + /** Inter packet delay, in timestamp counter units. */ + public native @Cast("unsigned int") int interPacketDelay(); public native GigEStreamChannel interPacketDelay(int interPacketDelay); + /** Destination IP address. It can be a multicast or unicast address. */ + public native @ByRef IPAddress destinationIpAddress(); public native GigEStreamChannel destinationIpAddress(IPAddress destinationIpAddress); + /** Source UDP port of the stream channel. Read only. */ + public native @Cast("unsigned int") int sourcePort(); public native GigEStreamChannel sourcePort(int sourcePort); + + public GigEStreamChannel() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** + * Configuration for a GigE camera. These options are options that are + * generally should be set before starting isochronous transfer. + */ + @Namespace("FlyCapture2") @NoOffset public static class GigEConfig extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public GigEConfig(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public GigEConfig(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public GigEConfig position(long position) { + return (GigEConfig)super.position(position); + } + + /** Turn on/off packet resend functionality */ + public native @Cast("bool") boolean enablePacketResend(); public native GigEConfig enablePacketResend(boolean enablePacketResend); + + /** + * Number of retries to perform when a register read/write timeout + * is received by the library. The default value is 0. + */ + public native @Cast("unsigned int") int registerTimeoutRetries(); public native GigEConfig registerTimeoutRetries(int registerTimeoutRetries); - /*@}*/ + /** + * Register read/write timeout value, in microseconds. + * The default value is dependent on the interface type. + */ + public native @Cast("unsigned int") int registerTimeout(); public native GigEConfig registerTimeout(int registerTimeout); + + public GigEConfig() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Format 7 information for a single mode. */ + @Namespace("FlyCapture2") @NoOffset public static class GigEImageSettingsInfo extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public GigEImageSettingsInfo(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public GigEImageSettingsInfo(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public GigEImageSettingsInfo position(long position) { + return (GigEImageSettingsInfo)super.position(position); + } + + /** Maximum image width. */ + public native @Cast("unsigned int") int maxWidth(); public native GigEImageSettingsInfo maxWidth(int maxWidth); + /** Maximum image height. */ + public native @Cast("unsigned int") int maxHeight(); public native GigEImageSettingsInfo maxHeight(int maxHeight); + /** Horizontal step size for the offset. */ + public native @Cast("unsigned int") int offsetHStepSize(); public native GigEImageSettingsInfo offsetHStepSize(int offsetHStepSize); + /** Vertical step size for the offset. */ + public native @Cast("unsigned int") int offsetVStepSize(); public native GigEImageSettingsInfo offsetVStepSize(int offsetVStepSize); + /** Horizontal step size for the image. */ + public native @Cast("unsigned int") int imageHStepSize(); public native GigEImageSettingsInfo imageHStepSize(int imageHStepSize); + /** Vertical step size for the image. */ + public native @Cast("unsigned int") int imageVStepSize(); public native GigEImageSettingsInfo imageVStepSize(int imageVStepSize); + /** Supported pixel formats in a bit field. */ + public native @Cast("unsigned int") int pixelFormatBitField(); public native GigEImageSettingsInfo pixelFormatBitField(int pixelFormatBitField); + /** Vendor unique pixel formats in a bit field. */ + public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native GigEImageSettingsInfo vendorPixelFormatBitField(int vendorPixelFormatBitField); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native GigEImageSettingsInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public GigEImageSettingsInfo() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Image settings for a GigE camera. */ + @Namespace("FlyCapture2") @NoOffset public static class GigEImageSettings extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public GigEImageSettings(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public GigEImageSettings(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public GigEImageSettings position(long position) { + return (GigEImageSettings)super.position(position); + } + + /** Horizontal image offset. */ + public native @Cast("unsigned int") int offsetX(); public native GigEImageSettings offsetX(int offsetX); + /** Vertical image offset. */ + public native @Cast("unsigned int") int offsetY(); public native GigEImageSettings offsetY(int offsetY); + /** Width of image. */ + public native @Cast("unsigned int") int width(); public native GigEImageSettings width(int width); + /** Height of image. */ + public native @Cast("unsigned int") int height(); public native GigEImageSettings height(int height); + /** Pixel format of image. */ + public native @Cast("FlyCapture2::PixelFormat") int pixelFormat(); public native GigEImageSettings pixelFormat(int pixelFormat); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native GigEImageSettings reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public GigEImageSettings() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /*@}*/ + + /** + * \defgroup IIDCStructures IIDC specific structures + * + * These structures are specific to IIDC camera operation only. + */ + + /*@{*/ + + /** Format 7 image settings. */ + @Namespace("FlyCapture2") @NoOffset public static class Format7ImageSettings extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Format7ImageSettings(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public Format7ImageSettings(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public Format7ImageSettings position(long position) { + return (Format7ImageSettings)super.position(position); + } + + /** Format 7 mode. */ + public native @Cast("FlyCapture2::Mode") int mode(); public native Format7ImageSettings mode(int mode); + /** Horizontal image offset. */ + public native @Cast("unsigned int") int offsetX(); public native Format7ImageSettings offsetX(int offsetX); + /** Vertical image offset. */ + public native @Cast("unsigned int") int offsetY(); public native Format7ImageSettings offsetY(int offsetY); + /** Width of image. */ + public native @Cast("unsigned int") int width(); public native Format7ImageSettings width(int width); + /** Height of image. */ + public native @Cast("unsigned int") int height(); public native Format7ImageSettings height(int height); + /** Pixel format of image. */ + public native @Cast("FlyCapture2::PixelFormat") int pixelFormat(); public native Format7ImageSettings pixelFormat(int pixelFormat); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native Format7ImageSettings reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public Format7ImageSettings() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Format 7 information for a single mode. */ + @Namespace("FlyCapture2") @NoOffset public static class Format7Info extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Format7Info(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public Format7Info(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public Format7Info position(long position) { + return (Format7Info)super.position(position); + } + + /** Format 7 mode. */ + public native @Cast("FlyCapture2::Mode") int mode(); public native Format7Info mode(int mode); + + /** Maximum image width. */ + public native @Cast("unsigned int") int maxWidth(); public native Format7Info maxWidth(int maxWidth); + /** Maximum image height. */ + public native @Cast("unsigned int") int maxHeight(); public native Format7Info maxHeight(int maxHeight); + /** Horizontal step size for the offset. */ + public native @Cast("unsigned int") int offsetHStepSize(); public native Format7Info offsetHStepSize(int offsetHStepSize); + /** Vertical step size for the offset. */ + public native @Cast("unsigned int") int offsetVStepSize(); public native Format7Info offsetVStepSize(int offsetVStepSize); + /** Horizontal step size for the image. */ + public native @Cast("unsigned int") int imageHStepSize(); public native Format7Info imageHStepSize(int imageHStepSize); + /** Vertical step size for the image. */ + public native @Cast("unsigned int") int imageVStepSize(); public native Format7Info imageVStepSize(int imageVStepSize); + /** Supported pixel formats in a bit field. */ + public native @Cast("unsigned int") int pixelFormatBitField(); public native Format7Info pixelFormatBitField(int pixelFormatBitField); + /** Vendor unique pixel formats in a bit field. */ + public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native Format7Info vendorPixelFormatBitField(int vendorPixelFormatBitField); + + /** Current packet size in bytes. */ + public native @Cast("unsigned int") int packetSize(); public native Format7Info packetSize(int packetSize); + /** Minimum packet size in bytes for current mode. */ + public native @Cast("unsigned int") int minPacketSize(); public native Format7Info minPacketSize(int minPacketSize); + /** Maximum packet size in bytes for current mode. */ + public native @Cast("unsigned int") int maxPacketSize(); public native Format7Info maxPacketSize(int maxPacketSize); + /** Current packet size as a percentage of maximum packet size. */ + public native float percentage(); public native Format7Info percentage(float percentage); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native Format7Info reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public Format7Info() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Format 7 packet information. */ + @Namespace("FlyCapture2") @NoOffset public static class Format7PacketInfo extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Format7PacketInfo(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public Format7PacketInfo(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public Format7PacketInfo position(long position) { + return (Format7PacketInfo)super.position(position); + } + + /** Recommended bytes per packet. */ + public native @Cast("unsigned int") int recommendedBytesPerPacket(); public native Format7PacketInfo recommendedBytesPerPacket(int recommendedBytesPerPacket); + /** Maximum bytes per packet. */ + public native @Cast("unsigned int") int maxBytesPerPacket(); public native Format7PacketInfo maxBytesPerPacket(int maxBytesPerPacket); + /** Minimum bytes per packet. */ + public native @Cast("unsigned int") int unitBytesPerPacket(); public native Format7PacketInfo unitBytesPerPacket(int unitBytesPerPacket); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native Format7PacketInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public Format7PacketInfo() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /*@}*/ + + /** + * Configuration for a camera. These options are options that are + * generally should be set before starting isochronous transfer. + */ + @Namespace("FlyCapture2") @NoOffset public static class FC2Config extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public FC2Config(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public FC2Config(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public FC2Config position(long position) { + return (FC2Config)super.position(position); + } + + /** Number of buffers used by the FlyCapture2 library to grab images. */ + public native @Cast("unsigned int") int numBuffers(); public native FC2Config numBuffers(int numBuffers); + + /** + * Number of notifications per image. This value should only be set + * after the image settings to be used is set to the camera. + * The default number of notifications is 1. + * + * There are 4 general scenarios: + * - 1 notification - End of image + * - 2 notifications - After first packet and end of image + * - 3 notifications - After first packet, middle of image, end of image + * - x notifications - After first packet, (x -2) spread evenly, end of image + * + * Specifying zero for the number of notifications will be ignored (the current value + * will not be modified). + * + * Note that the event numbers start at 0. Ex. when 3 notifications are + * used, the three events will be 0, 1 and 2. + */ + public native @Cast("unsigned int") int numImageNotifications(); public native FC2Config numImageNotifications(int numImageNotifications); - /** - * \defgroup Structures Structures - */ + /** + * Minimum number of notifications needed for the current image + * settings on the camera. Read-only value. + */ + public native @Cast("unsigned int") int minNumImageNotifications(); public native FC2Config minNumImageNotifications(int minNumImageNotifications); - /*@{*/ + /** + * Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() + * will wait for an image before timing out and returning. + */ + public native int grabTimeout(); public native FC2Config grabTimeout(int grabTimeout); + + /** Grab mode for the camera. The default is DROP_FRAMES. */ + public native @Cast("FlyCapture2::GrabMode") int grabMode(); public native FC2Config grabMode(int grabMode); + + /** This parameter enables RetrieveBuffer to run in high + * performance mode. This means that any interaction + * with the camera, other then grabbing the image is disabled. + * Currently Retrieve buffer reads registers on the camera to + * determine which embedded image information settings have been + * enabled, and it reads what the bayer tile is currently set to. + * When High Performance mode is on, these reads are disabled. This + * means that any changes to the Bayer Tile or to the Embedded image + * info after StartCapture() will not be tracked when made using + * direct register writes. If the corresponding SetEmbededImageInfo() + * and GetEmbededImageInfo() calls are used then the changes will be + * appropriately reflected. This also means that changes to embedded + * image info from other processes will not be updated either.*/ + public native @Cast("bool") boolean highPerformanceRetrieveBuffer(); public native FC2Config highPerformanceRetrieveBuffer(boolean highPerformanceRetrieveBuffer); + + /** Isochronous bus speed. */ + public native @Cast("FlyCapture2::BusSpeed") int isochBusSpeed(); public native FC2Config isochBusSpeed(int isochBusSpeed); + + /** Asynchronous bus speed. */ + public native @Cast("FlyCapture2::BusSpeed") int asyncBusSpeed(); public native FC2Config asyncBusSpeed(int asyncBusSpeed); + + /** + * Bandwidth allocation flag that tells the camera the bandwidth + * allocation strategy to employ. + */ + public native @Cast("FlyCapture2::BandwidthAllocation") int bandwidthAllocation(); public native FC2Config bandwidthAllocation(int bandwidthAllocation); - /** The current version of the library. */ - @Namespace("FlyCapture2") public static class FC2Version extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public FC2Version() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public FC2Version(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public FC2Version(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public FC2Version position(long position) { - return (FC2Version)super.position(position); - } - - /** Major version number. */ - public native @Cast("unsigned int") int major(); public native FC2Version major(int major); - /** Minor version number. */ - public native @Cast("unsigned int") int minor(); public native FC2Version minor(int minor); - /** Type version number. */ - public native @Cast("unsigned int") int type(); public native FC2Version type(int type); - /** Build version number. */ - public native @Cast("unsigned int") int build(); public native FC2Version build(int build); - } + /** + * Number of retries to perform when a register read/write timeout + * is received by the library. The default value is 0. + */ + public native @Cast("unsigned int") int registerTimeoutRetries(); public native FC2Config registerTimeoutRetries(int registerTimeoutRetries); - /** A GUID to the camera. It is used to uniquely identify a camera. */ - @Namespace("FlyCapture2") @NoOffset public static class PGRGuid extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public PGRGuid(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public PGRGuid(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public PGRGuid position(long position) { - return (PGRGuid)super.position(position); - } - - public native @Cast("unsigned int") int value(int i); public native PGRGuid value(int i, int value); - @MemberGetter public native @Cast("unsigned int*") IntPointer value(); + /** + * Register read/write timeout value, in microseconds. + * The default value is dependent on the interface type. + */ + public native @Cast("unsigned int") int registerTimeout(); public native FC2Config registerTimeout(int registerTimeout); + + /** Reserved for future use */ + public native @Cast("unsigned int") int reserved(int i); public native FC2Config reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public FC2Config() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** + * Information about a specific camera property. This structure is also + * also used as the TriggerDelayInfo structure. + */ + @Namespace("FlyCapture2") @NoOffset public static class PropertyInfo extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public PropertyInfo(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public PropertyInfo(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public PropertyInfo position(long position) { + return (PropertyInfo)super.position(position); + } + + /** Property info type. */ + public native @Cast("FlyCapture2::PropertyType") int type(); public native PropertyInfo type(int type); + /** Flag indicating if the property is present. */ + public native @Cast("bool") boolean present(); public native PropertyInfo present(boolean present); + /** Flag indicating if auto is supported. */ + public native @Cast("bool") boolean autoSupported(); public native PropertyInfo autoSupported(boolean autoSupported); + /** Flag indicating if manual is supported. */ + public native @Cast("bool") boolean manualSupported(); public native PropertyInfo manualSupported(boolean manualSupported); + /** Flag indicating if on/off is supported. */ + public native @Cast("bool") boolean onOffSupported(); public native PropertyInfo onOffSupported(boolean onOffSupported); + /** Flag indicating if one push is supported. */ + public native @Cast("bool") boolean onePushSupported(); public native PropertyInfo onePushSupported(boolean onePushSupported); + /** Flag indicating if absolute mode is supported. */ + public native @Cast("bool") boolean absValSupported(); public native PropertyInfo absValSupported(boolean absValSupported); + /** Flag indicating if property value can be read out. */ + public native @Cast("bool") boolean readOutSupported(); public native PropertyInfo readOutSupported(boolean readOutSupported); + /** Minimum value (as an integer). */ + public native @Cast("unsigned int") int min(); public native PropertyInfo min(int min); + /** Maximum value (as an integer). */ + public native @Cast("unsigned int") int max(); public native PropertyInfo max(int max); + /** Minimum value (as a floating point value). */ + public native float absMin(); public native PropertyInfo absMin(float absMin); + /** Maximum value (as a floating point value). */ + public native float absMax(); public native PropertyInfo absMax(float absMax); + /** Textual description of units. */ + public native @Cast("char") byte pUnits(int i); public native PropertyInfo pUnits(int i, byte pUnits); + @MemberGetter public native @Cast("char*") BytePointer pUnits(); + /** Abbreviated textual description of units. */ + public native @Cast("char") byte pUnitAbbr(int i); public native PropertyInfo pUnitAbbr(int i, byte pUnitAbbr); + @MemberGetter public native @Cast("char*") BytePointer pUnitAbbr(); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native PropertyInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public PropertyInfo() { super((Pointer)null); allocate(); } + private native void allocate(); + + public PropertyInfo( @Cast("FlyCapture2::PropertyType") int propType ) { super((Pointer)null); allocate(propType); } + private native void allocate( @Cast("FlyCapture2::PropertyType") int propType ); + } + + /** The TriggerDelayInfo structure is identical to PropertyInfo. */ + + /** + * A specific camera property. \n + * For example, to set the gain to 12dB, set the following values: + * - \a type - \c GAIN + * - \a absControl - \c true + * - \a onePush - \c false + * - \a onOff - \c true + * - \a autoManualMode - \c false + * - \a absValue - \c 12.0 + */ + @Namespace("FlyCapture2") @NoOffset public static class Property extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Property(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public Property(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public Property position(long position) { + return (Property)super.position(position); + } + + /** Property info type. */ + public native @Cast("FlyCapture2::PropertyType") int type(); public native Property type(int type); + /** Flag indicating if the property is present. */ + public native @Cast("bool") boolean present(); public native Property present(boolean present); + /** + * Flag controlling absolute mode (real world units) + * or non-absolute mode (camera internal units). + */ + public native @Cast("bool") boolean absControl(); public native Property absControl(boolean absControl); + /** Flag controlling one push. */ + public native @Cast("bool") boolean onePush(); public native Property onePush(boolean onePush); + /** Flag controlling on/off. */ + public native @Cast("bool") boolean onOff(); public native Property onOff(boolean onOff); + /** Flag controlling auto. */ + public native @Cast("bool") boolean autoManualMode(); public native Property autoManualMode(boolean autoManualMode); + /** + * Value A (integer). + * Used to configure properties in non-absolute mode. + */ + public native @Cast("unsigned int") int valueA(); public native Property valueA(int valueA); + /** + * Value B (integer). For white balance, value B applies to the blue value and + * value A applies to the red value. + */ + public native @Cast("unsigned int") int valueB(); public native Property valueB(int valueB); + /** + * Floating point value. + * Used to configure properties in absolute mode. + */ + public native float absValue(); public native Property absValue(float absValue); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native Property reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public Property() { super((Pointer)null); allocate(); } + private native void allocate(); + + public Property( @Cast("FlyCapture2::PropertyType") int propType ) { super((Pointer)null); allocate(propType); } + private native void allocate( @Cast("FlyCapture2::PropertyType") int propType ); + } + + /** The TriggerDelay structure is identical to Property. */ + + /** Information about a camera trigger property. */ + @Namespace("FlyCapture2") @NoOffset public static class TriggerModeInfo extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public TriggerModeInfo(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public TriggerModeInfo(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public TriggerModeInfo position(long position) { + return (TriggerModeInfo)super.position(position); + } + + /** Presence of trigger mode. */ + public native @Cast("bool") boolean present(); public native TriggerModeInfo present(boolean present); + /** Flag indicating if trigger value can be read out. */ + public native @Cast("bool") boolean readOutSupported(); public native TriggerModeInfo readOutSupported(boolean readOutSupported); + /** Flag indicating if on/off is supported. */ + public native @Cast("bool") boolean onOffSupported(); public native TriggerModeInfo onOffSupported(boolean onOffSupported); + /** Flag indicating if polarity is supported. */ + public native @Cast("bool") boolean polaritySupported(); public native TriggerModeInfo polaritySupported(boolean polaritySupported); + /** Flag indicating if the value is readable. */ + public native @Cast("bool") boolean valueReadable(); public native TriggerModeInfo valueReadable(boolean valueReadable); + /** Source mask. */ + public native @Cast("unsigned int") int sourceMask(); public native TriggerModeInfo sourceMask(int sourceMask); + /** Flag indicating if software trigger is supported. */ + public native @Cast("bool") boolean softwareTriggerSupported(); public native TriggerModeInfo softwareTriggerSupported(boolean softwareTriggerSupported); + /** Mode mask. */ + public native @Cast("unsigned int") int modeMask(); public native TriggerModeInfo modeMask(int modeMask); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native TriggerModeInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public TriggerModeInfo() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** A camera trigger. */ + @Namespace("FlyCapture2") @NoOffset public static class TriggerMode extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public TriggerMode(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public TriggerMode(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public TriggerMode position(long position) { + return (TriggerMode)super.position(position); + } + + /** Flag controlling on/off. */ + public native @Cast("bool") boolean onOff(); public native TriggerMode onOff(boolean onOff); + /** Polarity value. */ + public native @Cast("unsigned int") int polarity(); public native TriggerMode polarity(int polarity); + /** Source value. */ + public native @Cast("unsigned int") int source(); public native TriggerMode source(int source); + /** Mode value. */ + public native @Cast("unsigned int") int mode(); public native TriggerMode mode(int mode); + /** Parameter value. */ + public native @Cast("unsigned int") int parameter(); public native TriggerMode parameter(int parameter); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native TriggerMode reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public TriggerMode() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** A camera strobe property. */ + @Namespace("FlyCapture2") @NoOffset public static class StrobeInfo extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public StrobeInfo(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public StrobeInfo(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public StrobeInfo position(long position) { + return (StrobeInfo)super.position(position); + } + + /** Source value. */ + public native @Cast("unsigned int") int source(); public native StrobeInfo source(int source); + /** Presence of strobe. */ + public native @Cast("bool") boolean present(); public native StrobeInfo present(boolean present); + /** Flag indicating if strobe value can be read out. */ + public native @Cast("bool") boolean readOutSupported(); public native StrobeInfo readOutSupported(boolean readOutSupported); + /** Flag indicating if on/off is supported. */ + public native @Cast("bool") boolean onOffSupported(); public native StrobeInfo onOffSupported(boolean onOffSupported); + /** Flag indicating if polarity is supported. */ + public native @Cast("bool") boolean polaritySupported(); public native StrobeInfo polaritySupported(boolean polaritySupported); + /** Minimum value. */ + public native float minValue(); public native StrobeInfo minValue(float minValue); + /** Maximum value. */ + public native float maxValue(); public native StrobeInfo maxValue(float maxValue); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native StrobeInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public StrobeInfo() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** A camera strobe. */ + @Namespace("FlyCapture2") @NoOffset public static class StrobeControl extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public StrobeControl(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public StrobeControl(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public StrobeControl position(long position) { + return (StrobeControl)super.position(position); + } + + /** Source value. */ + public native @Cast("unsigned int") int source(); public native StrobeControl source(int source); + /** Flag controlling on/off. */ + public native @Cast("bool") boolean onOff(); public native StrobeControl onOff(boolean onOff); + /** Signal polarity. */ + public native @Cast("unsigned int") int polarity(); public native StrobeControl polarity(int polarity); + /** Signal delay (in ms). */ + public native float delay(); public native StrobeControl delay(float delay); + /** Signal duration (in ms). */ + public native float duration(); public native StrobeControl duration(float duration); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native StrobeControl reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public StrobeControl() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Timestamp information. */ + @Namespace("FlyCapture2") @NoOffset public static class TimeStamp extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public TimeStamp(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public TimeStamp(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public TimeStamp position(long position) { + return (TimeStamp)super.position(position); + } + + /** Seconds. */ + public native long seconds(); public native TimeStamp seconds(long seconds); + /** Microseconds. */ + public native @Cast("unsigned int") int microSeconds(); public native TimeStamp microSeconds(int microSeconds); + /** 1394 cycle time seconds. */ + public native @Cast("unsigned int") int cycleSeconds(); public native TimeStamp cycleSeconds(int cycleSeconds); + /** 1394 cycle time count. */ + public native @Cast("unsigned int") int cycleCount(); public native TimeStamp cycleCount(int cycleCount); + /** 1394 cycle time offset. */ + public native @Cast("unsigned int") int cycleOffset(); public native TimeStamp cycleOffset(int cycleOffset); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native TimeStamp reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public TimeStamp() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Camera configuration ROM. */ + @Namespace("FlyCapture2") @NoOffset public static class ConfigROM extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public ConfigROM(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public ConfigROM(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public ConfigROM position(long position) { + return (ConfigROM)super.position(position); + } + + /** Vendor ID of a node. */ + public native @Cast("unsigned int") int nodeVendorId(); public native ConfigROM nodeVendorId(int nodeVendorId); + /** Chip ID (high part). */ + public native @Cast("unsigned int") int chipIdHi(); public native ConfigROM chipIdHi(int chipIdHi); + /** Chip ID (low part). */ + public native @Cast("unsigned int") int chipIdLo(); public native ConfigROM chipIdLo(int chipIdLo); + /** Unit Spec ID, usually 0xa02d. */ + public native @Cast("unsigned int") int unitSpecId(); public native ConfigROM unitSpecId(int unitSpecId); + /** Unit software version. */ + public native @Cast("unsigned int") int unitSWVer(); public native ConfigROM unitSWVer(int unitSWVer); + /** Unit sub software version. */ + public native @Cast("unsigned int") int unitSubSWVer(); public native ConfigROM unitSubSWVer(int unitSubSWVer); + /** Vendor unique info 0. */ + public native @Cast("unsigned int") int vendorUniqueInfo_0(); public native ConfigROM vendorUniqueInfo_0(int vendorUniqueInfo_0); + /** Vendor unique info 1. */ + public native @Cast("unsigned int") int vendorUniqueInfo_1(); public native ConfigROM vendorUniqueInfo_1(int vendorUniqueInfo_1); + /** Vendor unique info 2. */ + public native @Cast("unsigned int") int vendorUniqueInfo_2(); public native ConfigROM vendorUniqueInfo_2(int vendorUniqueInfo_2); + /** Vendor unique info 3. */ + public native @Cast("unsigned int") int vendorUniqueInfo_3(); public native ConfigROM vendorUniqueInfo_3(int vendorUniqueInfo_3); + /** Keyword. */ + public native @Cast("char") byte pszKeyword(int i); public native ConfigROM pszKeyword(int i, byte pszKeyword); + @MemberGetter public native @Cast("char*") BytePointer pszKeyword(); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native ConfigROM reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public ConfigROM() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Camera information. */ + @Namespace("FlyCapture2") @NoOffset public static class CameraInfo extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public CameraInfo(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public CameraInfo(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public CameraInfo position(long position) { + return (CameraInfo)super.position(position); + } + + /** Device serial number. */ + public native @Cast("unsigned int") int serialNumber(); public native CameraInfo serialNumber(int serialNumber); + /** Interface type. */ + public native @Cast("FlyCapture2::InterfaceType") int interfaceType(); public native CameraInfo interfaceType(int interfaceType); + /** Driver type. */ + public native @Cast("FlyCapture2::DriverType") int driverType(); public native CameraInfo driverType(int driverType); + /** Flag indicating if this is a color camera. */ + public native @Cast("bool") boolean isColorCamera(); public native CameraInfo isColorCamera(boolean isColorCamera); + /** Device model name. */ + public native @Cast("char") byte modelName(int i); public native CameraInfo modelName(int i, byte modelName); + @MemberGetter public native @Cast("char*") BytePointer modelName(); + /** Device vendor name. */ + public native @Cast("char") byte vendorName(int i); public native CameraInfo vendorName(int i, byte vendorName); + @MemberGetter public native @Cast("char*") BytePointer vendorName(); + /** String detailing the sensor information. */ + public native @Cast("char") byte sensorInfo(int i); public native CameraInfo sensorInfo(int i, byte sensorInfo); + @MemberGetter public native @Cast("char*") BytePointer sensorInfo(); + /** String providing the sensor resolution. */ + public native @Cast("char") byte sensorResolution(int i); public native CameraInfo sensorResolution(int i, byte sensorResolution); + @MemberGetter public native @Cast("char*") BytePointer sensorResolution(); + /** Driver name of driver being used. */ + public native @Cast("char") byte driverName(int i); public native CameraInfo driverName(int i, byte driverName); + @MemberGetter public native @Cast("char*") BytePointer driverName(); + /** Firmware version of camera. */ + public native @Cast("char") byte firmwareVersion(int i); public native CameraInfo firmwareVersion(int i, byte firmwareVersion); + @MemberGetter public native @Cast("char*") BytePointer firmwareVersion(); + /** Firmware build time. */ + public native @Cast("char") byte firmwareBuildTime(int i); public native CameraInfo firmwareBuildTime(int i, byte firmwareBuildTime); + @MemberGetter public native @Cast("char*") BytePointer firmwareBuildTime(); + /** Maximum bus speed. */ + public native @Cast("FlyCapture2::BusSpeed") int maximumBusSpeed(); public native CameraInfo maximumBusSpeed(int maximumBusSpeed); + /** Bayer tile format. */ + public native @Cast("FlyCapture2::BayerTileFormat") int bayerTileFormat(); public native CameraInfo bayerTileFormat(int bayerTileFormat); + /** Bus number, set to 0 for GigE and USB cameras **/ + public native @Cast("unsigned short") short busNumber(); public native CameraInfo busNumber(short busNumber); + /** ieee1394 Node number, set to 0 for GigE and USB cameras **/ + public native @Cast("unsigned short") short nodeNumber(); public native CameraInfo nodeNumber(short nodeNumber); + /** PCIe Bus Speed, set to PCIE_BUSSPEED_UNKNOWN for unsupported drivers **/ + public native @Cast("FlyCapture2::PCIeBusSpeed") int pcieBusSpeed(); public native CameraInfo pcieBusSpeed(int pcieBusSpeed); + + /** \name IIDC specific information */ + /*@{*/ + + /** DCAM version. */ + public native @Cast("unsigned int") int iidcVer(); public native CameraInfo iidcVer(int iidcVer); + /** Configuration ROM data. */ + public native @ByRef ConfigROM configROM(); public native CameraInfo configROM(ConfigROM configROM); + + /*@}*/ + + /** \name GigE specific information */ + /*@{*/ + + /** GigE Vision version. */ + public native @Cast("unsigned int") int gigEMajorVersion(); public native CameraInfo gigEMajorVersion(int gigEMajorVersion); + /** GigE Vision minor version. */ + public native @Cast("unsigned int") int gigEMinorVersion(); public native CameraInfo gigEMinorVersion(int gigEMinorVersion); + /** User defined name. */ + public native @Cast("char") byte userDefinedName(int i); public native CameraInfo userDefinedName(int i, byte userDefinedName); + @MemberGetter public native @Cast("char*") BytePointer userDefinedName(); + /** XML URL 1. */ + public native @Cast("char") byte xmlURL1(int i); public native CameraInfo xmlURL1(int i, byte xmlURL1); + @MemberGetter public native @Cast("char*") BytePointer xmlURL1(); + /** XML URL 2. */ + public native @Cast("char") byte xmlURL2(int i); public native CameraInfo xmlURL2(int i, byte xmlURL2); + @MemberGetter public native @Cast("char*") BytePointer xmlURL2(); + /** MAC address */ + public native @ByRef MACAddress macAddress(); public native CameraInfo macAddress(MACAddress macAddress); + /** IP address. */ + public native @ByRef IPAddress ipAddress(); public native CameraInfo ipAddress(IPAddress ipAddress); + /** Subnet mask. */ + public native @ByRef IPAddress subnetMask(); public native CameraInfo subnetMask(IPAddress subnetMask); + /** Default gateway. */ + public native @ByRef IPAddress defaultGateway(); public native CameraInfo defaultGateway(IPAddress defaultGateway); + /** Status/Content of CCP register */ + public native @Cast("unsigned int") int ccpStatus(); public native CameraInfo ccpStatus(int ccpStatus); + /** Local Application IP Address. */ + public native @Cast("unsigned int") int applicationIPAddress(); public native CameraInfo applicationIPAddress(int applicationIPAddress); + /** Local Application port. */ + public native @Cast("unsigned int") int applicationPort(); public native CameraInfo applicationPort(int applicationPort); + /*@}*/ + + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native CameraInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public CameraInfo() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Properties of a single embedded image info property. */ + @Namespace("FlyCapture2") @NoOffset public static class EmbeddedImageInfoProperty extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public EmbeddedImageInfoProperty(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public EmbeddedImageInfoProperty(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public EmbeddedImageInfoProperty position(long position) { + return (EmbeddedImageInfoProperty)super.position(position); + } + + /** Whether this property is available. */ + public native @Cast("bool") boolean available(); public native EmbeddedImageInfoProperty available(boolean available); + /** Whether this property is on or off. */ + public native @Cast("bool") boolean onOff(); public native EmbeddedImageInfoProperty onOff(boolean onOff); + + public EmbeddedImageInfoProperty() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Properties of the possible embedded image information. */ + @Namespace("FlyCapture2") public static class EmbeddedImageInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public EmbeddedImageInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public EmbeddedImageInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public EmbeddedImageInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public EmbeddedImageInfo position(long position) { + return (EmbeddedImageInfo)super.position(position); + } + + public native @ByRef EmbeddedImageInfoProperty timestamp(); public native EmbeddedImageInfo timestamp(EmbeddedImageInfoProperty timestamp); + public native @ByRef EmbeddedImageInfoProperty gain(); public native EmbeddedImageInfo gain(EmbeddedImageInfoProperty gain); + public native @ByRef EmbeddedImageInfoProperty shutter(); public native EmbeddedImageInfo shutter(EmbeddedImageInfoProperty shutter); + public native @ByRef EmbeddedImageInfoProperty brightness(); public native EmbeddedImageInfo brightness(EmbeddedImageInfoProperty brightness); + public native @ByRef EmbeddedImageInfoProperty exposure(); public native EmbeddedImageInfo exposure(EmbeddedImageInfoProperty exposure); + public native @ByRef EmbeddedImageInfoProperty whiteBalance(); public native EmbeddedImageInfo whiteBalance(EmbeddedImageInfoProperty whiteBalance); + public native @ByRef EmbeddedImageInfoProperty frameCounter(); public native EmbeddedImageInfo frameCounter(EmbeddedImageInfoProperty frameCounter); + public native @ByRef EmbeddedImageInfoProperty strobePattern(); public native EmbeddedImageInfo strobePattern(EmbeddedImageInfoProperty strobePattern); + public native @ByRef EmbeddedImageInfoProperty GPIOPinState(); public native EmbeddedImageInfo GPIOPinState(EmbeddedImageInfoProperty GPIOPinState); + public native @ByRef EmbeddedImageInfoProperty ROIPosition(); public native EmbeddedImageInfo ROIPosition(EmbeddedImageInfoProperty ROIPosition); + } + + /** Metadata related to an image. */ + @Namespace("FlyCapture2") @NoOffset public static class ImageMetadata extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public ImageMetadata(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public ImageMetadata(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public ImageMetadata position(long position) { + return (ImageMetadata)super.position(position); + } + + /** Embedded timestamp. */ + public native @Cast("unsigned int") int embeddedTimeStamp(); public native ImageMetadata embeddedTimeStamp(int embeddedTimeStamp); + /** Embedded gain. */ + public native @Cast("unsigned int") int embeddedGain(); public native ImageMetadata embeddedGain(int embeddedGain); + /** Embedded shutter. */ + public native @Cast("unsigned int") int embeddedShutter(); public native ImageMetadata embeddedShutter(int embeddedShutter); + /** Embedded brightness. */ + public native @Cast("unsigned int") int embeddedBrightness(); public native ImageMetadata embeddedBrightness(int embeddedBrightness); + /** Embedded exposure. */ + public native @Cast("unsigned int") int embeddedExposure(); public native ImageMetadata embeddedExposure(int embeddedExposure); + /** Embedded white balance. */ + public native @Cast("unsigned int") int embeddedWhiteBalance(); public native ImageMetadata embeddedWhiteBalance(int embeddedWhiteBalance); + /** Embedded frame counter. */ + public native @Cast("unsigned int") int embeddedFrameCounter(); public native ImageMetadata embeddedFrameCounter(int embeddedFrameCounter); + /** Embedded strobe pattern. */ + public native @Cast("unsigned int") int embeddedStrobePattern(); public native ImageMetadata embeddedStrobePattern(int embeddedStrobePattern); + /** Embedded GPIO pin state. */ + public native @Cast("unsigned int") int embeddedGPIOPinState(); public native ImageMetadata embeddedGPIOPinState(int embeddedGPIOPinState); + /** Embedded ROI position. */ + public native @Cast("unsigned int") int embeddedROIPosition(); public native ImageMetadata embeddedROIPosition(int embeddedROIPosition); + + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native ImageMetadata reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public ImageMetadata() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Information about the camera's look up table. */ + @Namespace("FlyCapture2") @NoOffset public static class LUTData extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public LUTData(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public LUTData(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public LUTData position(long position) { + return (LUTData)super.position(position); + } + + /** Flag indicating if LUT is supported. */ + public native @Cast("bool") boolean supported(); public native LUTData supported(boolean supported); + /** Flag indicating if LUT is enabled. */ + public native @Cast("bool") boolean enabled(); public native LUTData enabled(boolean enabled); + /** The number of LUT banks available (Always 1 for PGR LUT). */ + public native @Cast("unsigned int") int numBanks(); public native LUTData numBanks(int numBanks); + /** The number of LUT channels per bank available. */ + public native @Cast("unsigned int") int numChannels(); public native LUTData numChannels(int numChannels); + /** The input bit depth of the LUT. */ + public native @Cast("unsigned int") int inputBitDepth(); public native LUTData inputBitDepth(int inputBitDepth); + /** The output bit depth of the LUT. */ + public native @Cast("unsigned int") int outputBitDepth(); public native LUTData outputBitDepth(int outputBitDepth); + /** The number of entries in the LUT. */ + public native @Cast("unsigned int") int numEntries(); public native LUTData numEntries(int numEntries); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native LUTData reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public LUTData() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Camera diagnostic information. */ + @Namespace("FlyCapture2") @NoOffset public static class CameraStats extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public CameraStats(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public CameraStats(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public CameraStats position(long position) { + return (CameraStats)super.position(position); + } + + /* Number of dropped images in DROP_IMAGE mode */ + public native @Cast("unsigned int") int imageDropped(); public native CameraStats imageDropped(int imageDropped); + /* Number of corrupt images, such as missing packet, zero packet */ + public native @Cast("unsigned int") int imageCorrupt(); public native CameraStats imageCorrupt(int imageCorrupt); + /* Number of transmissions failed of camera */ + public native @Cast("unsigned int") int imageXmitFailed(); public native CameraStats imageXmitFailed(int imageXmitFailed); + /* Number of images dropped in driver */ + public native @Cast("unsigned int") int imageDriverDropped(); public native CameraStats imageDriverDropped(int imageDriverDropped); + /* Errors of register reading */ + public native @Cast("unsigned int") int regReadFailed(); public native CameraStats regReadFailed(int regReadFailed); + /* Errors of register writing */ + public native @Cast("unsigned int") int regWriteFailed(); public native CameraStats regWriteFailed(int regWriteFailed); + /* Port errors */ + public native @Cast("unsigned int") int portErrors(); public native CameraStats portErrors(int portErrors); + /* The value of the camera power register. + * false: Camera is powered down. + * true: Camera is powered up. + */ + public native @Cast("bool") boolean cameraPowerUp(); public native CameraStats cameraPowerUp(boolean cameraPowerUp); - /** Constructor. */ - public PGRGuid() { super((Pointer)null); allocate(); } - private native void allocate(); + /* The voltage values of the various voltage registers + * supported by the camera. + */ + public native float cameraVoltages(int i); public native CameraStats cameraVoltages(int i, float cameraVoltages); + @MemberGetter public native FloatPointer cameraVoltages(); + /** The number of voltage registers available. + * 0: the values in cameraVoltages[] are invalid. + */ + public native @Cast("unsigned int") int numVoltages(); public native CameraStats numVoltages(int numVoltages); - /** Equality operator. */ - public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef PGRGuid guid ); + /* The current values of the various current registers + * supported by the camera. + */ + public native float cameraCurrents(int i); public native CameraStats cameraCurrents(int i, float cameraCurrents); + @MemberGetter public native FloatPointer cameraCurrents(); + /** The number of current registers available. + * 0: the values in cameraCurrents[] are invalid. + */ + public native @Cast("unsigned int") int numCurrents(); public native CameraStats numCurrents(int numCurrents); + /* The temperature of the camera board-level components. The value is + * in kelvins (0�C = 273.15K) and are in one-tenths (0.1) of a kelvin. + */ + public native @Cast("unsigned int") int temperature(); public native CameraStats temperature(int temperature); + /* Time in seconds since the camera was initialized. */ + public native @Cast("unsigned int") int timeSinceInitialization(); public native CameraStats timeSinceInitialization(int timeSinceInitialization); + /* Time in seconds since the camera detected a bus reset. */ + public native @Cast("unsigned int") int timeSinceBusReset(); public native CameraStats timeSinceBusReset(int timeSinceBusReset); + /* Time stamp */ + public native @ByRef TimeStamp timeStamp(); public native CameraStats timeStamp(TimeStamp timeStamp); + /* Number of packets requested for resend */ + public native @Cast("unsigned int") int numResendPacketsRequested(); public native CameraStats numResendPacketsRequested(int numResendPacketsRequested); + /* Number of packet-resend packets received */ + public native @Cast("unsigned int") int numResendPacketsReceived(); public native CameraStats numResendPacketsReceived(int numResendPacketsReceived); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native CameraStats reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public CameraStats() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + + /** + * \defgroup ImageSaveStructures Image saving structures. + * + * These structures define various parameters used for saving images. + */ + + /*@{*/ + + /** Options for saving PNG images. */ + @Namespace("FlyCapture2") @NoOffset public static class PNGOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public PNGOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public PNGOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public PNGOption position(long position) { + return (PNGOption)super.position(position); + } + + /** Whether to save the PNG as interlaced. */ + public native @Cast("bool") boolean interlaced(); public native PNGOption interlaced(boolean interlaced); + /** Compression level (0-9). 0 is no compression, 9 is best compression. */ + public native @Cast("unsigned int") int compressionLevel(); public native PNGOption compressionLevel(int compressionLevel); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native PNGOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public PNGOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving PPM images. */ + @Namespace("FlyCapture2") @NoOffset public static class PPMOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public PPMOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public PPMOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public PPMOption position(long position) { + return (PPMOption)super.position(position); + } + + /** Whether to save the PPM as a binary file. */ + public native @Cast("bool") boolean binaryFile(); public native PPMOption binaryFile(boolean binaryFile); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native PPMOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public PPMOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving PGM images. */ + @Namespace("FlyCapture2") @NoOffset public static class PGMOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public PGMOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public PGMOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public PGMOption position(long position) { + return (PGMOption)super.position(position); + } + + /** Whether to save the PPM as a binary file. */ + public native @Cast("bool") boolean binaryFile(); public native PGMOption binaryFile(boolean binaryFile); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native PGMOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public PGMOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving TIFF images. */ + @Namespace("FlyCapture2") @NoOffset public static class TIFFOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public TIFFOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public TIFFOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public TIFFOption position(long position) { + return (TIFFOption)super.position(position); + } + + /** enum FlyCapture2::TIFFOption::CompressionMethod */ + public static final int + /** Save without any compression. */ + NONE = 1, + /** Save using PACKBITS compression. */ + PACKBITS = 2, + /** Save using DEFLATE compression (ZLIB compression). */ + DEFLATE = 3, + /** Save using ADOBE DEFLATE compression */ + ADOBE_DEFLATE = 4, + /** + * Save using CCITT Group 3 fax encoding. This is only valid for + * 1-bit images only. Default to LZW for other bit depths. + */ + CCITTFAX3 = 5, + /** + * Save using CCITT Group 4 fax encoding. This is only valid for + * 1-bit images only. Default to LZW for other bit depths. + */ + CCITTFAX4 = 6, + /** Save using LZW compression. */ + LZW = 7, + /** + * Save using JPEG compression. This is only valid for 8-bit + * greyscale and 24-bit only. Default to LZW for other bit depths. + */ + JPEG = 8; + + /** Compression method to use for encoding TIFF images. */ + public native @Cast("FlyCapture2::TIFFOption::CompressionMethod") int compression(); public native TIFFOption compression(int compression); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native TIFFOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public TIFFOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving JPEG image. */ + @Namespace("FlyCapture2") @NoOffset public static class JPEGOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public JPEGOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public JPEGOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public JPEGOption position(long position) { + return (JPEGOption)super.position(position); + } + + /** Whether to save as a progressive JPEG file. */ + public native @Cast("bool") boolean progressive(); public native JPEGOption progressive(boolean progressive); + /** + * JPEG image quality in range (0-100). + * - 100 - Superb quality. + * - 75 - Good quality. + * - 50 - Normal quality. + * - 10 - Poor quality. + */ + public native @Cast("unsigned int") int quality(); public native JPEGOption quality(int quality); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native JPEGOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public JPEGOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving JPEG2000 image. */ + @Namespace("FlyCapture2") @NoOffset public static class JPG2Option extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public JPG2Option(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public JPG2Option(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public JPG2Option position(long position) { + return (JPG2Option)super.position(position); + } + + /** JPEG saving quality in range (1-512). */ + public native @Cast("unsigned int") int quality(); public native JPG2Option quality(int quality); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native JPG2Option reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public JPG2Option() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving Bitmap image. */ + @Namespace("FlyCapture2") @NoOffset public static class BMPOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public BMPOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public BMPOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public BMPOption position(long position) { + return (BMPOption)super.position(position); + } + + public native @Cast("bool") boolean indexedColor_8bit(); public native BMPOption indexedColor_8bit(boolean indexedColor_8bit); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native BMPOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public BMPOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /* Callback function typedef: a function accepting pointer-to-void input as its sole + * argument, and returns void (ie: nothing). + */ + public static class CameraEventCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public CameraEventCallback(Pointer p) { super(p); } + protected CameraEventCallback() { allocate(); } + private native void allocate(); + public native void call(Pointer data); + } + + /** Options for enabling device event registration. */ + @Namespace("FlyCapture2") public static class EventOptions extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public EventOptions() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public EventOptions(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public EventOptions(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public EventOptions position(long position) { + return (EventOptions)super.position(position); + } + + /** Callback function pointer */ + public native CameraEventCallback EventCallbackFcn(); public native EventOptions EventCallbackFcn(CameraEventCallback EventCallbackFcn); + + /** Event name to register */ + @MemberGetter public native @Cast("const char*") BytePointer EventName(); + + /** Pointer to callback data to be passed to the callback function */ + @MemberGetter public native @Const Pointer EventUserData(); + + /** Size of the underlying struct passed as eventCallbackData for sanity checks */ + public native @Cast("size_t") long EventUserDataSize(); public native EventOptions EventUserDataSize(long EventUserDataSize); + } + + + /* Callback data passed to the callback function provided when using + * RegisterEvent() or RegisterAllEvents(). + */ + @Namespace("FlyCapture2") public static class EventCallbackData extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public EventCallbackData() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public EventCallbackData(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public EventCallbackData(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public EventCallbackData position(long position) { + return (EventCallbackData)super.position(position); + } + + /** Pointer to the user-supplied data struct */ + public native Pointer EventUserData(); public native EventCallbackData EventUserData(Pointer EventUserData); + + /** Size of the user data data supplied to the RegisterEvent() + * function. + */ + public native @Cast("size_t") long EventUserDataSize(); public native EventCallbackData EventUserDataSize(long EventUserDataSize); - /** Inequality operator. */ - public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef PGRGuid guid ); - } + /** The event name used to register the event. Provided so the user + * knows which event triggered the callback. + */ + @MemberGetter public native @Cast("const char*") BytePointer EventName(); - /** - * \defgroup GigEStructures GigE specific structures - * - * These structures are specific to GigE camera operation only. - */ + /** The device register which EventName maps to. Provides an alternate + * means of indexing into different event types. + */ + public native @Cast("long long unsigned") long EventID(); public native EventCallbackData EventID(long EventID); - /*@{*/ + /** Timestamp indicated the time (as reported by the camera) at which + * the camera exposure operation completed. This can be compared with + * image stimestamps if there is a need to map event timestamps to + * specific images, if applicable. + */ + public native @Cast("long long unsigned") long EventTimestamp(); public native EventCallbackData EventTimestamp(long EventTimestamp); - /** IPv4 address. */ - @Namespace("FlyCapture2") @NoOffset public static class IPAddress extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public IPAddress(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public IPAddress(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public IPAddress position(long position) { - return (IPAddress)super.position(position); - } - - public native @Cast("unsigned char") byte octets(int i); public native IPAddress octets(int i, byte octets); - @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); + /** A pointer to additional data pertaining to the event which just + * trigger the callback function. The data may be of difference sizes + * or may not even be allocated, depending on the type of event which + * triggered the callback. + */ + public native Pointer EventData(); public native EventCallbackData EventData(Pointer EventData); - public IPAddress() { super((Pointer)null); allocate(); } - private native void allocate(); + /** The size of the structure pointed to by EventData. This value should + * be checked, especially if there are events which can trigger variable- + * length event data to be returned to the user when the callback function + * is issued. + */ + public native @Cast("size_t") long EventDataSize(); public native EventCallbackData EventDataSize(long EventDataSize); + } + /*@}*/ - public IPAddress( @Cast("unsigned int") int ipAddressVal ) { super((Pointer)null); allocate(ipAddressVal); } - private native void allocate( @Cast("unsigned int") int ipAddressVal ); + /*@}*/ - /** Equality operator. */ - public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef IPAddress address ); - /** Inequality operator. */ - public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef IPAddress address ); - } +// #endif // FLIR_FC2_FLYCAPTURE2DEFS_H - /** MAC address. */ - @Namespace("FlyCapture2") @NoOffset public static class MACAddress extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public MACAddress(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public MACAddress(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public MACAddress position(long position) { - return (MACAddress)super.position(position); - } - - public native @Cast("unsigned char") byte octets(int i); public native MACAddress octets(int i, byte octets); - @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); - public MACAddress() { super((Pointer)null); allocate(); } - private native void allocate(); - public MACAddress( @Cast("unsigned int") int macAddressValHigh, @Cast("unsigned int") int macAddressValLow ) { super((Pointer)null); allocate(macAddressValHigh, macAddressValLow); } - private native void allocate( @Cast("unsigned int") int macAddressValHigh, @Cast("unsigned int") int macAddressValLow ); +// Parsed from - /** Equality operator. */ - public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef MACAddress address ); +//============================================================================= +// 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. +//============================================================================= - /** Inequality operator. */ - public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef MACAddress address ); - } +//============================================================================= +// $Id: Error.h 316355 2017-02-20 23:02:28Z alin $ +//============================================================================= - /** A GigE property. */ - @Namespace("FlyCapture2") public static class GigEProperty extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public GigEProperty() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public GigEProperty(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public GigEProperty(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public GigEProperty position(long position) { - return (GigEProperty)super.position(position); - } - - /** The type of property. */ - public native @Cast("FlyCapture2::GigEPropertyType") int propType(); public native GigEProperty propType(int propType); - /** - * Whether the property is readable. If this is false, then - * no other value in this structure is valid. - */ - public native @Cast("bool") boolean isReadable(); public native GigEProperty isReadable(boolean isReadable); - /** Whether the property is writable. */ - public native @Cast("bool") boolean isWritable(); public native GigEProperty isWritable(boolean isWritable); - /** Minimum value. */ - public native @Cast("unsigned int") int min(); public native GigEProperty min(int min); - /** Maximum value. */ - public native @Cast("unsigned int") int max(); public native GigEProperty max(int max); - /** Current value. */ - public native @Cast("unsigned int") int value(); public native GigEProperty value(int value); - } +// #ifndef PGR_FC2_ERROR_H +// #define PGR_FC2_ERROR_H - /** Information about a single GigE stream channel. */ - @Namespace("FlyCapture2") @NoOffset public static class GigEStreamChannel extends Pointer { - static { Loader.load(); } +// #include "FlyCapture2Platform.h" +// #include "FlyCapture2Defs.h" +// #include + @Namespace("FlyCapture2") @Opaque public static class ErrorImpl extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public ErrorImpl() { super((Pointer)null); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public GigEStreamChannel(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public GigEStreamChannel(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public GigEStreamChannel position(long position) { - return (GigEStreamChannel)super.position(position); - } - - /** Network interface index used (or to use). */ - public native @Cast("unsigned int") int networkInterfaceIndex(); public native GigEStreamChannel networkInterfaceIndex(int networkInterfaceIndex); - /** Host port on the PC where the camera will send the data stream. */ - public native @Cast("unsigned int") int hostPort(); public native GigEStreamChannel hostPort(int hostPort); - /** Disable IP fragmentation of packets. */ - public native @Cast("bool") boolean doNotFragment(); public native GigEStreamChannel doNotFragment(boolean doNotFragment); - /** Packet size, in bytes. */ - public native @Cast("unsigned int") int packetSize(); public native GigEStreamChannel packetSize(int packetSize); - /** Inter packet delay, in timestamp counter units. */ - public native @Cast("unsigned int") int interPacketDelay(); public native GigEStreamChannel interPacketDelay(int interPacketDelay); - /** Destination IP address. It can be a multicast or unicast address. */ - public native @ByRef IPAddress destinationIpAddress(); public native GigEStreamChannel destinationIpAddress(IPAddress destinationIpAddress); - /** Source UDP port of the stream channel. Read only. */ - public native @Cast("unsigned int") int sourcePort(); public native GigEStreamChannel sourcePort(int sourcePort); - - public GigEStreamChannel() { super((Pointer)null); allocate(); } - private native void allocate(); + public ErrorImpl(Pointer p) { super(p); } } /** - * Configuration for a GigE camera. These options are options that are - * generally should be set before starting isochronous transfer. + * The Error object represents an error that is returned from the library. + * Overloaded operators allow comparisons against other Error objects or + * the ErrorType enumeration. */ - @Namespace("FlyCapture2") @NoOffset public static class GigEConfig extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public GigEConfig(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public GigEConfig(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public GigEConfig position(long position) { - return (GigEConfig)super.position(position); - } - - /** Turn on/off packet resend functionality */ - public native @Cast("bool") boolean enablePacketResend(); public native GigEConfig enablePacketResend(boolean enablePacketResend); - - /** - * Number of retries to perform when a register read/write timeout - * is received by the library. The default value is 0. - */ - public native @Cast("unsigned int") int registerTimeoutRetries(); public native GigEConfig registerTimeoutRetries(int registerTimeoutRetries); - - /** - * Register read/write timeout value, in microseconds. - * The default value is dependent on the interface type. - */ - public native @Cast("unsigned int") int registerTimeout(); public native GigEConfig registerTimeout(int registerTimeout); - - public GigEConfig() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Format 7 information for a single mode. */ - @Namespace("FlyCapture2") @NoOffset public static class GigEImageSettingsInfo extends Pointer { + @Namespace("FlyCapture2") @NoOffset public static class Error extends Pointer { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public GigEImageSettingsInfo(Pointer p) { super(p); } + public Error(Pointer p) { super(p); } /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public GigEImageSettingsInfo(long size) { super((Pointer)null); allocateArray(size); } + public Error(long size) { super((Pointer)null); allocateArray(size); } private native void allocateArray(long size); - @Override public GigEImageSettingsInfo position(long position) { - return (GigEImageSettingsInfo)super.position(position); + @Override public Error position(long position) { + return (Error)super.position(position); } - /** Maximum image width. */ - public native @Cast("unsigned int") int maxWidth(); public native GigEImageSettingsInfo maxWidth(int maxWidth); - /** Maximum image height. */ - public native @Cast("unsigned int") int maxHeight(); public native GigEImageSettingsInfo maxHeight(int maxHeight); - /** Horizontal step size for the offset. */ - public native @Cast("unsigned int") int offsetHStepSize(); public native GigEImageSettingsInfo offsetHStepSize(int offsetHStepSize); - /** Vertical step size for the offset. */ - public native @Cast("unsigned int") int offsetVStepSize(); public native GigEImageSettingsInfo offsetVStepSize(int offsetVStepSize); - /** Horizontal step size for the image. */ - public native @Cast("unsigned int") int imageHStepSize(); public native GigEImageSettingsInfo imageHStepSize(int imageHStepSize); - /** Vertical step size for the image. */ - public native @Cast("unsigned int") int imageVStepSize(); public native GigEImageSettingsInfo imageVStepSize(int imageVStepSize); - /** Supported pixel formats in a bit field. */ - public native @Cast("unsigned int") int pixelFormatBitField(); public native GigEImageSettingsInfo pixelFormatBitField(int pixelFormatBitField); - /** Vendor unique pixel formats in a bit field. */ - public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native GigEImageSettingsInfo vendorPixelFormatBitField(int vendorPixelFormatBitField); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native GigEImageSettingsInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public GigEImageSettingsInfo() { super((Pointer)null); allocate(); } - private native void allocate(); - } - /** Image settings for a GigE camera. */ - @Namespace("FlyCapture2") @NoOffset public static class GigEImageSettings extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public GigEImageSettings(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public GigEImageSettings(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public GigEImageSettings position(long position) { - return (GigEImageSettings)super.position(position); - } - - /** Horizontal image offset. */ - public native @Cast("unsigned int") int offsetX(); public native GigEImageSettings offsetX(int offsetX); - /** Vertical image offset. */ - public native @Cast("unsigned int") int offsetY(); public native GigEImageSettings offsetY(int offsetY); - /** Width of image. */ - public native @Cast("unsigned int") int width(); public native GigEImageSettings width(int width); - /** Height of image. */ - public native @Cast("unsigned int") int height(); public native GigEImageSettings height(int height); - /** Pixel format of image. */ - public native @Cast("FlyCapture2::PixelFormat") int pixelFormat(); public native GigEImageSettings pixelFormat(int pixelFormat); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native GigEImageSettings reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** + * Default constructor. + */ + public Error() { super((Pointer)null); allocate(); } + private native void allocate(); - public GigEImageSettings() { super((Pointer)null); allocate(); } - private native void allocate(); - } + /** + * Copy constructor. + */ + public Error( @Const @ByRef Error error ) { super((Pointer)null); allocate(error); } + private native void allocate( @Const @ByRef Error error ); - /*@}*/ + /** + * Default destructor. + */ - /** - * \defgroup IIDCStructures IIDC specific structures - * - * These structures are specific to IIDC camera operation only. - */ + /** + * Assignment operator. + */ + public native @ByRef @Name("operator =") Error put( @Const @ByRef Error error ); - /*@{*/ + /** + * Equality operator. + */ + public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef Error error ); - /** Format 7 image settings. */ - @Namespace("FlyCapture2") @NoOffset public static class Format7ImageSettings extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Format7ImageSettings(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public Format7ImageSettings(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public Format7ImageSettings position(long position) { - return (Format7ImageSettings)super.position(position); - } - - /** Format 7 mode. */ - public native @Cast("FlyCapture2::Mode") int mode(); public native Format7ImageSettings mode(int mode); - /** Horizontal image offset. */ - public native @Cast("unsigned int") int offsetX(); public native Format7ImageSettings offsetX(int offsetX); - /** Vertical image offset. */ - public native @Cast("unsigned int") int offsetY(); public native Format7ImageSettings offsetY(int offsetY); - /** Width of image. */ - public native @Cast("unsigned int") int width(); public native Format7ImageSettings width(int width); - /** Height of image. */ - public native @Cast("unsigned int") int height(); public native Format7ImageSettings height(int height); - /** Pixel format of image. */ - public native @Cast("FlyCapture2::PixelFormat") int pixelFormat(); public native Format7ImageSettings pixelFormat(int pixelFormat); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native Format7ImageSettings reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** + * Equality operator. This overloaded operator compares the + * ErrorType of the Error against the specified ErrorType. + */ + public native @Cast("bool") @Name("operator ==") boolean equals( @Cast("const FlyCapture2::ErrorType") int errorType ); - public Format7ImageSettings() { super((Pointer)null); allocate(); } - private native void allocate(); - } + /** + * Inequality operator. + */ + public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef Error error ); - /** Format 7 information for a single mode. */ - @Namespace("FlyCapture2") @NoOffset public static class Format7Info extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Format7Info(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public Format7Info(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public Format7Info position(long position) { - return (Format7Info)super.position(position); - } - - /** Format 7 mode. */ - public native @Cast("FlyCapture2::Mode") int mode(); public native Format7Info mode(int mode); - - /** Maximum image width. */ - public native @Cast("unsigned int") int maxWidth(); public native Format7Info maxWidth(int maxWidth); - /** Maximum image height. */ - public native @Cast("unsigned int") int maxHeight(); public native Format7Info maxHeight(int maxHeight); - /** Horizontal step size for the offset. */ - public native @Cast("unsigned int") int offsetHStepSize(); public native Format7Info offsetHStepSize(int offsetHStepSize); - /** Vertical step size for the offset. */ - public native @Cast("unsigned int") int offsetVStepSize(); public native Format7Info offsetVStepSize(int offsetVStepSize); - /** Horizontal step size for the image. */ - public native @Cast("unsigned int") int imageHStepSize(); public native Format7Info imageHStepSize(int imageHStepSize); - /** Vertical step size for the image. */ - public native @Cast("unsigned int") int imageVStepSize(); public native Format7Info imageVStepSize(int imageVStepSize); - /** Supported pixel formats in a bit field. */ - public native @Cast("unsigned int") int pixelFormatBitField(); public native Format7Info pixelFormatBitField(int pixelFormatBitField); - /** Vendor unique pixel formats in a bit field. */ - public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native Format7Info vendorPixelFormatBitField(int vendorPixelFormatBitField); - - /** Current packet size in bytes. */ - public native @Cast("unsigned int") int packetSize(); public native Format7Info packetSize(int packetSize); - /** Minimum packet size in bytes for current mode. */ - public native @Cast("unsigned int") int minPacketSize(); public native Format7Info minPacketSize(int minPacketSize); - /** Maximum packet size in bytes for current mode. */ - public native @Cast("unsigned int") int maxPacketSize(); public native Format7Info maxPacketSize(int maxPacketSize); - /** Current packet size as a percentage of maximum packet size. */ - public native float percentage(); public native Format7Info percentage(float percentage); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native Format7Info reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** + * Inequality operator. This overloaded operator compares the + * ErrorType of the Error against the specified ErrorType. + */ + public native @Cast("bool") @Name("operator !=") boolean notEquals( @Cast("const FlyCapture2::ErrorType") int errorType ); - public Format7Info() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Format 7 packet information. */ - @Namespace("FlyCapture2") @NoOffset public static class Format7PacketInfo extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Format7PacketInfo(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public Format7PacketInfo(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public Format7PacketInfo position(long position) { - return (Format7PacketInfo)super.position(position); - } - - /** Recommended bytes per packet. */ - public native @Cast("unsigned int") int recommendedBytesPerPacket(); public native Format7PacketInfo recommendedBytesPerPacket(int recommendedBytesPerPacket); - /** Maximum bytes per packet. */ - public native @Cast("unsigned int") int maxBytesPerPacket(); public native Format7PacketInfo maxBytesPerPacket(int maxBytesPerPacket); - /** Minimum bytes per packet. */ - public native @Cast("unsigned int") int unitBytesPerPacket(); public native Format7PacketInfo unitBytesPerPacket(int unitBytesPerPacket); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native Format7PacketInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public Format7PacketInfo() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /*@}*/ - - /** - * Configuration for a camera. These options are options that are - * generally should be set before starting isochronous transfer. - */ - @Namespace("FlyCapture2") @NoOffset public static class FC2Config extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public FC2Config(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public FC2Config(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public FC2Config position(long position) { - return (FC2Config)super.position(position); - } - - /** Number of buffers used by the FlyCapture2 library to grab images. */ - public native @Cast("unsigned int") int numBuffers(); public native FC2Config numBuffers(int numBuffers); - - /** - * Number of notifications per image. This value should only be set - * after the image settings to be used is set to the camera. - * The default number of notifications is 1. - * - * There are 4 general scenarios: - * - 1 notification - End of image - * - 2 notifications - After first packet and end of image - * - 3 notifications - After first packet, middle of image, end of image - * - x notifications - After first packet, (x -2) spread evenly, end of image - * - * Specifying zero for the number of notifications will be ignored (the current value - * will not be modified). - * - * Note that the event numbers start at 0. Ex. when 3 notifications are - * used, the three events will be 0, 1 and 2. - */ - public native @Cast("unsigned int") int numImageNotifications(); public native FC2Config numImageNotifications(int numImageNotifications); - - /** - * Minimum number of notifications needed for the current image - * settings on the camera. Read-only value. - */ - public native @Cast("unsigned int") int minNumImageNotifications(); public native FC2Config minNumImageNotifications(int minNumImageNotifications); - - /** - * Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() - * will wait for an image before timing out and returning. - */ - public native int grabTimeout(); public native FC2Config grabTimeout(int grabTimeout); - - /** Grab mode for the camera. The default is DROP_FRAMES. */ - public native @Cast("FlyCapture2::GrabMode") int grabMode(); public native FC2Config grabMode(int grabMode); - - /** This parameter enables RetrieveBuffer to run in high - * performance mode. This means that any interaction - * with the camera, other then grabbing the image is disabled. - * Currently Retrieve buffer reads registers on the camera to - * determine which embedded image information settings have been - * enabled, and it reads what the bayer tile is currently set to. - * When High Performance mode is on, these reads are disabled. This - * means that any changes to the Bayer Tile or to the Embedded image - * info after StartCapture() will not be tracked when made using - * direct register writes. If the corresponding SetEmbededImageInfo() - * and GetEmbededImageInfo() calls are used then the changes will be - * appropriately reflected. This also means that changes to embedded - * image info from other processes will not be updated either.*/ - public native @Cast("bool") boolean highPerformanceRetrieveBuffer(); public native FC2Config highPerformanceRetrieveBuffer(boolean highPerformanceRetrieveBuffer); - - /** Isochronous bus speed. */ - public native @Cast("FlyCapture2::BusSpeed") int isochBusSpeed(); public native FC2Config isochBusSpeed(int isochBusSpeed); - - /** Asynchronous bus speed. */ - public native @Cast("FlyCapture2::BusSpeed") int asyncBusSpeed(); public native FC2Config asyncBusSpeed(int asyncBusSpeed); - - /** - * Bandwidth allocation flag that tells the camera the bandwidth - * allocation strategy to employ. - */ - public native @Cast("FlyCapture2::BandwidthAllocation") int bandwidthAllocation(); public native FC2Config bandwidthAllocation(int bandwidthAllocation); - - /** - * Number of retries to perform when a register read/write timeout - * is received by the library. The default value is 0. - */ - public native @Cast("unsigned int") int registerTimeoutRetries(); public native FC2Config registerTimeoutRetries(int registerTimeoutRetries); - - /** - * Register read/write timeout value, in microseconds. - * The default value is dependent on the interface type. - */ - public native @Cast("unsigned int") int registerTimeout(); public native FC2Config registerTimeout(int registerTimeout); - - /** Reserved for future use */ - public native @Cast("unsigned int") int reserved(int i); public native FC2Config reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public FC2Config() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** - * Information about a specific camera property. This structure is also - * also used as the TriggerDelayInfo structure. - */ - @Namespace("FlyCapture2") @NoOffset public static class PropertyInfo extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public PropertyInfo(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public PropertyInfo(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public PropertyInfo position(long position) { - return (PropertyInfo)super.position(position); - } - - /** Property info type. */ - public native @Cast("FlyCapture2::PropertyType") int type(); public native PropertyInfo type(int type); - /** Flag indicating if the property is present. */ - public native @Cast("bool") boolean present(); public native PropertyInfo present(boolean present); - /** Flag indicating if auto is supported. */ - public native @Cast("bool") boolean autoSupported(); public native PropertyInfo autoSupported(boolean autoSupported); - /** Flag indicating if manual is supported. */ - public native @Cast("bool") boolean manualSupported(); public native PropertyInfo manualSupported(boolean manualSupported); - /** Flag indicating if on/off is supported. */ - public native @Cast("bool") boolean onOffSupported(); public native PropertyInfo onOffSupported(boolean onOffSupported); - /** Flag indicating if one push is supported. */ - public native @Cast("bool") boolean onePushSupported(); public native PropertyInfo onePushSupported(boolean onePushSupported); - /** Flag indicating if absolute mode is supported. */ - public native @Cast("bool") boolean absValSupported(); public native PropertyInfo absValSupported(boolean absValSupported); - /** Flag indicating if property value can be read out. */ - public native @Cast("bool") boolean readOutSupported(); public native PropertyInfo readOutSupported(boolean readOutSupported); - /** Minimum value (as an integer). */ - public native @Cast("unsigned int") int min(); public native PropertyInfo min(int min); - /** Maximum value (as an integer). */ - public native @Cast("unsigned int") int max(); public native PropertyInfo max(int max); - /** Minimum value (as a floating point value). */ - public native float absMin(); public native PropertyInfo absMin(float absMin); - /** Maximum value (as a floating point value). */ - public native float absMax(); public native PropertyInfo absMax(float absMax); - /** Textual description of units. */ - public native @Cast("char") byte pUnits(int i); public native PropertyInfo pUnits(int i, byte pUnits); - @MemberGetter public native @Cast("char*") BytePointer pUnits(); - /** Abbreviated textual description of units. */ - public native @Cast("char") byte pUnitAbbr(int i); public native PropertyInfo pUnitAbbr(int i, byte pUnitAbbr); - @MemberGetter public native @Cast("char*") BytePointer pUnitAbbr(); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native PropertyInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public PropertyInfo() { super((Pointer)null); allocate(); } - private native void allocate(); - - public PropertyInfo( @Cast("FlyCapture2::PropertyType") int propType ) { super((Pointer)null); allocate(propType); } - private native void allocate( @Cast("FlyCapture2::PropertyType") int propType ); - } - - /** The TriggerDelayInfo structure is identical to PropertyInfo. */ - - /** - * A specific camera property. \n - * For example, to set the gain to 12dB, set the following values: - * - \a type - \c GAIN - * - \a absControl - \c true - * - \a onePush - \c false - * - \a onOff - \c true - * - \a autoManualMode - \c false - * - \a absValue - \c 12.0 - */ - @Namespace("FlyCapture2") @NoOffset public static class Property extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Property(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public Property(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public Property position(long position) { - return (Property)super.position(position); - } - - /** Property info type. */ - public native @Cast("FlyCapture2::PropertyType") int type(); public native Property type(int type); - /** Flag indicating if the property is present. */ - public native @Cast("bool") boolean present(); public native Property present(boolean present); - /** - * Flag controlling absolute mode (real world units) - * or non-absolute mode (camera internal units). - */ - public native @Cast("bool") boolean absControl(); public native Property absControl(boolean absControl); - /** Flag controlling one push. */ - public native @Cast("bool") boolean onePush(); public native Property onePush(boolean onePush); - /** Flag controlling on/off. */ - public native @Cast("bool") boolean onOff(); public native Property onOff(boolean onOff); - /** Flag controlling auto. */ - public native @Cast("bool") boolean autoManualMode(); public native Property autoManualMode(boolean autoManualMode); - /** - * Value A (integer). - * Used to configure properties in non-absolute mode. - */ - public native @Cast("unsigned int") int valueA(); public native Property valueA(int valueA); - /** - * Value B (integer). For white balance, value B applies to the blue value and - * value A applies to the red value. - */ - public native @Cast("unsigned int") int valueB(); public native Property valueB(int valueB); - /** - * Floating point value. - * Used to configure properties in absolute mode. - */ - public native float absValue(); public native Property absValue(float absValue); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native Property reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public Property() { super((Pointer)null); allocate(); } - private native void allocate(); - - public Property( @Cast("FlyCapture2::PropertyType") int propType ) { super((Pointer)null); allocate(propType); } - private native void allocate( @Cast("FlyCapture2::PropertyType") int propType ); - } - - /** The TriggerDelay structure is identical to Property. */ - - /** Information about a camera trigger property. */ - @Namespace("FlyCapture2") @NoOffset public static class TriggerModeInfo extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public TriggerModeInfo(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public TriggerModeInfo(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public TriggerModeInfo position(long position) { - return (TriggerModeInfo)super.position(position); - } - - /** Presence of trigger mode. */ - public native @Cast("bool") boolean present(); public native TriggerModeInfo present(boolean present); - /** Flag indicating if trigger value can be read out. */ - public native @Cast("bool") boolean readOutSupported(); public native TriggerModeInfo readOutSupported(boolean readOutSupported); - /** Flag indicating if on/off is supported. */ - public native @Cast("bool") boolean onOffSupported(); public native TriggerModeInfo onOffSupported(boolean onOffSupported); - /** Flag indicating if polarity is supported. */ - public native @Cast("bool") boolean polaritySupported(); public native TriggerModeInfo polaritySupported(boolean polaritySupported); - /** Flag indicating if the value is readable. */ - public native @Cast("bool") boolean valueReadable(); public native TriggerModeInfo valueReadable(boolean valueReadable); - /** Source mask. */ - public native @Cast("unsigned int") int sourceMask(); public native TriggerModeInfo sourceMask(int sourceMask); - /** Flag indicating if software trigger is supported. */ - public native @Cast("bool") boolean softwareTriggerSupported(); public native TriggerModeInfo softwareTriggerSupported(boolean softwareTriggerSupported); - /** Mode mask. */ - public native @Cast("unsigned int") int modeMask(); public native TriggerModeInfo modeMask(int modeMask); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native TriggerModeInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public TriggerModeInfo() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** A camera trigger. */ - @Namespace("FlyCapture2") @NoOffset public static class TriggerMode extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public TriggerMode(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public TriggerMode(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public TriggerMode position(long position) { - return (TriggerMode)super.position(position); - } - - /** Flag controlling on/off. */ - public native @Cast("bool") boolean onOff(); public native TriggerMode onOff(boolean onOff); - /** Polarity value. */ - public native @Cast("unsigned int") int polarity(); public native TriggerMode polarity(int polarity); - /** Source value. */ - public native @Cast("unsigned int") int source(); public native TriggerMode source(int source); - /** Mode value. */ - public native @Cast("unsigned int") int mode(); public native TriggerMode mode(int mode); - /** Parameter value. */ - public native @Cast("unsigned int") int parameter(); public native TriggerMode parameter(int parameter); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native TriggerMode reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public TriggerMode() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** A camera strobe property. */ - @Namespace("FlyCapture2") @NoOffset public static class StrobeInfo extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public StrobeInfo(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public StrobeInfo(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public StrobeInfo position(long position) { - return (StrobeInfo)super.position(position); - } - - /** Source value. */ - public native @Cast("unsigned int") int source(); public native StrobeInfo source(int source); - /** Presence of strobe. */ - public native @Cast("bool") boolean present(); public native StrobeInfo present(boolean present); - /** Flag indicating if strobe value can be read out. */ - public native @Cast("bool") boolean readOutSupported(); public native StrobeInfo readOutSupported(boolean readOutSupported); - /** Flag indicating if on/off is supported. */ - public native @Cast("bool") boolean onOffSupported(); public native StrobeInfo onOffSupported(boolean onOffSupported); - /** Flag indicating if polarity is supported. */ - public native @Cast("bool") boolean polaritySupported(); public native StrobeInfo polaritySupported(boolean polaritySupported); - /** Minimum value. */ - public native float minValue(); public native StrobeInfo minValue(float minValue); - /** Maximum value. */ - public native float maxValue(); public native StrobeInfo maxValue(float maxValue); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native StrobeInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public StrobeInfo() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** A camera strobe. */ - @Namespace("FlyCapture2") @NoOffset public static class StrobeControl extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public StrobeControl(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public StrobeControl(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public StrobeControl position(long position) { - return (StrobeControl)super.position(position); - } - - /** Source value. */ - public native @Cast("unsigned int") int source(); public native StrobeControl source(int source); - /** Flag controlling on/off. */ - public native @Cast("bool") boolean onOff(); public native StrobeControl onOff(boolean onOff); - /** Signal polarity. */ - public native @Cast("unsigned int") int polarity(); public native StrobeControl polarity(int polarity); - /** Signal delay (in ms). */ - public native float delay(); public native StrobeControl delay(float delay); - /** Signal duration (in ms). */ - public native float duration(); public native StrobeControl duration(float duration); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native StrobeControl reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public StrobeControl() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Timestamp information. */ - @Namespace("FlyCapture2") @NoOffset public static class TimeStamp extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public TimeStamp(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public TimeStamp(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public TimeStamp position(long position) { - return (TimeStamp)super.position(position); - } - - /** Seconds. */ - public native long seconds(); public native TimeStamp seconds(long seconds); - /** Microseconds. */ - public native @Cast("unsigned int") int microSeconds(); public native TimeStamp microSeconds(int microSeconds); - /** 1394 cycle time seconds. */ - public native @Cast("unsigned int") int cycleSeconds(); public native TimeStamp cycleSeconds(int cycleSeconds); - /** 1394 cycle time count. */ - public native @Cast("unsigned int") int cycleCount(); public native TimeStamp cycleCount(int cycleCount); - /** 1394 cycle time offset. */ - public native @Cast("unsigned int") int cycleOffset(); public native TimeStamp cycleOffset(int cycleOffset); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native TimeStamp reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public TimeStamp() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Camera configuration ROM. */ - @Namespace("FlyCapture2") @NoOffset public static class ConfigROM extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public ConfigROM(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public ConfigROM(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public ConfigROM position(long position) { - return (ConfigROM)super.position(position); - } - - /** Vendor ID of a node. */ - public native @Cast("unsigned int") int nodeVendorId(); public native ConfigROM nodeVendorId(int nodeVendorId); - /** Chip ID (high part). */ - public native @Cast("unsigned int") int chipIdHi(); public native ConfigROM chipIdHi(int chipIdHi); - /** Chip ID (low part). */ - public native @Cast("unsigned int") int chipIdLo(); public native ConfigROM chipIdLo(int chipIdLo); - /** Unit Spec ID, usually 0xa02d. */ - public native @Cast("unsigned int") int unitSpecId(); public native ConfigROM unitSpecId(int unitSpecId); - /** Unit software version. */ - public native @Cast("unsigned int") int unitSWVer(); public native ConfigROM unitSWVer(int unitSWVer); - /** Unit sub software version. */ - public native @Cast("unsigned int") int unitSubSWVer(); public native ConfigROM unitSubSWVer(int unitSubSWVer); - /** Vendor unique info 0. */ - public native @Cast("unsigned int") int vendorUniqueInfo_0(); public native ConfigROM vendorUniqueInfo_0(int vendorUniqueInfo_0); - /** Vendor unique info 1. */ - public native @Cast("unsigned int") int vendorUniqueInfo_1(); public native ConfigROM vendorUniqueInfo_1(int vendorUniqueInfo_1); - /** Vendor unique info 2. */ - public native @Cast("unsigned int") int vendorUniqueInfo_2(); public native ConfigROM vendorUniqueInfo_2(int vendorUniqueInfo_2); - /** Vendor unique info 3. */ - public native @Cast("unsigned int") int vendorUniqueInfo_3(); public native ConfigROM vendorUniqueInfo_3(int vendorUniqueInfo_3); - /** Keyword. */ - public native @Cast("char") byte pszKeyword(int i); public native ConfigROM pszKeyword(int i, byte pszKeyword); - @MemberGetter public native @Cast("char*") BytePointer pszKeyword(); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native ConfigROM reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public ConfigROM() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Camera information. */ - @Namespace("FlyCapture2") @NoOffset public static class CameraInfo extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public CameraInfo(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public CameraInfo(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public CameraInfo position(long position) { - return (CameraInfo)super.position(position); - } - - /** Device serial number. */ - public native @Cast("unsigned int") int serialNumber(); public native CameraInfo serialNumber(int serialNumber); - /** Interface type. */ - public native @Cast("FlyCapture2::InterfaceType") int interfaceType(); public native CameraInfo interfaceType(int interfaceType); - /** Driver type. */ - public native @Cast("FlyCapture2::DriverType") int driverType(); public native CameraInfo driverType(int driverType); - /** Flag indicating if this is a color camera. */ - public native @Cast("bool") boolean isColorCamera(); public native CameraInfo isColorCamera(boolean isColorCamera); - /** Device model name. */ - public native @Cast("char") byte modelName(int i); public native CameraInfo modelName(int i, byte modelName); - @MemberGetter public native @Cast("char*") BytePointer modelName(); - /** Device vendor name. */ - public native @Cast("char") byte vendorName(int i); public native CameraInfo vendorName(int i, byte vendorName); - @MemberGetter public native @Cast("char*") BytePointer vendorName(); - /** String detailing the sensor information. */ - public native @Cast("char") byte sensorInfo(int i); public native CameraInfo sensorInfo(int i, byte sensorInfo); - @MemberGetter public native @Cast("char*") BytePointer sensorInfo(); - /** String providing the sensor resolution. */ - public native @Cast("char") byte sensorResolution(int i); public native CameraInfo sensorResolution(int i, byte sensorResolution); - @MemberGetter public native @Cast("char*") BytePointer sensorResolution(); - /** Driver name of driver being used. */ - public native @Cast("char") byte driverName(int i); public native CameraInfo driverName(int i, byte driverName); - @MemberGetter public native @Cast("char*") BytePointer driverName(); - /** Firmware version of camera. */ - public native @Cast("char") byte firmwareVersion(int i); public native CameraInfo firmwareVersion(int i, byte firmwareVersion); - @MemberGetter public native @Cast("char*") BytePointer firmwareVersion(); - /** Firmware build time. */ - public native @Cast("char") byte firmwareBuildTime(int i); public native CameraInfo firmwareBuildTime(int i, byte firmwareBuildTime); - @MemberGetter public native @Cast("char*") BytePointer firmwareBuildTime(); - /** Maximum bus speed. */ - public native @Cast("FlyCapture2::BusSpeed") int maximumBusSpeed(); public native CameraInfo maximumBusSpeed(int maximumBusSpeed); - /** Bayer tile format. */ - public native @Cast("FlyCapture2::BayerTileFormat") int bayerTileFormat(); public native CameraInfo bayerTileFormat(int bayerTileFormat); - /** Bus number, set to 0 for GigE and USB cameras **/ - public native @Cast("unsigned short") short busNumber(); public native CameraInfo busNumber(short busNumber); - /** ieee1394 Node number, set to 0 for GigE and USB cameras **/ - public native @Cast("unsigned short") short nodeNumber(); public native CameraInfo nodeNumber(short nodeNumber); - /** PCIe Bus Speed, set to PCIE_BUSSPEED_UNKNOWN for unsupported drivers **/ - public native @Cast("FlyCapture2::PCIeBusSpeed") int pcieBusSpeed(); public native CameraInfo pcieBusSpeed(int pcieBusSpeed); - - /** \name IIDC specific information */ - /*@{*/ - - /** DCAM version. */ - public native @Cast("unsigned int") int iidcVer(); public native CameraInfo iidcVer(int iidcVer); - /** Configuration ROM data. */ - public native @ByRef ConfigROM configROM(); public native CameraInfo configROM(ConfigROM configROM); - - /*@}*/ - - /** \name GigE specific information */ - /*@{*/ - - /** GigE Vision version. */ - public native @Cast("unsigned int") int gigEMajorVersion(); public native CameraInfo gigEMajorVersion(int gigEMajorVersion); - /** GigE Vision minor version. */ - public native @Cast("unsigned int") int gigEMinorVersion(); public native CameraInfo gigEMinorVersion(int gigEMinorVersion); - /** User defined name. */ - public native @Cast("char") byte userDefinedName(int i); public native CameraInfo userDefinedName(int i, byte userDefinedName); - @MemberGetter public native @Cast("char*") BytePointer userDefinedName(); - /** XML URL 1. */ - public native @Cast("char") byte xmlURL1(int i); public native CameraInfo xmlURL1(int i, byte xmlURL1); - @MemberGetter public native @Cast("char*") BytePointer xmlURL1(); - /** XML URL 2. */ - public native @Cast("char") byte xmlURL2(int i); public native CameraInfo xmlURL2(int i, byte xmlURL2); - @MemberGetter public native @Cast("char*") BytePointer xmlURL2(); - /** MAC address */ - public native @ByRef MACAddress macAddress(); public native CameraInfo macAddress(MACAddress macAddress); - /** IP address. */ - public native @ByRef IPAddress ipAddress(); public native CameraInfo ipAddress(IPAddress ipAddress); - /** Subnet mask. */ - public native @ByRef IPAddress subnetMask(); public native CameraInfo subnetMask(IPAddress subnetMask); - /** Default gateway. */ - public native @ByRef IPAddress defaultGateway(); public native CameraInfo defaultGateway(IPAddress defaultGateway); - /** Status/Content of CCP register */ - public native @Cast("unsigned int") int ccpStatus(); public native CameraInfo ccpStatus(int ccpStatus); - /** Local Application IP Address. */ - public native @Cast("unsigned int") int applicationIPAddress(); public native CameraInfo applicationIPAddress(int applicationIPAddress); - /** Local Application port. */ - public native @Cast("unsigned int") int applicationPort(); public native CameraInfo applicationPort(int applicationPort); - /*@}*/ - - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native CameraInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public CameraInfo() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Properties of a single embedded image info property. */ - @Namespace("FlyCapture2") @NoOffset public static class EmbeddedImageInfoProperty extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public EmbeddedImageInfoProperty(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public EmbeddedImageInfoProperty(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public EmbeddedImageInfoProperty position(long position) { - return (EmbeddedImageInfoProperty)super.position(position); - } - - /** Whether this property is available. */ - public native @Cast("bool") boolean available(); public native EmbeddedImageInfoProperty available(boolean available); - /** Whether this property is on or off. */ - public native @Cast("bool") boolean onOff(); public native EmbeddedImageInfoProperty onOff(boolean onOff); - - public EmbeddedImageInfoProperty() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Properties of the possible embedded image information. */ - @Namespace("FlyCapture2") public static class EmbeddedImageInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public EmbeddedImageInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public EmbeddedImageInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public EmbeddedImageInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public EmbeddedImageInfo position(long position) { - return (EmbeddedImageInfo)super.position(position); - } - - public native @ByRef EmbeddedImageInfoProperty timestamp(); public native EmbeddedImageInfo timestamp(EmbeddedImageInfoProperty timestamp); - public native @ByRef EmbeddedImageInfoProperty gain(); public native EmbeddedImageInfo gain(EmbeddedImageInfoProperty gain); - public native @ByRef EmbeddedImageInfoProperty shutter(); public native EmbeddedImageInfo shutter(EmbeddedImageInfoProperty shutter); - public native @ByRef EmbeddedImageInfoProperty brightness(); public native EmbeddedImageInfo brightness(EmbeddedImageInfoProperty brightness); - public native @ByRef EmbeddedImageInfoProperty exposure(); public native EmbeddedImageInfo exposure(EmbeddedImageInfoProperty exposure); - public native @ByRef EmbeddedImageInfoProperty whiteBalance(); public native EmbeddedImageInfo whiteBalance(EmbeddedImageInfoProperty whiteBalance); - public native @ByRef EmbeddedImageInfoProperty frameCounter(); public native EmbeddedImageInfo frameCounter(EmbeddedImageInfoProperty frameCounter); - public native @ByRef EmbeddedImageInfoProperty strobePattern(); public native EmbeddedImageInfo strobePattern(EmbeddedImageInfoProperty strobePattern); - public native @ByRef EmbeddedImageInfoProperty GPIOPinState(); public native EmbeddedImageInfo GPIOPinState(EmbeddedImageInfoProperty GPIOPinState); - public native @ByRef EmbeddedImageInfoProperty ROIPosition(); public native EmbeddedImageInfo ROIPosition(EmbeddedImageInfoProperty ROIPosition); - } - - /** Metadata related to an image. */ - @Namespace("FlyCapture2") @NoOffset public static class ImageMetadata extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public ImageMetadata(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public ImageMetadata(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public ImageMetadata position(long position) { - return (ImageMetadata)super.position(position); - } - - /** Embedded timestamp. */ - public native @Cast("unsigned int") int embeddedTimeStamp(); public native ImageMetadata embeddedTimeStamp(int embeddedTimeStamp); - /** Embedded gain. */ - public native @Cast("unsigned int") int embeddedGain(); public native ImageMetadata embeddedGain(int embeddedGain); - /** Embedded shutter. */ - public native @Cast("unsigned int") int embeddedShutter(); public native ImageMetadata embeddedShutter(int embeddedShutter); - /** Embedded brightness. */ - public native @Cast("unsigned int") int embeddedBrightness(); public native ImageMetadata embeddedBrightness(int embeddedBrightness); - /** Embedded exposure. */ - public native @Cast("unsigned int") int embeddedExposure(); public native ImageMetadata embeddedExposure(int embeddedExposure); - /** Embedded white balance. */ - public native @Cast("unsigned int") int embeddedWhiteBalance(); public native ImageMetadata embeddedWhiteBalance(int embeddedWhiteBalance); - /** Embedded frame counter. */ - public native @Cast("unsigned int") int embeddedFrameCounter(); public native ImageMetadata embeddedFrameCounter(int embeddedFrameCounter); - /** Embedded strobe pattern. */ - public native @Cast("unsigned int") int embeddedStrobePattern(); public native ImageMetadata embeddedStrobePattern(int embeddedStrobePattern); - /** Embedded GPIO pin state. */ - public native @Cast("unsigned int") int embeddedGPIOPinState(); public native ImageMetadata embeddedGPIOPinState(int embeddedGPIOPinState); - /** Embedded ROI position. */ - public native @Cast("unsigned int") int embeddedROIPosition(); public native ImageMetadata embeddedROIPosition(int embeddedROIPosition); - - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native ImageMetadata reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public ImageMetadata() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Information about the camera's look up table. */ - @Namespace("FlyCapture2") @NoOffset public static class LUTData extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public LUTData(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public LUTData(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public LUTData position(long position) { - return (LUTData)super.position(position); - } - - /** Flag indicating if LUT is supported. */ - public native @Cast("bool") boolean supported(); public native LUTData supported(boolean supported); - /** Flag indicating if LUT is enabled. */ - public native @Cast("bool") boolean enabled(); public native LUTData enabled(boolean enabled); - /** The number of LUT banks available (Always 1 for PGR LUT). */ - public native @Cast("unsigned int") int numBanks(); public native LUTData numBanks(int numBanks); - /** The number of LUT channels per bank available. */ - public native @Cast("unsigned int") int numChannels(); public native LUTData numChannels(int numChannels); - /** The input bit depth of the LUT. */ - public native @Cast("unsigned int") int inputBitDepth(); public native LUTData inputBitDepth(int inputBitDepth); - /** The output bit depth of the LUT. */ - public native @Cast("unsigned int") int outputBitDepth(); public native LUTData outputBitDepth(int outputBitDepth); - /** The number of entries in the LUT. */ - public native @Cast("unsigned int") int numEntries(); public native LUTData numEntries(int numEntries); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native LUTData reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public LUTData() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Camera diagnostic information. */ - @Namespace("FlyCapture2") @NoOffset public static class CameraStats extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public CameraStats(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public CameraStats(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public CameraStats position(long position) { - return (CameraStats)super.position(position); - } - - /* Number of dropped images in DROP_IMAGE mode */ - public native @Cast("unsigned int") int imageDropped(); public native CameraStats imageDropped(int imageDropped); - /* Number of corrupt images, such as missing packet, zero packet */ - public native @Cast("unsigned int") int imageCorrupt(); public native CameraStats imageCorrupt(int imageCorrupt); - /* Number of transmissions failed of camera */ - public native @Cast("unsigned int") int imageXmitFailed(); public native CameraStats imageXmitFailed(int imageXmitFailed); - /* Number of images dropped in driver */ - public native @Cast("unsigned int") int imageDriverDropped(); public native CameraStats imageDriverDropped(int imageDriverDropped); - /* Errors of register reading */ - public native @Cast("unsigned int") int regReadFailed(); public native CameraStats regReadFailed(int regReadFailed); - /* Errors of register writing */ - public native @Cast("unsigned int") int regWriteFailed(); public native CameraStats regWriteFailed(int regWriteFailed); - /* Port errors */ - public native @Cast("unsigned int") int portErrors(); public native CameraStats portErrors(int portErrors); - /* The value of the camera power register. - * false: Camera is powered down. - * true: Camera is powered up. - */ - public native @Cast("bool") boolean cameraPowerUp(); public native CameraStats cameraPowerUp(boolean cameraPowerUp); - - /* The voltage values of the various voltage registers - * supported by the camera. - */ - public native float cameraVoltages(int i); public native CameraStats cameraVoltages(int i, float cameraVoltages); - @MemberGetter public native FloatPointer cameraVoltages(); - /** The number of voltage registers available. - * 0: the values in cameraVoltages[] are invalid. - */ - public native @Cast("unsigned int") int numVoltages(); public native CameraStats numVoltages(int numVoltages); - - /* The current values of the various current registers - * supported by the camera. - */ - public native float cameraCurrents(int i); public native CameraStats cameraCurrents(int i, float cameraCurrents); - @MemberGetter public native FloatPointer cameraCurrents(); - /** The number of current registers available. - * 0: the values in cameraCurrents[] are invalid. - */ - public native @Cast("unsigned int") int numCurrents(); public native CameraStats numCurrents(int numCurrents); - /* The temperature of the camera board-level components. The value is - * in kelvins (0�C = 273.15K) and are in one-tenths (0.1) of a kelvin. - */ - public native @Cast("unsigned int") int temperature(); public native CameraStats temperature(int temperature); - /* Time in seconds since the camera was initialized. */ - public native @Cast("unsigned int") int timeSinceInitialization(); public native CameraStats timeSinceInitialization(int timeSinceInitialization); - /* Time in seconds since the camera detected a bus reset. */ - public native @Cast("unsigned int") int timeSinceBusReset(); public native CameraStats timeSinceBusReset(int timeSinceBusReset); - /* Time stamp */ - public native @ByRef TimeStamp timeStamp(); public native CameraStats timeStamp(TimeStamp timeStamp); - /* Number of packets requested for resend */ - public native @Cast("unsigned int") int numResendPacketsRequested(); public native CameraStats numResendPacketsRequested(int numResendPacketsRequested); - /* Number of packet-resend packets received */ - public native @Cast("unsigned int") int numResendPacketsReceived(); public native CameraStats numResendPacketsReceived(int numResendPacketsReceived); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native CameraStats reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public CameraStats() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - - /** - * \defgroup ImageSaveStructures Image saving structures. - * - * These structures define various parameters used for saving images. - */ - - /*@{*/ - - /** Options for saving PNG images. */ - @Namespace("FlyCapture2") @NoOffset public static class PNGOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public PNGOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public PNGOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public PNGOption position(long position) { - return (PNGOption)super.position(position); - } - - /** Whether to save the PNG as interlaced. */ - public native @Cast("bool") boolean interlaced(); public native PNGOption interlaced(boolean interlaced); - /** Compression level (0-9). 0 is no compression, 9 is best compression. */ - public native @Cast("unsigned int") int compressionLevel(); public native PNGOption compressionLevel(int compressionLevel); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native PNGOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public PNGOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving PPM images. */ - @Namespace("FlyCapture2") @NoOffset public static class PPMOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public PPMOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public PPMOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public PPMOption position(long position) { - return (PPMOption)super.position(position); - } - - /** Whether to save the PPM as a binary file. */ - public native @Cast("bool") boolean binaryFile(); public native PPMOption binaryFile(boolean binaryFile); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native PPMOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public PPMOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving PGM images. */ - @Namespace("FlyCapture2") @NoOffset public static class PGMOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public PGMOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public PGMOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public PGMOption position(long position) { - return (PGMOption)super.position(position); - } - - /** Whether to save the PPM as a binary file. */ - public native @Cast("bool") boolean binaryFile(); public native PGMOption binaryFile(boolean binaryFile); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native PGMOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public PGMOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving TIFF images. */ - @Namespace("FlyCapture2") @NoOffset public static class TIFFOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public TIFFOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public TIFFOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public TIFFOption position(long position) { - return (TIFFOption)super.position(position); - } - - /** enum FlyCapture2::TIFFOption::CompressionMethod */ - public static final int - /** Save without any compression. */ - NONE = 1, - /** Save using PACKBITS compression. */ - PACKBITS = 2, - /** Save using DEFLATE compression (ZLIB compression). */ - DEFLATE = 3, - /** Save using ADOBE DEFLATE compression */ - ADOBE_DEFLATE = 4, - /** - * Save using CCITT Group 3 fax encoding. This is only valid for - * 1-bit images only. Default to LZW for other bit depths. - */ - CCITTFAX3 = 5, - /** - * Save using CCITT Group 4 fax encoding. This is only valid for - * 1-bit images only. Default to LZW for other bit depths. - */ - CCITTFAX4 = 6, - /** Save using LZW compression. */ - LZW = 7, - /** - * Save using JPEG compression. This is only valid for 8-bit - * greyscale and 24-bit only. Default to LZW for other bit depths. - */ - JPEG = 8; - - /** Compression method to use for encoding TIFF images. */ - public native @Cast("FlyCapture2::TIFFOption::CompressionMethod") int compression(); public native TIFFOption compression(int compression); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native TIFFOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public TIFFOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving JPEG image. */ - @Namespace("FlyCapture2") @NoOffset public static class JPEGOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public JPEGOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public JPEGOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public JPEGOption position(long position) { - return (JPEGOption)super.position(position); - } - - /** Whether to save as a progressive JPEG file. */ - public native @Cast("bool") boolean progressive(); public native JPEGOption progressive(boolean progressive); - /** - * JPEG image quality in range (0-100). - * - 100 - Superb quality. - * - 75 - Good quality. - * - 50 - Normal quality. - * - 10 - Poor quality. - */ - public native @Cast("unsigned int") int quality(); public native JPEGOption quality(int quality); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native JPEGOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public JPEGOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving JPEG2000 image. */ - @Namespace("FlyCapture2") @NoOffset public static class JPG2Option extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public JPG2Option(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public JPG2Option(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public JPG2Option position(long position) { - return (JPG2Option)super.position(position); - } - - /** JPEG saving quality in range (1-512). */ - public native @Cast("unsigned int") int quality(); public native JPG2Option quality(int quality); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native JPG2Option reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public JPG2Option() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving Bitmap image. */ - @Namespace("FlyCapture2") @NoOffset public static class BMPOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public BMPOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public BMPOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public BMPOption position(long position) { - return (BMPOption)super.position(position); - } - - public native @Cast("bool") boolean indexedColor_8bit(); public native BMPOption indexedColor_8bit(boolean indexedColor_8bit); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native BMPOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public BMPOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving MJPG files. */ - @Namespace("FlyCapture2") @NoOffset public static class MJPGOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public MJPGOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public MJPGOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public MJPGOption position(long position) { - return (MJPGOption)super.position(position); - } - - /** Frame rate of the stream */ - public native float frameRate(); public native MJPGOption frameRate(float frameRate); - - /** Image quality (1-100) */ - public native @Cast("unsigned int") int quality(); public native MJPGOption quality(int quality); - - public native @Cast("unsigned int") int reserved(int i); public native MJPGOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public MJPGOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving H264 files. */ - @Namespace("FlyCapture2") @NoOffset public static class H264Option extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public H264Option(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public H264Option(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public H264Option position(long position) { - return (H264Option)super.position(position); - } - - /** Frame rate of the stream */ - public native float frameRate(); public native H264Option frameRate(float frameRate); - - /** Width of source image */ - public native @Cast("unsigned int") int width(); public native H264Option width(int width); - - /** Height of source image */ - public native @Cast("unsigned int") int height(); public native H264Option height(int height); - - /** Bitrate to encode at */ - public native @Cast("unsigned int") int bitrate(); public native H264Option bitrate(int bitrate); - - /** Reserved for future use */ - public native @Cast("unsigned int") int reserved(int i); public native H264Option reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public H264Option() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /** Options for saving AVI files. */ - @Namespace("FlyCapture2") @NoOffset public static class AVIOption extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVIOption(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public AVIOption(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public AVIOption position(long position) { - return (AVIOption)super.position(position); - } - - /** Frame rate of the stream */ - public native float frameRate(); public native AVIOption frameRate(float frameRate); - - /** Reserved for future use */ - public native @Cast("unsigned int") int reserved(int i); public native AVIOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - public AVIOption() { super((Pointer)null); allocate(); } - private native void allocate(); - } - - /* Callback function typedef: a function accepting pointer-to-void input as its sole - * argument, and returns void (ie: nothing). - */ - public static class CameraEventCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public CameraEventCallback(Pointer p) { super(p); } - protected CameraEventCallback() { allocate(); } - private native void allocate(); - public native void call(Pointer data); - } - - /** Options for enabling device event registration. */ - @Namespace("FlyCapture2") public static class EventOptions extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public EventOptions() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public EventOptions(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public EventOptions(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public EventOptions position(long position) { - return (EventOptions)super.position(position); - } - - /** Callback function pointer */ - public native CameraEventCallback EventCallbackFcn(); public native EventOptions EventCallbackFcn(CameraEventCallback EventCallbackFcn); - - /** Event name to register */ - @MemberGetter public native @Cast("const char*") BytePointer EventName(); - - /** Pointer to callback data to be passed to the callback function */ - @MemberGetter public native @Const Pointer EventUserData(); - - /** Size of the underlying struct passed as eventCallbackData for sanity checks */ - public native @Cast("size_t") long EventUserDataSize(); public native EventOptions EventUserDataSize(long EventUserDataSize); - } - - - /* Callback data passed to the callback function provided when using - * RegisterEvent() or RegisterAllEvents(). - */ - @Namespace("FlyCapture2") public static class EventCallbackData extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public EventCallbackData() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public EventCallbackData(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public EventCallbackData(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public EventCallbackData position(long position) { - return (EventCallbackData)super.position(position); - } - - /** Pointer to the user-supplied data struct */ - public native Pointer EventUserData(); public native EventCallbackData EventUserData(Pointer EventUserData); - - /** Size of the user data data supplied to the RegisterEvent() - * function. - */ - public native @Cast("size_t") long EventUserDataSize(); public native EventCallbackData EventUserDataSize(long EventUserDataSize); - - /** The event name used to register the event. Provided so the user - * knows which event triggered the callback. - */ - @MemberGetter public native @Cast("const char*") BytePointer EventName(); - - /** The device register which EventName maps to. Provides an alternate - * means of indexing into different event types. - */ - public native @Cast("long long unsigned") long EventID(); public native EventCallbackData EventID(long EventID); - - /** Timestamp indicated the time (as reported by the camera) at which - * the camera exposure operation completed. This can be compared with - * image stimestamps if there is a need to map event timestamps to - * specific images, if applicable. - */ - public native @Cast("long long unsigned") long EventTimestamp(); public native EventCallbackData EventTimestamp(long EventTimestamp); - - /** A pointer to additional data pertaining to the event which just - * trigger the callback function. The data may be of difference sizes - * or may not even be allocated, depending on the type of event which - * triggered the callback. - */ - public native Pointer EventData(); public native EventCallbackData EventData(Pointer EventData); - - /** The size of the structure pointed to by EventData. This value should - * be checked, especially if there are events which can trigger variable- - * length event data to be returned to the user when the callback function - * is issued. - */ - public native @Cast("size_t") long EventDataSize(); public native EventCallbackData EventDataSize(long EventDataSize); - } - /*@}*/ - - /*@}*/ - - - -// #endif // PGR_FC2_FLYCAPTURE2DEFS_H - - - -// Parsed from - -//============================================================================= -// 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: Error.h 316355 2017-02-20 23:02:28Z alin $ -//============================================================================= - -// #ifndef PGR_FC2_ERROR_H -// #define PGR_FC2_ERROR_H - -// #include "FlyCapture2Platform.h" -// #include "FlyCapture2Defs.h" -// #include - @Namespace("FlyCapture2") @Opaque public static class ErrorImpl extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public ErrorImpl() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public ErrorImpl(Pointer p) { super(p); } - } - - /** - * The Error object represents an error that is returned from the library. - * Overloaded operators allow comparisons against other Error objects or - * the ErrorType enumeration. - */ - @Namespace("FlyCapture2") @NoOffset public static class Error extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Error(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public Error(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public Error position(long position) { - return (Error)super.position(position); - } - - - /** - * Default constructor. - */ - public Error() { super((Pointer)null); allocate(); } - private native void allocate(); - - /** - * Copy constructor. - */ - public Error( @Const @ByRef Error error ) { super((Pointer)null); allocate(error); } - private native void allocate( @Const @ByRef Error error ); - - /** - * Default destructor. - */ - - /** - * Assignment operator. - */ - public native @ByRef @Name("operator =") Error put( @Const @ByRef Error error ); - - /** - * Equality operator. - */ - public native @Cast("bool") @Name("operator ==") boolean equals( @Const @ByRef Error error ); - - /** - * Equality operator. This overloaded operator compares the - * ErrorType of the Error against the specified ErrorType. - */ - public native @Cast("bool") @Name("operator ==") boolean equals( @Cast("const FlyCapture2::ErrorType") int errorType ); - - /** - * Inequality operator. - */ - public native @Cast("bool") @Name("operator !=") boolean notEquals( @Const @ByRef Error error ); - - /** - * Inequality operator. This overloaded operator compares the - * ErrorType of the Error against the specified ErrorType. - */ - public native @Cast("bool") @Name("operator !=") boolean notEquals( @Cast("const FlyCapture2::ErrorType") int errorType ); - - /** - * Retrieve the ErrorType of the error. - * - * @return The ErrorType of the error. - */ - public native @Cast("FlyCapture2::ErrorType") int GetType(); - - /** - * Retrieve the top level description of the error that occurred. - * - * @return A string with the error description. - */ - public native @Cast("const char*") BytePointer GetDescription(); - - /** - * Retrieve the line number where the error originated. - * - * @return The line number. - */ - public native @Cast("unsigned int") int GetLine(); - - /** - * Retrieve the source filename where the error originated. - * - * @return A string with the file name. - */ - public native @Cast("const char*") BytePointer GetFilename(); - - /** - * Get the error which caused this error. - * - * @return An error object representing the cause of this error. - */ - public native @ByVal Error GetCause(); - - /** - * Retrieve the build date of the file where the error originated. - * - * @return A string with the build date and time. - */ - public native @Cast("const char*") BytePointer GetBuildDate(); - - /** - * Retrieve the support information. - * It is not implemented in this release. - * - * @return A string containing support information. - */ - public native @Cast("const char*") BytePointer CollectSupportInformation(); - - /** - * Print a formatted log trace to stderr. - */ - public native void PrintErrorTrace(); - } - - -// #endif // PGR_FC2_ERROR_H - - -// Parsed from - -//============================================================================= -// 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: BusManager.h 317385 2017-02-28 18:28:29Z corinal $ -//============================================================================= - -// #ifndef PGR_FC2_BUSMANAGER_H -// #define PGR_FC2_BUSMANAGER_H - -// #include "FlyCapture2Platform.h" -// #include "FlyCapture2Defs.h" - - /** - * Bus event callback function prototype. Defines the syntax of the - * callback function that is passed into RegisterCallback() and - * UnregisterCallback(). It is recommended that minimal handling be - * performed in this callback as it will block internal processing - * of bus events until it returns. - */ - public static class BusEventCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public BusEventCallback(Pointer p) { super(p); } - protected BusEventCallback() { allocate(); } - private native void allocate(); - public native void call( Pointer pParameter, @Cast("unsigned int") int serialNumber ); - } - - /** - * Handle that is returned when registering a callback. It is required - * when unregistering the callback. - */ - @Namespace @Name("void") @Opaque public static class CallbackHandle extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public CallbackHandle() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public CallbackHandle(Pointer p) { super(p); } - } - - /** - * The BusManager class provides the functionality for the user to get an - * PGRGuid for a desired camera or device easily. Once the - * camera or device token is found, it can then be used to connect to the - * camera or device through the camera class or device class. In addition, - * the BusManager class provides the ability to be notified when a camera - * or device is added or removed or some event occurs on the PC. - */ - @Namespace("FlyCapture2") @NoOffset public static class BusManager extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public BusManager(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public BusManager(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public BusManager position(long position) { - return (BusManager)super.position(position); - } - - - /** - * Default constructor. - */ - public BusManager() { super((Pointer)null); allocate(); } - private native void allocate(); - - /** - * Default destructor. - */ - - /** - * 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 pGuid PGRGuid of the camera or the device to cause bus reset. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error FireBusReset( PGRGuid pGuid); - - /** - * Gets the number of cameras attached to the PC. - * - * @param pNumCameras The number of cameras attached. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetNumOfCameras( @Cast("unsigned int*") IntPointer pNumCameras ); - public native @ByVal Error GetNumOfCameras( @Cast("unsigned int*") IntBuffer pNumCameras ); - public native @ByVal Error GetNumOfCameras( @Cast("unsigned int*") int[] pNumCameras ); - - /** - * Gets the PGRGuid for a camera with the specified IPv4 address. - * - * @param ipAddress IP address to get GUID for. - * @param pGuid Unique PGRGuid for the camera. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetCameraFromIPAddress( - @ByVal IPAddress ipAddress, - PGRGuid 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 Camera::Connect() call. - * - * @param index Zero based index of camera. - * @param pGuid Unique PGRGuid for the camera. - * - * @see GetCameraFromSerialNumber() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetCameraFromIndex( - @Cast("unsigned int") int index, - PGRGuid 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 Camera::Connect() call. - * - * @param serialNumber Serial number of camera. - * @param pGuid Unique PGRGuid for the camera. - * - * @see GetCameraFromIndex() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetCameraFromSerialNumber( - @Cast("unsigned int") int serialNumber, - PGRGuid pGuid ); - - /** - * Gets the serial number of the camera with the specified index. - * - * @param index Zero based index of desired camera. - * @param pSerialNumber Serial number of camera. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetCameraSerialNumberFromIndex( - @Cast("unsigned int") int index, - @Cast("unsigned int*") IntPointer pSerialNumber ); - public native @ByVal Error GetCameraSerialNumberFromIndex( - @Cast("unsigned int") int index, - @Cast("unsigned int*") IntBuffer pSerialNumber ); - public native @ByVal Error GetCameraSerialNumberFromIndex( - @Cast("unsigned int") int index, - @Cast("unsigned int*") 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 pGuid The PGRGuid to get the interface for. - * @param pInterfaceType The interface type of the PGRGuid. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetInterfaceTypeFromGuid( - PGRGuid pGuid, - @Cast("FlyCapture2::InterfaceType*") IntPointer pInterfaceType ); - public native @ByVal Error GetInterfaceTypeFromGuid( - PGRGuid pGuid, - @Cast("FlyCapture2::InterfaceType*") IntBuffer pInterfaceType ); - public native @ByVal Error GetInterfaceTypeFromGuid( - PGRGuid pGuid, - @Cast("FlyCapture2::InterfaceType*") int[] pInterfaceType ); - - /** - * Gets the number of devices. This may include hubs, host controllers - * and other hardware devices (including cameras). - * - * @param pNumDevices The number of devices found. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetNumOfDevices( @Cast("unsigned int*") IntPointer pNumDevices ); - public native @ByVal Error GetNumOfDevices( @Cast("unsigned int*") IntBuffer pNumDevices ); - public native @ByVal Error GetNumOfDevices( @Cast("unsigned int*") int[] pNumDevices ); - - /** - * Gets the PGRGuid for a device. It uniquely identifies the device - * specified by the index. - * - * @param index Zero based index of device. - * @param pGuid Unique PGRGuid for the device. - * - * @see GetNumOfDevices() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetDeviceFromIndex( - @Cast("unsigned int") int index, - PGRGuid 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 guid PGRGuid of the device to read from. - * @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. - */ - public native @ByVal Error ReadPhyRegister( - @ByVal PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pValue ); - public native @ByVal Error ReadPhyRegister( - @ByVal PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pValue ); - public native @ByVal Error ReadPhyRegister( - @ByVal PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int*") 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 guid PGRGuid of the device to write to. - * @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. - */ - public native @ByVal Error WritePhyRegister( - @ByVal PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int") int value ); - - /** - * Read usb link info for the port that the specified device is connected to. - * - * @param guid PGRGuid of the device to read from. - * @param pValue Value read from the card register. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetUsbLinkInfo( - @ByVal PGRGuid guid, - @Cast("unsigned int*") IntPointer pValue ); - public native @ByVal Error GetUsbLinkInfo( - @ByVal PGRGuid guid, - @Cast("unsigned int*") IntBuffer pValue ); - public native @ByVal Error GetUsbLinkInfo( - @ByVal PGRGuid guid, - @Cast("unsigned int*") int[] pValue ); - - /** - * Read usb port status for the port that the specified device is connected to. - * - * @param guid PGRGuid of the device to read from. - * @param pValue Value read from the card register. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetUsbPortStatus( - @ByVal PGRGuid guid, - @Cast("unsigned int*") IntPointer pValue ); - public native @ByVal Error GetUsbPortStatus( - @ByVal PGRGuid guid, - @Cast("unsigned int*") IntBuffer pValue ); - public native @ByVal Error GetUsbPortStatus( - @ByVal PGRGuid guid, - @Cast("unsigned int*") int[] pValue ); - - /** - * Gets the topology information for the PC. - * - * @param pNode TopologyNode object that will contain the topology - * information. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetTopology( - TopologyNode pNode ); - - /** - * Register a callback function that will be called when the - * specified callback event occurs. - * - * @param busEventCallback 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. - * - * @see UnregisterCallback() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error RegisterCallback( - BusEventCallback busEventCallback, - @Cast("FlyCapture2::BusCallbackType") int callbackType, - Pointer pParameter, - @ByPtrPtr CallbackHandle pCallbackHandle ); - - /** - * Unregister a callback function. - * - * @param callbackHandle Unique callback handle. - * - * @see RegisterCallback() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error UnregisterCallback( CallbackHandle 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. - */ - public native @ByVal Error RescanBus(); - - /** - * Force the camera with the specific MAC address to the specified - * IP address, subnet mask and default gateway. This is useful in - * situations where GigE Vision cameras are using IP addresses - * in a subnet different from the host's subnet. - * - * @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. - */ - public static native @ByVal Error ForceIPAddressToCamera( - @ByVal MACAddress macAddress, - @ByVal IPAddress ipAddress, - @ByVal IPAddress subnetMask, - @ByVal IPAddress defaultGateway ); - - /** - * Force all cameras on the network to be assigned sequential IP addresses - * on the same subnet as the netowrk 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. - */ - public static native @ByVal Error ForceAllIPAddressesAutomatically(); - - /** - * Force a camera on the network to be assigned an IP address - * on the same subnet as the netowrk 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. - */ - public static native @ByVal Error ForceAllIPAddressesAutomatically(@Cast("unsigned int") int serialNumber); - - /** - * Discover all cameras connected to the network even if they reside - * on a different subnet. This is useful in situations where GigE Vision - * cameras are using IP addresses in a subnet different from the host's - * subnet. After discovering the camera, it is easy to use - * ForceIPAddressToCamera() to set a different IP configuration. - * - * @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. - */ - public static native @ByVal Error DiscoverGigECameras( - CameraInfo gigECameras, - @Cast("unsigned int*") IntPointer arraySize ); - public static native @ByVal Error DiscoverGigECameras( - CameraInfo gigECameras, - @Cast("unsigned int*") IntBuffer arraySize ); - public static native @ByVal Error DiscoverGigECameras( - CameraInfo gigECameras, - @Cast("unsigned int*") int[] arraySize ); - - /** - * Query CCP status on camera with corresponding PGRGuid. This is - * useful to determine if a GigE camera can be controlled. - * - * @param pGuid PGRGuid of the camera - * @param pControlable Indicates whether camera is controllable - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error IsCameraControlable( - PGRGuid pGuid, @Cast("bool*") BoolPointer pControlable ); - public native @ByVal Error IsCameraControlable( - PGRGuid pGuid, @Cast("bool*") boolean[] pControlable ); - } - - -// #endif //PGR_FC2_BUSMANAGER_H - - -// Parsed from - -//============================================================================= -// 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: CameraBase.h 316355 2017-02-20 23:02:28Z alin $ -//============================================================================= - -// #ifndef PGR_FC2_CAMERABASE_H_ -// #define PGR_FC2_CAMERABASE_H_ - -// #include "FlyCapture2Platform.h" -// #include "FlyCapture2Defs.h" - - /** - * Image event callback function prototype. Defines the syntax of the - * image callback function that is passed into StartCapture(). It is - * possible for this function to be called simultaneously. Therefore, - * users must make sure that code in the callback is thread safe. - */ - public static class ImageEventCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public ImageEventCallback(Pointer p) { super(p); } - protected ImageEventCallback() { allocate(); } - private native void allocate(); - public native void call( Image pImage, @Const Pointer pCallbackData ); - } - - /** - * The CameraBase class is an abstract base class that defines a general - * interface to a camera. - * - * \nosubgrouping - */ - @Namespace("FlyCapture2") @NoOffset public static class CameraBase extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public CameraBase(Pointer p) { super(p); } - - - /** - * Default constructor. - */ - - /** - * Default destructor. - */ - - /** - * \name Connection and Image Retrieval - * - * These functions deal with connections and image retrieval from - * the camera. - */ - /*@{*/ - - /** - * Connects the camera object to the camera specified by the GUID. - * If the guid is omitted or set to NULL, the connection will be made - * to the first camera detected on the PC (i.e. index = 0). - * - * @param pGuid The unique identifier for a specific camera on the PC. - * - * @see BusManager::GetCameraFromIndex() - * @see BusManager::GetCameraFromSerialNumber() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error Connect( PGRGuid pGuid/*=NULL*/ ); - public native @ByVal Error Connect( ); - - /** - * Disconnects the camera object from the camera. This allows another - * physical camera specified by a GUID to be connected to the camera - * object. - * - * @see Connect() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error Disconnect(); - - /** - * Checks if the camera object is connected to a physical camera - * specified by a GUID. - * - * @see Connect() - * @see Disconnect() - * - * @return Whether Connect() was called on the camera object. - */ - public native @Cast("bool") boolean IsConnected(); - - /** - * Sets the callback data to be used on completion of image transfer. - * To clear the current stored callback data, pass in NULL for both - * arguments. - * - * @param callbackFn 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. - * - * @see StartCapture() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetCallback( - ImageEventCallback callbackFn, - @Const Pointer pCallbackData/*=NULL*/ ); - public native @ByVal Error SetCallback( - ImageEventCallback callbackFn ); - - /** - * Starts isochronous image capture. It will use either the current - * video mode or the most recently set video mode of the camera. - * The optional callback function parameter is called on completion of - * image transfer. - * When a callback function is specified, the grab mode will determine how - * images are delivered. - * If the grab mode has not been set, or has been set to DROP_FRAMES - * the default behavior is to requeue images for DMA if they have - * not been delivered by the time the next image transfer completes. - * If BUFFER_FRAMES is specified, the next image in the sequence will - * be delivered. Note that for the BUFFER_FRAMES case, if delivery - * does not keep up with the DMA process, images will be lost. - * The default behavior is to perform DROP_FRAMES image delivery - * Alternatively, the callback parameter can be set to NULL - * and RetrieveBuffer() can be called as a blocking call to get - * the image data. - * - * @param callbackFn 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. - * - * @see RetrieveBuffer() - * @see StartSyncCapture() - * @see StopCapture() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error StartCapture( - ImageEventCallback callbackFn/*=NULL*/, - @Const Pointer pCallbackData/*=NULL*/ ); - public native @ByVal Error StartCapture( ); - - /** - * Starts isochronous image capture on multiple cameras. On each frame, - * the time stamps across the cameras are aligned which means the frames - * are synchronized. Note that the cameras must be synchronized by - * external means in order for this function to work. This means that - * the cameras should either be on the same bus, hardware synchronized - * (e.g. through triggering) or Multisync is running. - * Note: The use of this function with GigE Cameras is not supported. - * - * @param numCameras Number of Camera objects in the ppCameras array. - * @param ppCameras Array of pointers to Camera objects containing the - * cameras to be started and synchronized. - * @param pCallbackFns Array of callback functions for each camera. - * @param pCallbackDataArray Array of callback data pointers. - * - * @see RetrieveBuffer() - * @see StartCapture() - * @see StopCapture() - * - * @return An Error indicating the success or failure of the function. - */ - - - /** - * Retrieves the the next image object containing the next image. - * If the grab mode has not been set, or has been set to DROP_FRAMES - * the default behavior is to requeue images for DMA if they have - * not been retrieved by the time the next image transfer completes. - * If BUFFER_FRAMES is specified, the next image in the sequence will - * be retrieved. Note that for the BUFFER_FRAMES case, if retrieval - * does not keep up with the DMA process, images will be lost. - * The default behavior is to perform DROP_FRAMES image retrieval. - * - * @param pImage Pointer to Image object to store image data. - * - * @see StartCapture() - * @see StopCapture() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error RetrieveBuffer( Image pImage ); - - /** - * Stops isochronous image transfer and cleans up all associated - * resources. - * If an image callback function (specified in the StartCapture() call) - * is currently executing, StopCapture() will not return until after - * the callback has completed. - * - * @see StartCapture() - * @see RetrieveBuffer() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error StopCapture(); - - /** - * Retrieves the next image event containing the next part of the image. - * - * @param pImage Pointer to Image object to store image data. - * @param eventNumber The event number to wait for. - * - * @see StartCapture() - * @see RetrieveBuffer() - * @see StopCapture() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error WaitForBufferEvent( Image pImage, @Cast("unsigned int") 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 - * - * @param pMemBuffers Pointer to memory buffers to be written to. - * @param size The size of each buffer (in bytes). - * @param numBuffers Number of buffers in the array. - * - * @see StartCapture() - * @see RetrieveBuffer() - * @see StopCapture() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetUserBuffers( - @Cast("unsigned char*const") BytePointer pMemBuffers, - int size, - int numBuffers ); - public native @ByVal Error SetUserBuffers( - @Cast("unsigned char*const") ByteBuffer pMemBuffers, - int size, - int numBuffers ); - public native @ByVal Error SetUserBuffers( - @Cast("unsigned char*const") byte[] pMemBuffers, - int size, - int numBuffers ); - - /** - * Get the configuration associated with the camera object. - * - * @param pConfig Pointer to the configuration structure to be filled. - * - * @see SetConfiguration() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetConfiguration( FC2Config pConfig ); - - /** - * Set the configuration associated with the camera object. - * - * @param pConfig Pointer to the configuration structure to be used. - * - * @see GetConfiguration() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetConfiguration( @Const FC2Config pConfig ); - - /*@}*/ - - /** - * \name Information and Properties - * - * 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 pCameraInfo Pointer to the camera information structure - * to be filled. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetCameraInfo( CameraInfo pCameraInfo ); - - /** - * Retrieves information about the specified camera property. The - * property type must be specified in the PropertyInfo structure - * passed into the function in order for the function to succeed. - * - * @param pPropInfo Pointer to the PropertyInfo structure to be filled. - * - * @see GetProperty() - * @see SetProperty() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetPropertyInfo( PropertyInfo pPropInfo ); - - /** - * Reads the settings for the specified property from the camera. The - * property type must be specified in the Property 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. - * - * @param pProp Pointer to the Property structure to be filled. - * - * @see GetPropertyInfo() - * @see SetProperty() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetProperty( Property pProp ); - - /** - * 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 GetPropertyInfo() to query which - * options are available for a specific property. - * - * @param pProp Pointer to the Property structure to be used. - * @param broadcast Whether the action should be broadcast. - * - * @see GetPropertyInfo() - * @see GetProperty() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetProperty( - @Const Property pProp, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetProperty( - @Const Property pProp ); - - /*@}*/ - - /** - * \name General Purpose Input / Output - * - * 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. - * - * @param pin Pin to get the direction for. - * @param pDirection Direction of the pin. 0 for input, 1 for output. - * - * @see SetGPIOPinDirection() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntPointer pDirection); - public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntBuffer pDirection); - public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") 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. - * - * @param pin Pin to get the direction for. - * @param direction Direction of the pin. 0 for input, 1 for output. - * @param broadcast Whether the action should be broadcast. - * - * @see GetGPIOPinDirection() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction, @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction ); - - /*@}*/ - - /** - * \name Trigger - * - * These functions deal with trigger control on the camera. - */ - /*@{*/ - - /** - * Retrieve trigger information from the camera. - * - * @param pTriggerModeInfo Structure to receive trigger information. - * - * @see GetTriggerMode() - * @see SetTriggerMode() - * @see GetTriggerDelayInfo() - * @see GetTriggerDelay() - * @see SetTriggerDelay() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetTriggerModeInfo( TriggerModeInfo pTriggerModeInfo ); - - /** - * Retrieve current trigger settings from the camera. - * - * @param pTriggerMode Structure to receive trigger mode settings. - * - * @see GetTriggerModeInfo() - * @see SetTriggerMode() - * @see GetTriggerDelayInfo() - * @see GetTriggerDelay() - * @see SetTriggerDelay() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetTriggerMode( TriggerMode pTriggerMode ); - - /** - * Set the specified trigger settings to the camera. - * - * @param pTriggerMode Structure providing trigger mode settings. - * @param broadcast Whether the action should be broadcast. - * - * @see GetTriggerModeInfo() - * @see GetTriggerMode() - * @see GetTriggerDelayInfo() - * @see GetTriggerDelay() - * @see SetTriggerDelay() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetTriggerMode( - @Const TriggerMode pTriggerMode, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetTriggerMode( - @Const TriggerMode pTriggerMode ); - - /** - * Fire the software trigger according to the DCAM specifications. - * - * @param broadcast Whether the action should be broadcast. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error FireSoftwareTrigger( @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error FireSoftwareTrigger( ); - - /** - * Retrieve trigger delay information from the camera. - * - * @param pTriggerDelayInfo Structure to receive trigger delay information. - * - * @see GetTriggerModeInfo() - * @see GetTriggerMode() - * @see SetTriggerMode() - * @see GetTriggerDelay() - * @see SetTriggerDelay() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetTriggerDelayInfo( @Cast("FlyCapture2::TriggerDelayInfo*") PropertyInfo pTriggerDelayInfo ); - - /** - * Retrieve current trigger delay settings from the camera. - * - * @param pTriggerDelay Structure to receive trigger delay settings. - * - * @see GetTriggerModeInfo() - * @see GetTriggerMode() - * @see SetTriggerMode() - * @see GetTriggerDelayInfo() - * @see SetTriggerDelay() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetTriggerDelay( @Cast("FlyCapture2::TriggerDelay*") Property pTriggerDelay ); - - /** - * Set the specified trigger delay settings to the camera. - * - * @param pTriggerDelay Structure providing trigger delay settings. - * @param broadcast Whether the action should be broadcast. - * - * @see GetTriggerModeInfo() - * @see GetTriggerMode() - * @see SetTriggerMode() - * @see GetTriggerDelayInfo() - * @see GetTriggerDelay() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetTriggerDelay( - @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetTriggerDelay( - @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay ); - - /*@}*/ - - /** - * \name Strobe - * - * These functions deal with strobe control on the camera. - */ - /*@{*/ - - /** - * Retrieve strobe information from the camera. - * - * @param pStrobeInfo Structure to receive strobe information. - * - * @see GetStrobe() - * @see SetStrobe() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetStrobeInfo( StrobeInfo pStrobeInfo ); - - /** - * Retrieve current strobe settings from the camera. The strobe pin - * must be specified in the structure before being passed in to - * the function. - * - * @param pStrobeControl Structure to receive strobe settings. - * - * @see GetStrobeInfo() - * @see SetStrobe() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetStrobe( StrobeControl pStrobeControl ); - - /** - * Set current strobe settings to the camera. The strobe pin - * must be specified in the structure before being passed in to - * the function. - * - * @param pStrobeControl Structure providing strobe settings. - * @param broadcast Whether the action should be broadcast. - * - * @see GetStrobeInfo() - * @see GetStrobe() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetStrobe( - @Const StrobeControl pStrobeControl, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetStrobe( - @Const StrobeControl pStrobeControl ); - - /*@}*/ - - /** - * \name Look Up Table - * - * These functions deal with Look Up Table control on the camera. - */ - /*@{*/ - - /** - * Query if LUT support is available on the camera. Note that some cameras - * may report support for the LUT and return an inputBitDepth of 0. In these - * cases use log2(numEntries) for the inputBitDepth. - * - * @param pData The LUT structure to be filled. - * - * @see EnableLUT() - * @see GetLUTChannel() - * @see SetLUTChannel() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetLUTInfo( LUTData pData ); - - /** - * Query the read/write status of a single LUT bank. - * - * @param bank The bank to query. - * @param pReadSupported Whether reading from the bank is supported. - * @param pWriteSupported Whether writing to the bank is supported. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetLUTBankInfo( - @Cast("unsigned int") int bank, - @Cast("bool*") BoolPointer pReadSupported, - @Cast("bool*") BoolPointer pWriteSupported ); - public native @ByVal Error GetLUTBankInfo( - @Cast("unsigned int") int bank, - @Cast("bool*") boolean[] pReadSupported, - @Cast("bool*") boolean[] pWriteSupported ); - - /** - * Get the LUT bank that is currently being used. For cameras with - * PGR LUT, the active bank is always 0. - * - * @param pActiveBank The currently active bank. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntPointer pActiveBank ); - public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntBuffer pActiveBank ); - public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") int[] pActiveBank ); - - /** - * Set the LUT bank that will be used. - * - * @param activeBank The bank to be set as active. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetActiveLUTBank( @Cast("unsigned int") int activeBank ); - - /** - * Enable or disable LUT functionality on the camera. - * - * @param on Whether to enable or disable LUT. - * - * @see GetLUTInfo() - * @see GetLUTChannel() - * @see SetLUTChannel() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error EnableLUT( @Cast("bool") boolean on ); - - /** - * Get the LUT channel settings from the camera. - * - * @param bank Bank to retrieve. - * @param channel Channel to retrieve. - * @param sizeEntries Number of entries in LUT table to read. - * @param pEntries Array to store LUT entries. - * - * @see GetLUTInfo() - * @see EnableLUT() - * @see SetLUTChannel() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntPointer pEntries ); - public native @ByVal Error GetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntBuffer pEntries ); - public native @ByVal Error GetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") int[] pEntries ); - - /** - * Set the LUT channel settings to the camera. - * - * @param bank Bank to set. - * @param channel Channel to set. - * @param sizeEntries Number of entries in LUT table to write. This must be the - * same size as numEntries returned by GetLutInfo(). - * @param pEntries Array containing LUT entries to write. - * - * @see GetLUTInfo() - * @see EnableLUT() - * @see GetLUTChannel() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("const unsigned int*") IntPointer pEntries ); - public native @ByVal Error SetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("const unsigned int*") IntBuffer pEntries ); - public native @ByVal Error SetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("const unsigned int*") int[] pEntries ); - - /*@}*/ - - /** - * \name Memory Channels - * - * These functions deal with memory channel control on the camera. - */ - /*@{*/ - - /** - * Retrieve the current memory channel from the camera. - * - * @param pCurrentChannel Current memory channel. - * - * @see SaveToMemoryChannel() - * @see RestoreFromMemoryChannel() - * @see GetMemoryChannelInfo() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntPointer pCurrentChannel ); - public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntBuffer pCurrentChannel ); - public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") int[] pCurrentChannel ); - - /** - * Save the current settings to the specfied current memory channel. - * - * @param channel Memory channel to save to. - * - * @see GetMemoryChannel() - * @see RestoreFromMemoryChannel() - * @see GetMemoryChannelInfo() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SaveToMemoryChannel( @Cast("unsigned int") int channel ); - - /** - * Restore the specfied current memory channel. - * - * @param channel Memory channel to restore from. - * - * @see GetMemoryChannel() - * @see SaveToMemoryChannel() - * @see GetMemoryChannelInfo() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error RestoreFromMemoryChannel( @Cast("unsigned int") int channel ); - - /** - * Query the camera for memory channel support. If the number of - * channels is 0, then memory channel support is not available. - * - * @param pNumChannels Number of memory channels supported. - * - * @see GetMemoryChannel() - * @see SaveToMemoryChannel() - * @see RestoreFromMemoryChannel() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntPointer pNumChannels ); - public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntBuffer pNumChannels ); - public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") int[] pNumChannels ); - - /*@}*/ - - /** - * \name Embedded Image Information - * - * These functions deal with embedded image information control - * on the camera. - */ - /*@{*/ - - /** - * Get the current status of the embedded image information register, - * as well as the availability of each embedded property. - * - * @param pInfo Structure to be filled. - * - * @see SetEmbeddedImageInfo() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); - - /** - * Sets the on/off values of the embedded image information structure - * to the camera. - * - * @param pInfo Structure to be used. - * - * @see GetEmbeddedImageInfo() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); - - /*@}*/ - - /** - * \name Register Operation - * - * These functions deal with register operation on the camera. - */ - /*@{*/ - - /** - * Write to the specified register on the camera. - * - * @param address DCAM address to be written to. - * @param value The value to be written. - * @param broadcast Whether the action should be broadcast. - * - * @see ReadRegister() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error WriteRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int") int value, - @Cast("bool") boolean broadcast/*=false*/); - public native @ByVal Error WriteRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int") int value); - - /** - * Read the specified register from the camera. - * - * @param address DCAM address to be read from. - * @param pValue The value that is read. - * - * @see WriteRegister() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error ReadRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pValue ); - public native @ByVal Error ReadRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pValue ); - public native @ByVal Error ReadRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int*") int[] pValue ); - - /** - * Write to the specified register block on the camera. - * - * @param addressHigh Top 16 bits of the 48 bit absolute address to - * write to. - * @param addressLow Bottom 32 bits of the 48 bits absolute address to - * write to. - * @param pBuffer Array containing data to be written. - * @param length Size of array, in quadlets. - * - * @see ReadRegisterBlock() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error WriteRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error WriteRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error WriteRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Read from the specified register block on the camera. - * - * @param addressHigh Top 16 bits of the 48 bit absolute address to - * read from. - * @param addressLow Bottom 32 bits of the 48 bits absolute address to - * read from. - * @param pBuffer Array to store read data. - * @param length Size of array, in quadlets. - * - * @see WriteRegisterBlock() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error ReadRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error ReadRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error ReadRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Returns a text representation of the register value. - * - * @param registerVal The register value to query. - * - * @return The text representation of the register. - */ - - - /** - * Returns a Timestamp struct containing 1394 CYCLE_TIME information - * - * @param registerVal The register value to query. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetCycleTime(TimeStamp timeStamp); - - /* - * Returns the camera diagnostic infomation. - * - * @param pStats Pointer to the CameraStats structure. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetStats( CameraStats pStats ); - - /* - * Reset the camera diagnostic infomation. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error ResetStats(); - - /* - * Register the camera to issue a custom callback function call for a - * specific device event. - * - * @param pOpts Pointer to the EventOptions structure which defines the - * callback function to use, the event for which to register - * the device, and a pointer to user data (optional) to be - * passed to the callback function. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error RegisterEvent( EventOptions pOpts ); - - /* - * De-register an event previously registered with the camera. - * - * @param pOpts Pointer to the EventOptions structure which defines the - * callback function to use, the event for which to register - * the device, and a pointer to user data (optional) to be - * passed to the callback function. The callback function and - * user data elements of the EventOptions structure are ignored - * in this call, and just the event name within the structure is - * used with this function call. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error DeregisterEvent( EventOptions pOpts ); - - /* - * Register the camera to issue a custom callback function call for a - * specific device event. - * - * @param pOpts Pointer to the EventOptions structure which defines the - * callback function to use, the event for which to register - * the device, and a pointer to user data (optional) to be - * passed to the callback function. The event name element of - * the structure is ignored with this function call. If a single - * event has already been registered via RegisterEvent(), this - * call will fail, as the user could accidentally change the - * the internal callback function pointer for a queued event. - * The user will need to de-register all registered events, - * then call this function again. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error RegisterAllEvents( EventOptions pOpts ); - - /* - * De-register all events registered with the camera. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error DeregisterAllEvents( ); - } - - -// #endif // PGR_FC2_CAMERABASE_H_ - - -// Parsed from - -//============================================================================= -// 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: Camera.h 316355 2017-02-20 23:02:28Z alin $ -//============================================================================= - -// #ifndef PGR_FC2_CAMERA_H_ -// #define PGR_FC2_CAMERA_H_ - -// #include "CameraBase.h" - /** - * The Camera object represents a physical camera that uses the IIDC - * register set. The object must first be connected to using Connect() - * before any other operations can proceed. - * - * It is possible for more than 1 Camera object to connect to a single - * physical camera. However, isochronous transmission to more than - * 1 Camera object is not supported. - * - * \nosubgrouping - */ - @Namespace("FlyCapture2") public static class Camera extends CameraBase { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Camera(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public Camera(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public Camera position(long position) { - return (Camera)super.position(position); - } - - - /** - * Default constructor. - */ - public Camera() { super((Pointer)null); allocate(); } - private native void allocate(); - - /** - * Default destructor. - */ - - /** - * \name DCAM Formats - * - * These functions deal with DCAM video mode and frame rate - * on the camera. - */ - /*@{*/ - - /** - * Query the camera to determine if the specified video mode and - * frame rate is supported. - * - * @param videoMode Video mode to check. - * @param frameRate Frame rate to check. - * @param pSupported Whether the video mode and frame rate is - * supported. - * - * @see GetVideoModeAndFrameRate() - * @see SetVideoModeAndFrameRate() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetVideoModeAndFrameRateInfo( - @Cast("FlyCapture2::VideoMode") int videoMode, - @Cast("FlyCapture2::FrameRate") int frameRate, - @Cast("bool*") BoolPointer pSupported); - public native @ByVal Error GetVideoModeAndFrameRateInfo( - @Cast("FlyCapture2::VideoMode") int videoMode, - @Cast("FlyCapture2::FrameRate") int frameRate, - @Cast("bool*") boolean[] pSupported); - - /** - * Get the current video mode and frame rate from the camera. If - * the camera is in Format7, the video mode will be VIDEOMODE_FORMAT7 - * and the frame rate will be FRAMERATE_FORMAT7. - * - * @param pVideoMode Current video mode. - * @param pFrameRate Current frame rate. - * - * @see GetVideoModeAndFrameRateInfo() - * @see SetVideoModeAndFrameRate() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetVideoModeAndFrameRate( - @Cast("FlyCapture2::VideoMode*") IntPointer pVideoMode, - @Cast("FlyCapture2::FrameRate*") IntPointer pFrameRate ); - public native @ByVal Error GetVideoModeAndFrameRate( - @Cast("FlyCapture2::VideoMode*") IntBuffer pVideoMode, - @Cast("FlyCapture2::FrameRate*") IntBuffer pFrameRate ); - public native @ByVal Error GetVideoModeAndFrameRate( - @Cast("FlyCapture2::VideoMode*") int[] pVideoMode, - @Cast("FlyCapture2::FrameRate*") int[] pFrameRate ); - - /** - * Set the specified video mode and frame rate to the camera. It is - * not possible to set the camera to VIDEOMODE_FORMAT7 or - * FRAMERATE_FORMAT7. Use the Format7 functions to set the camera - * into Format7. - * - * @param videoMode Video mode to set to camera. - * @param frameRate Frame rate to set to camera. - * - * @see GetVideoModeAndFrameRateInfo() - * @see GetVideoModeAndFrameRate() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetVideoModeAndFrameRate( - @Cast("FlyCapture2::VideoMode") int videoMode, - @Cast("FlyCapture2::FrameRate") int frameRate ); - - /*@}*/ - - /** - * \name Format7 - * - * These functions deal with Format7 custom image control on the camera. - */ - /*@{*/ - - /** - * Retrieve the availability of Format7 custom image mode and the - * camera capabilities for the specified Format7 mode. The mode must - * be specified in the Format7Info structure in order for the - * function to succeed. - * - * @param pInfo Structure to be filled with the capabilities of the - * specified mode and the current state in the specified - * mode. - * @param pSupported Whether the specified mode is supported. - * - * @see ValidateFormat7Settings() - * @see GetFormat7Configuration() - * @see SetFormat7Configuration() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error GetFormat7Info( - Format7Info pInfo, - @Cast("bool*") BoolPointer pSupported ); - public native @ByVal Error GetFormat7Info( - Format7Info pInfo, - @Cast("bool*") boolean[] pSupported ); - - /** - * Validates Format7ImageSettings structure and returns valid packet - * size information if the image settings are valid. The current - * image settings are cached while validation is taking place. The - * cached settings are restored when validation is complete. - * - * @param pImageSettings Structure containing the image settings. - * @param pSettingsAreValid Whether the settings are valid. - * @param pPacketInfo Packet size information that can be used to - * determine a valid packet size. - * - * @see GetFormat7Info() - * @see GetFormat7Configuration() - * @see SetFormat7Configuration() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error ValidateFormat7Settings( - @Const Format7ImageSettings pImageSettings, - @Cast("bool*") BoolPointer pSettingsAreValid, - Format7PacketInfo pPacketInfo ); - public native @ByVal Error ValidateFormat7Settings( - @Const Format7ImageSettings pImageSettings, - @Cast("bool*") boolean[] pSettingsAreValid, - Format7PacketInfo pPacketInfo ); + /** + * Retrieve the ErrorType of the error. + * + * @return The ErrorType of the error. + */ + public native @Cast("FlyCapture2::ErrorType") int GetType(); /** - * Get the current Format7 configuration from the camera. This call - * will only succeed if the camera is already in Format7. - * - * @param pImageSettings Current image settings. - * @param pPacketSize Current packet size. - * @param pPercentage Current packet size as a percentage. - * - * @see GetFormat7Info() - * @see ValidateFormat7Settings() - * @see SetFormat7Configuration() - * @see GetVideoModeAndFrameRate() + * Retrieve the top level description of the error that occurred. * - * @return An Error indicating the success or failure of the function. + * @return A string with the error description. */ - public native @ByVal Error GetFormat7Configuration( - Format7ImageSettings pImageSettings, - @Cast("unsigned int*") IntPointer pPacketSize, - FloatPointer pPercentage ); - public native @ByVal Error GetFormat7Configuration( - Format7ImageSettings pImageSettings, - @Cast("unsigned int*") IntBuffer pPacketSize, - FloatBuffer pPercentage ); - public native @ByVal Error GetFormat7Configuration( - Format7ImageSettings pImageSettings, - @Cast("unsigned int*") int[] pPacketSize, - float[] pPercentage ); + public native @Cast("const char*") BytePointer GetDescription(); /** - * Set the current Format7 configuration to the camera. - * - * @param pImageSettings Image settings to be written to the camera. - * @param packetSize Packet size to be written to the camera. - * - * @see GetFormat7Info() - * @see ValidateFormat7Settings() - * @see GetFormat7Configuration() + * Retrieve the line number where the error originated. * - * @return An Error indicating the success or failure of the function. + * @return The line number. */ - public native @ByVal Error SetFormat7Configuration( - @Const Format7ImageSettings pImageSettings, - @Cast("unsigned int") int packetSize ); + public native @Cast("unsigned int") int GetLine(); /** - * Set the current Format7 configuration to the camera. - * - * @param pImageSettings Image settings to be written to the camera. - * @param percentSpeed Percentage of packet size to be written to - * the camera. - * - * @see GetFormat7Info() - * @see ValidateFormat7Settings() - * @see GetFormat7Configuration() + * Retrieve the source filename where the error originated. * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error SetFormat7Configuration( - @Const Format7ImageSettings pImageSettings, - float percentSpeed ); - - /*@}*/ - - /** - * The following functions are inherited from CameraBase. See - * CameraBase.h for further information. - */ - - public native @ByVal Error Connect( PGRGuid pGuid/*=NULL*/ ); - public native @ByVal Error Connect( ); - public native @ByVal Error Disconnect(); - public native @Cast("bool") boolean IsConnected(); - public native @ByVal Error SetCallback( - ImageEventCallback callbackFn, - @Const Pointer pCallbackData/*=NULL*/ ); - public native @ByVal Error SetCallback( - ImageEventCallback callbackFn ); - public native @ByVal Error StartCapture( - ImageEventCallback callbackFn/*=NULL*/, - @Const Pointer pCallbackData/*=NULL*/ ); - public native @ByVal Error StartCapture( ); - public static native @ByVal Error StartSyncCapture( - @Cast("unsigned int") int numCameras, - @Cast("const FlyCapture2::Camera**") PointerPointer ppCameras, - @Cast("FlyCapture2::ImageEventCallback*") @ByPtrPtr ImageEventCallback pCallbackFns/*=NULL*/, - @Cast("const void**") PointerPointer pCallbackDataArray/*=NULL*/ ); - public static native @ByVal Error StartSyncCapture( - @Cast("unsigned int") int numCameras, - @Const @ByPtrPtr Camera ppCameras ); - public static native @ByVal Error StartSyncCapture( - @Cast("unsigned int") int numCameras, - @Const @ByPtrPtr Camera ppCameras, - @Cast("FlyCapture2::ImageEventCallback*") @ByPtrPtr ImageEventCallback pCallbackFns/*=NULL*/, - @Cast("const void**") @ByPtrPtr Pointer pCallbackDataArray/*=NULL*/ ); - public native @ByVal Error RetrieveBuffer( Image pImage ); - public native @ByVal Error StopCapture(); - public native @ByVal Error WaitForBufferEvent( Image pImage, @Cast("unsigned int") int eventNumber ); - public native @ByVal Error SetUserBuffers( - @Cast("unsigned char*const") BytePointer pMemBuffers, - int size, - int numBuffers ); - public native @ByVal Error SetUserBuffers( - @Cast("unsigned char*const") ByteBuffer pMemBuffers, - int size, - int numBuffers ); - public native @ByVal Error SetUserBuffers( - @Cast("unsigned char*const") byte[] pMemBuffers, - int size, - int numBuffers ); - public native @ByVal Error GetConfiguration( FC2Config pConfig ); - public native @ByVal Error SetConfiguration( @Const FC2Config pConfig ); - public native @ByVal Error GetCameraInfo( CameraInfo pCameraInfo ); - public native @ByVal Error GetPropertyInfo( PropertyInfo pPropInfo ); - public native @ByVal Error GetProperty( Property pProp ); - public native @ByVal Error SetProperty( - @Const Property pProp, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetProperty( - @Const Property pProp ); - public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntPointer pDirection); - public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntBuffer pDirection); - public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") int[] pDirection); - public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction, @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction ); - public native @ByVal Error GetTriggerModeInfo( TriggerModeInfo pTriggerModeInfo ); - public native @ByVal Error GetTriggerMode( TriggerMode pTriggerMode ); - public native @ByVal Error SetTriggerMode( - @Const TriggerMode pTriggerMode, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetTriggerMode( - @Const TriggerMode pTriggerMode ); - public native @ByVal Error FireSoftwareTrigger( @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error FireSoftwareTrigger( ); - public native @ByVal Error GetTriggerDelayInfo( @Cast("FlyCapture2::TriggerDelayInfo*") PropertyInfo pTriggerDelayInfo ); - public native @ByVal Error GetTriggerDelay( @Cast("FlyCapture2::TriggerDelay*") Property pTriggerDelay ); - public native @ByVal Error SetTriggerDelay( - @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetTriggerDelay( - @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay ); - public native @ByVal Error GetStrobeInfo( StrobeInfo pStrobeInfo ); - public native @ByVal Error GetStrobe( StrobeControl pStrobeControl ); - public native @ByVal Error SetStrobe( - @Const StrobeControl pStrobeControl, - @Cast("bool") boolean broadcast/*=false*/ ); - public native @ByVal Error SetStrobe( - @Const StrobeControl pStrobeControl ); - public native @ByVal Error GetLUTInfo( LUTData pData ); - public native @ByVal Error GetLUTBankInfo( - @Cast("unsigned int") int bank, - @Cast("bool*") BoolPointer pReadSupported, - @Cast("bool*") BoolPointer pWriteSupported ); - public native @ByVal Error GetLUTBankInfo( - @Cast("unsigned int") int bank, - @Cast("bool*") boolean[] pReadSupported, - @Cast("bool*") boolean[] pWriteSupported ); - public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntPointer pActiveBank ); - public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntBuffer pActiveBank ); - public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") int[] pActiveBank ); - public native @ByVal Error SetActiveLUTBank( @Cast("unsigned int") int activeBank ); - public native @ByVal Error EnableLUT( @Cast("bool") boolean on ); - public native @ByVal Error GetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntPointer pEntries ); - public native @ByVal Error GetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntBuffer pEntries ); - public native @ByVal Error GetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") int[] pEntries ); - public native @ByVal Error SetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("const unsigned int*") IntPointer pEntries ); - public native @ByVal Error SetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("const unsigned int*") IntBuffer pEntries ); - public native @ByVal Error SetLUTChannel( - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("const unsigned int*") int[] pEntries ); - public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntPointer pCurrentChannel ); - public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntBuffer pCurrentChannel ); - public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") int[] pCurrentChannel ); - public native @ByVal Error SaveToMemoryChannel( @Cast("unsigned int") int channel ); - public native @ByVal Error RestoreFromMemoryChannel( @Cast("unsigned int") int channel ); - public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntPointer pNumChannels ); - public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntBuffer pNumChannels ); - public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") int[] pNumChannels ); - public native @ByVal Error GetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); - public native @ByVal Error SetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); - public native @ByVal Error WriteRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int") int value, - @Cast("bool") boolean broadcast/*=false*/); - public native @ByVal Error WriteRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int") int value); - public native @ByVal Error ReadRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pValue ); - public native @ByVal Error ReadRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pValue ); - public native @ByVal Error ReadRegister( - @Cast("unsigned int") int address, - @Cast("unsigned int*") int[] pValue ); - public native @ByVal Error WriteRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error WriteRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error WriteRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error ReadRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error ReadRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public native @ByVal Error ReadRegisterBlock( - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("const char*") BytePointer GetRegisterString( @Cast("unsigned int") int registerVal); - public native @ByVal Error GetCycleTime(TimeStamp timeStamp); - public native @ByVal Error GetStats( CameraStats pStats ); - public native @ByVal Error ResetStats(); + * @return A string with the file name. + */ + public native @Cast("const char*") BytePointer GetFilename(); - public native @ByVal Error RegisterEvent( EventOptions pOpts ); - public native @ByVal Error DeregisterEvent( EventOptions pOpts ); - public native @ByVal Error RegisterAllEvents( EventOptions pOpts ); - public native @ByVal Error DeregisterAllEvents( ); + /** + * Get the error which caused this error. + * + * @return An error object representing the cause of this error. + */ + public native @ByVal Error GetCause(); + + /** + * Retrieve the build date of the file where the error originated. + * + * @return A string with the build date and time. + */ + public native @Cast("const char*") BytePointer GetBuildDate(); + + /** + * Retrieve the support information. + * It is not implemented in this release. + * + * @return A string containing support information. + */ + public native @Cast("const char*") BytePointer CollectSupportInformation(); + /** + * Print a formatted log trace to stderr. + */ + public native void PrintErrorTrace(); } +// #endif // PGR_FC2_ERROR_H + + +// Parsed from + +//============================================================================= +// 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. +//============================================================================= + +// #ifndef PGR_FC2_BUSMANAGER_H +// #define PGR_FC2_BUSMANAGER_H + +// #include "FlyCapture2Platform.h" +// #include "FlyCapture2Defs.h" + + /** + * Bus event callback function prototype. Defines the syntax of the + * callback function that is passed into RegisterCallback() and + * UnregisterCallback(). It is recommended that minimal handling be + * performed in this callback as it will block internal processing + * of bus events until it returns. + */ + public static class BusEventCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public BusEventCallback(Pointer p) { super(p); } + protected BusEventCallback() { allocate(); } + private native void allocate(); + public native void call( Pointer pParameter, @Cast("unsigned int") int serialNumber ); + } + + /** + * Handle that is returned when registering a callback. It is required + * when unregistering the callback. + */ + @Namespace @Name("void") @Opaque public static class CallbackHandle extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public CallbackHandle() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public CallbackHandle(Pointer p) { super(p); } + } + + /** + * The BusManager class provides the functionality for the user to get an + * PGRGuid for a desired camera or device easily. Once the + * camera or device token is found, it can then be used to connect to the + * camera or device through the camera class or device class. In addition, + * the BusManager class provides the ability to be notified when a camera + * or device is added or removed or some event occurs on the PC. + */ + @Namespace("FlyCapture2") @NoOffset public static class BusManager extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public BusManager(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public BusManager(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public BusManager position(long position) { + return (BusManager)super.position(position); + } + + + /** + * Default constructor. + */ + public BusManager() { super((Pointer)null); allocate(); } + private native void allocate(); + + /** + * Default destructor. + */ + + /** + * 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 pGuid PGRGuid of the camera or the device to cause bus reset. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error FireBusReset( PGRGuid pGuid); + + /** + * Gets the number of cameras attached to the PC. + * + * @param pNumCameras The number of cameras attached. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetNumOfCameras( @Cast("unsigned int*") IntPointer pNumCameras ); + public native @ByVal Error GetNumOfCameras( @Cast("unsigned int*") IntBuffer pNumCameras ); + public native @ByVal Error GetNumOfCameras( @Cast("unsigned int*") int[] pNumCameras ); + + /** + * Gets the PGRGuid for a camera with the specified IPv4 address. + * + * @param ipAddress IP address to get GUID for. + * @param pGuid Unique PGRGuid for the camera. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetCameraFromIPAddress( + @ByVal IPAddress ipAddress, + PGRGuid 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 Camera::Connect() call. + * + * @param index Zero based index of camera. + * @param pGuid Unique PGRGuid for the camera. + * + * @see GetCameraFromSerialNumber() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetCameraFromIndex( + @Cast("unsigned int") int index, + PGRGuid 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 Camera::Connect() call. + * + * @param serialNumber Serial number of camera. + * @param pGuid Unique PGRGuid for the camera. + * + * @see GetCameraFromIndex() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetCameraFromSerialNumber( + @Cast("unsigned int") int serialNumber, + PGRGuid pGuid ); + + /** + * Gets the serial number of the camera with the specified index. + * + * @param index Zero based index of desired camera. + * @param pSerialNumber Serial number of camera. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetCameraSerialNumberFromIndex( + @Cast("unsigned int") int index, + @Cast("unsigned int*") IntPointer pSerialNumber ); + public native @ByVal Error GetCameraSerialNumberFromIndex( + @Cast("unsigned int") int index, + @Cast("unsigned int*") IntBuffer pSerialNumber ); + public native @ByVal Error GetCameraSerialNumberFromIndex( + @Cast("unsigned int") int index, + @Cast("unsigned int*") 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 pGuid The PGRGuid to get the interface for. + * @param pInterfaceType The interface type of the PGRGuid. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetInterfaceTypeFromGuid( + PGRGuid pGuid, + @Cast("FlyCapture2::InterfaceType*") IntPointer pInterfaceType ); + public native @ByVal Error GetInterfaceTypeFromGuid( + PGRGuid pGuid, + @Cast("FlyCapture2::InterfaceType*") IntBuffer pInterfaceType ); + public native @ByVal Error GetInterfaceTypeFromGuid( + PGRGuid pGuid, + @Cast("FlyCapture2::InterfaceType*") int[] pInterfaceType ); + + /** + * Gets the number of devices. This may include hubs, host controllers + * and other hardware devices (including cameras). + * + * @param pNumDevices The number of devices found. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetNumOfDevices( @Cast("unsigned int*") IntPointer pNumDevices ); + public native @ByVal Error GetNumOfDevices( @Cast("unsigned int*") IntBuffer pNumDevices ); + public native @ByVal Error GetNumOfDevices( @Cast("unsigned int*") int[] pNumDevices ); + + /** + * Gets the PGRGuid for a device. It uniquely identifies the device + * specified by the index. + * + * @param index Zero based index of device. + * @param pGuid Unique PGRGuid for the device. + * + * @see GetNumOfDevices() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetDeviceFromIndex( + @Cast("unsigned int") int index, + PGRGuid 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 guid PGRGuid of the device to read from. + * @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. + */ + public native @ByVal Error ReadPhyRegister( + @ByVal PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pValue ); + public native @ByVal Error ReadPhyRegister( + @ByVal PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pValue ); + public native @ByVal Error ReadPhyRegister( + @ByVal PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int*") 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 guid PGRGuid of the device to write to. + * @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. + */ + public native @ByVal Error WritePhyRegister( + @ByVal PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int") int value ); + + /** + * Read usb link info for the port that the specified device is connected to. + * + * @param guid PGRGuid of the device to read from. + * @param pValue Value read from the card register. + *
+             * Bit 15:0  = Link %Error Count. Default = 0. This field returns the number of link errors detected by the port.
+             * Bit 19:16 = Rx Lane Count. Default = 0. This field that identifies the number of Receive Lanes negotiated by the port.
+             * Bit 23:20 = Tx Lane Count. Default = 0. This field that identifies the number of Transmit Lanes negotiated by the port.
+             * Bit 31:24 = Reserved.
+             *
+             * Refer to XHCI 1.1 section 5.4.10 for Port Link Info:
+ * eXtensible Host Controller interface for USB xHCI + *
+ * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetUsbLinkInfo( + @ByVal PGRGuid guid, + @Cast("unsigned int*") IntPointer pValue ); + public native @ByVal Error GetUsbLinkInfo( + @ByVal PGRGuid guid, + @Cast("unsigned int*") IntBuffer pValue ); + public native @ByVal Error GetUsbLinkInfo( + @ByVal PGRGuid guid, + @Cast("unsigned int*") int[] pValue ); + + /** + * Read usb port status for the port that the specified device is connected to. + * + * @param guid PGRGuid of the device to read from. + * @param pValue Value read from the card register. + *
+             * Bit 0 = Current Connect Status. Default = 0.
+             *         1 = A device is connected to the port
+             *         0 = A device is not connected.
+             *         This value reflects the current state of the port, and may not correspond directly to the event that caused the Connect Status Change (CSC) bit to be set to 1.
+             * Bit 1 = Port Enabled/Disabled. Default = 0. 1 = Enabled. 0 = Disabled.
+             * Bit 2 = Reserved.
+             * Bit 3 = Over-current Active. Default = 0.
+             *         1 = This port currently has an over-current condition.
+             *         0 = This port does not have an over-current condition.
+             * Bit 4 = Port Reset. Default = 0.
+             *         1 = Port Reset signaling is asserted.
+             *         0 = Port is not in Reset.
+             * Bit 8:5 = Port Link State. Default = RxDetect(5). This field is used to power manage the port and reflects its current link state.
+             * Bit 9 = Port Power. Default = 1. This flag reflects a port's logical, power control state.
+             *         0 = This port is in the powered-off state.
+             *         1 = This port is not in the powered-off state.
+             * Bit 13:10 = Port Speed. Default = 0. This field identifies the speed of the connected USB Device. This field is only relevant if a device is connected, in all other cases this field shall indicate Undefined Speed.
+             *             0 : Undefined speed
+             *             1-15 : Protocol Speed ID (refer to other sections)
+             * Bit 15:14 = Port Indicator Control. Default = 0. 0 = Port indicators are off.
+             *             1 = Amber. 2 = Green. 3 = Undefined.
+             * Bit 16 = Port Link State Write Strobe. Default = 0.
+             *          When this bit is set to 1 on a write reference to this register, this flag enables writes to the PLS field.
+             * Bit 17 = Connect Status Change. Default = 0.
+             *          1 = Change in current connect status. 0 = No change.
+             * Bit 18 = Port Enabled/Disabled Change. Default = 0.
+             *          1 = change in PED. 0 = No change.
+             * Bit 19 = Warm Port Reset Change. Default = 0. This bit is set when Warm Reset processing on this port completes.
+             *          0 = No change. 1 = Warm Reset complete.
+             * Bit 20 = Over current change. Default = 0.
+             *          This bit shall be set to a 1 when there is a 0 to 1 or 1 to 0 transition of Over-current Active.
+             * Bit 21 = Port Reset Change. Default = 0. This flag is set to 1 due to a 1 to 0 transition of Port Reset.
+             * Bit 22 = Port Link State Change. Default = 0. This flag is set to 1 due to PLS transitions (refer to document)
+             * Bit 23 = Port Config %Error Change. Default = 0. This flag indicates that the port failed to configure its link partner.
+             *          0 = No change. 1 = Port Config %Error detected.
+             * Bit 24 = Cold Attach Status. Default = 0.
+             *          1 = Far-end receiver terminations were detected in the disconnected state and the root hub port state machine was unable to advance to the enabled state.
+             *          0 - This flag is 0 if PP is 0 or for USB2 protocol parts.
+             * Bit 25 = Wake on Connect Enable. Default = 0. Writing this bit to a 1 enables to port to be sensitive to device connects as system wake up events.
+             * Bit 26 = Wake on Disconnect Enable. Default = 0. Writing this bit to a 1 enables the port to be sensitive to device disconnects as system wake up events.
+             * Bit 27 = Wake on Over-current Enable. Default = 0. Writing this bit to a 1 enables the port to be sensitive to over-current conditions as system wake up events.
+             * Bit 29:28 = Reserved
+             * Bit 30 = Device Removable. This flag indicates if this port has a removable device attached.
+             *          1 = Device is non-removable. 0 = Device is removable.
+             * Bit 31 = Warm Port Reset. Default = 0. This flag shall always return 0 when read. Refer to document for writing.
+             *
+             * Refer to XHCI 1.1 section 5.4.8 for Port Status:
+ * eXtensible Host Controller interface for USB xHCI + *
+ * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetUsbPortStatus( + @ByVal PGRGuid guid, + @Cast("unsigned int*") IntPointer pValue ); + public native @ByVal Error GetUsbPortStatus( + @ByVal PGRGuid guid, + @Cast("unsigned int*") IntBuffer pValue ); + public native @ByVal Error GetUsbPortStatus( + @ByVal PGRGuid guid, + @Cast("unsigned int*") int[] pValue ); + + /** + * Gets the topology information for the PC. + * + * @param pNode TopologyNode object that will contain the topology + * information. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetTopology( + TopologyNode pNode ); + + /** + * Register a callback function that will be called when the + * specified callback event occurs. + * + * @param busEventCallback 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. + * + * @see UnregisterCallback() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error RegisterCallback( + BusEventCallback busEventCallback, + @Cast("FlyCapture2::BusCallbackType") int callbackType, + Pointer pParameter, + @ByPtrPtr CallbackHandle pCallbackHandle ); + + /** + * Unregister a callback function. + * + * @param callbackHandle Unique callback handle. + * + * @see RegisterCallback() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error UnregisterCallback( CallbackHandle callbackHandle ); + + /** + * Force a rescan of the buses. This does not trigger a bus reset. + * The camera objects will be invalidated only if the camera network + * topology is changed (ie. a camera is disconnected or added) + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error RescanBus(); + + /** + * Force the camera with the specific MAC address to the specified + * IP address, subnet mask and default gateway. This is useful in + * situations where GigE Vision cameras are using IP addresses + * in a subnet different from the host's subnet. + * + * @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. + */ + public static native @ByVal Error ForceIPAddressToCamera( + @ByVal MACAddress macAddress, + @ByVal IPAddress ipAddress, + @ByVal IPAddress subnetMask, + @ByVal IPAddress defaultGateway ); + + /** + * Force all cameras on the network to be assigned sequential IP addresses + * on the same subnet as the netowrk 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. + */ + public static native @ByVal Error ForceAllIPAddressesAutomatically(); + + /** + * Force a camera on the network to be assigned an IP address + * on the same subnet as the netowrk 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. + */ + public static native @ByVal Error ForceAllIPAddressesAutomatically(@Cast("unsigned int") int serialNumber); + + /** + * Discover all cameras connected to the network even if they reside + * on a different subnet. This is useful in situations where GigE Vision + * cameras are using IP addresses in a subnet different from the host's + * subnet. After discovering the camera, it is easy to use + * ForceIPAddressToCamera() to set a different IP configuration. + * + * @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. + */ + public static native @ByVal Error DiscoverGigECameras( + CameraInfo gigECameras, + @Cast("unsigned int*") IntPointer arraySize ); + public static native @ByVal Error DiscoverGigECameras( + CameraInfo gigECameras, + @Cast("unsigned int*") IntBuffer arraySize ); + public static native @ByVal Error DiscoverGigECameras( + CameraInfo gigECameras, + @Cast("unsigned int*") int[] arraySize ); + + /** + * Query CCP status on camera with corresponding PGRGuid. This is + * useful to determine if a GigE camera can be controlled. + * + * @param pGuid PGRGuid of the camera + * @param pControlable Indicates whether camera is controllable + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error IsCameraControlable( + PGRGuid pGuid, @Cast("bool*") BoolPointer pControlable ); + public native @ByVal Error IsCameraControlable( + PGRGuid pGuid, @Cast("bool*") boolean[] pControlable ); + } + + +// #endif //PGR_FC2_BUSMANAGER_H + + +// Parsed from + +//============================================================================= +// 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: CameraBase.h 347612 2017-12-01 20:44:28Z wgallego $ +//============================================================================= + +// #ifndef PGR_FC2_CAMERABASE_H_ +// #define PGR_FC2_CAMERABASE_H_ + +// #include "FlyCapture2Platform.h" +// #include "FlyCapture2Defs.h" + + /** + * Image event callback function prototype. Defines the syntax of the + * image callback function that is passed into StartCapture(). It is + * possible for this function to be called simultaneously. Therefore, + * users must make sure that code in the callback is thread safe. + */ + public static class ImageEventCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public ImageEventCallback(Pointer p) { super(p); } + protected ImageEventCallback() { allocate(); } + private native void allocate(); + public native void call( Image pImage, @Const Pointer pCallbackData ); + } + + /** + * The CameraBase class is an abstract base class that defines a general + * interface to a camera. + * + * \nosubgrouping + */ + @Namespace("FlyCapture2") @NoOffset public static class CameraBase extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public CameraBase(Pointer p) { super(p); } + + + /** + * Default constructor. + */ + + /** + * Default destructor. + */ + + /** + * \name Connection and Image Retrieval + * + * These functions deal with connections and image retrieval from + * the camera. + */ + /*@{*/ + + /** + * Connects the camera object to the camera specified by the GUID. + * If the guid is omitted or set to NULL, the connection will be made + * to the first camera detected on the PC (i.e. index = 0). + * + * @param pGuid The unique identifier for a specific camera on the PC. + * + * @see BusManager::GetCameraFromIndex() + * @see BusManager::GetCameraFromSerialNumber() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Connect( PGRGuid pGuid/*=NULL*/ ); + public native @ByVal Error Connect( ); + + /** + * Disconnects the camera object from the camera. This allows another + * physical camera specified by a GUID to be connected to the camera + * object. + * + * @see Connect() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Disconnect(); + + /** + * Checks if the camera object is connected to a physical camera + * specified by a GUID. + * + * @see Connect() + * @see Disconnect() + * + * @return Whether Connect() was called on the camera object. + */ + public native @Cast("bool") boolean IsConnected(); + + /** + * Sets the callback data to be used on completion of image transfer. + * To clear the current stored callback data, pass in NULL for both + * arguments. + * + * @param callbackFn 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. + * + * @see StartCapture() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetCallback( + ImageEventCallback callbackFn, + @Const Pointer pCallbackData/*=NULL*/ ); + public native @ByVal Error SetCallback( + ImageEventCallback callbackFn ); + + /** + * Starts isochronous image capture. It will use either the current + * video mode or the most recently set video mode of the camera. + * The optional callback function parameter is called on completion of + * image transfer. + * When a callback function is specified, the grab mode will determine how + * images are delivered. + * If the grab mode has not been set, or has been set to DROP_FRAMES + * the default behavior is to requeue images for DMA if they have + * not been delivered by the time the next image transfer completes. + * If BUFFER_FRAMES is specified, the next image in the sequence will + * be delivered. Note that for the BUFFER_FRAMES case, if delivery + * does not keep up with the DMA process, images will be lost. + * The default behavior is to perform DROP_FRAMES image delivery + * Alternatively, the callback parameter can be set to NULL + * and RetrieveBuffer() can be called as a blocking call to get + * the image data. + * + * @param callbackFn 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. + * + * @see RetrieveBuffer() + * @see StartSyncCapture() + * @see StopCapture() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error StartCapture( + ImageEventCallback callbackFn/*=NULL*/, + @Const Pointer pCallbackData/*=NULL*/ ); + public native @ByVal Error StartCapture( ); + + /** + * Starts isochronous image capture on multiple cameras. On each frame, + * the time stamps across the cameras are aligned which means the frames + * are synchronized. Note that the cameras must be synchronized by + * external means in order for this function to work. This means that + * the cameras should either be on the same bus, hardware synchronized + * (e.g. through triggering) or Multisync is running. + * This function is only used with firewire cameras. + * + * @param numCameras Number of Camera objects in the ppCameras array. + * @param ppCameras Array of pointers to Camera objects containing the + * cameras to be started and synchronized. + * @param pCallbackFns Array of callback functions for each camera. + * @param pCallbackDataArray Array of callback data pointers. + * + * @see RetrieveBuffer() + * @see StartCapture() + * @see StopCapture() + * + * @return An Error indicating the success or failure of the function. + */ + + + /** + * Retrieves the the next image object containing the next image. + * If the grab mode has not been set, or has been set to DROP_FRAMES + * the default behavior is to requeue images for DMA if they have + * not been retrieved by the time the next image transfer completes. + * If BUFFER_FRAMES is specified, the next image in the sequence will + * be retrieved. Note that for the BUFFER_FRAMES case, if retrieval + * does not keep up with the DMA process, images will be lost. + * The default behavior is to perform DROP_FRAMES image retrieval. + * + * @param pImage Pointer to Image object to store image data. + * + * @see StartCapture() + * @see StopCapture() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error RetrieveBuffer( Image pImage ); + + /** + * Stops isochronous image transfer and cleans up all associated + * resources. + * If an image callback function (specified in the StartCapture() call) + * is currently executing, StopCapture() will not return until after + * the callback has completed. + * + * @see StartCapture() + * @see RetrieveBuffer() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error StopCapture(); + + /** + * Retrieves the next image event containing the next part of the image. + * + * @param pImage Pointer to Image object to store image data. + * @param eventNumber The event number to wait for. + * + * @see StartCapture() + * @see RetrieveBuffer() + * @see StopCapture() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error WaitForBufferEvent( Image pImage, @Cast("unsigned int") 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 + * + * @param pMemBuffers Pointer to memory buffers to be written to. + * @param size The size of each buffer (in bytes). + * @param numBuffers Number of buffers in the array. + * + * @see StartCapture() + * @see RetrieveBuffer() + * @see StopCapture() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetUserBuffers( + @Cast("unsigned char*const") BytePointer pMemBuffers, + int size, + int numBuffers ); + public native @ByVal Error SetUserBuffers( + @Cast("unsigned char*const") ByteBuffer pMemBuffers, + int size, + int numBuffers ); + public native @ByVal Error SetUserBuffers( + @Cast("unsigned char*const") byte[] pMemBuffers, + int size, + int numBuffers ); + + /** + * Get the configuration associated with the camera object. + * + * @param pConfig Pointer to the configuration structure to be filled. + * + * @see SetConfiguration() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetConfiguration( FC2Config pConfig ); + + /** + * Set the configuration associated with the camera object. + * + * @param pConfig Pointer to the configuration structure to be used. + * + * @see GetConfiguration() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetConfiguration( @Const FC2Config pConfig ); + + /*@}*/ + + /** + * \name Information and Properties + * + * 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 pCameraInfo Pointer to the camera information structure + * to be filled. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetCameraInfo( CameraInfo pCameraInfo ); + + /** + * Retrieves information about the specified camera property. The + * property type must be specified in the PropertyInfo structure + * passed into the function in order for the function to succeed. + * + * @param pPropInfo Pointer to the PropertyInfo structure to be filled. + * + * @see GetProperty() + * @see SetProperty() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetPropertyInfo( PropertyInfo pPropInfo ); + + /** + * Reads the settings for the specified property from the camera. The + * property type must be specified in the Property 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. + * + * @param pProp Pointer to the Property structure to be filled. + * + * @see GetPropertyInfo() + * @see SetProperty() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetProperty( Property pProp ); + + /** + * 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 GetPropertyInfo() to query which + * options are available for a specific property. + * + * @param pProp Pointer to the Property structure to be used. + * @param broadcast Whether the action should be broadcast. + * + * @see GetPropertyInfo() + * @see GetProperty() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetProperty( + @Const Property pProp, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetProperty( + @Const Property pProp ); + + /*@}*/ + + /** + * \name General Purpose Input / Output + * + * 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. + * + * @param pin Pin to get the direction for. + * @param pDirection Direction of the pin. 0 for input, 1 for output. + * + * @see SetGPIOPinDirection() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntPointer pDirection); + public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntBuffer pDirection); + public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") 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. + * + * @param pin Pin to get the direction for. + * @param direction Direction of the pin. 0 for input, 1 for output. + * @param broadcast Whether the action should be broadcast. + * + * @see GetGPIOPinDirection() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction, @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction ); + + /*@}*/ + + /** + * \name Trigger + * + * These functions deal with trigger control on the camera. + */ + /*@{*/ + + /** + * Retrieve trigger information from the camera. + * + * @param pTriggerModeInfo Structure to receive trigger information. + * + * @see GetTriggerMode() + * @see SetTriggerMode() + * @see GetTriggerDelayInfo() + * @see GetTriggerDelay() + * @see SetTriggerDelay() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetTriggerModeInfo( TriggerModeInfo pTriggerModeInfo ); + + /** + * Retrieve current trigger settings from the camera. + * + * @param pTriggerMode Structure to receive trigger mode settings. + * + * @see GetTriggerModeInfo() + * @see SetTriggerMode() + * @see GetTriggerDelayInfo() + * @see GetTriggerDelay() + * @see SetTriggerDelay() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetTriggerMode( TriggerMode pTriggerMode ); + + /** + * Set the specified trigger settings to the camera. + * + * @param pTriggerMode Structure providing trigger mode settings. + * @param broadcast Whether the action should be broadcast. + * + * @see GetTriggerModeInfo() + * @see GetTriggerMode() + * @see GetTriggerDelayInfo() + * @see GetTriggerDelay() + * @see SetTriggerDelay() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetTriggerMode( + @Const TriggerMode pTriggerMode, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetTriggerMode( + @Const TriggerMode pTriggerMode ); + + /** + * Fire the software trigger according to the DCAM specifications. + * + * @param broadcast Whether the action should be broadcast. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error FireSoftwareTrigger( @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error FireSoftwareTrigger( ); + + /** + * Retrieve trigger delay information from the camera. + * + * @param pTriggerDelayInfo Structure to receive trigger delay information. + * + * @see GetTriggerModeInfo() + * @see GetTriggerMode() + * @see SetTriggerMode() + * @see GetTriggerDelay() + * @see SetTriggerDelay() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetTriggerDelayInfo( @Cast("FlyCapture2::TriggerDelayInfo*") PropertyInfo pTriggerDelayInfo ); + + /** + * Retrieve current trigger delay settings from the camera. + * + * @param pTriggerDelay Structure to receive trigger delay settings. + * + * @see GetTriggerModeInfo() + * @see GetTriggerMode() + * @see SetTriggerMode() + * @see GetTriggerDelayInfo() + * @see SetTriggerDelay() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetTriggerDelay( @Cast("FlyCapture2::TriggerDelay*") Property pTriggerDelay ); + + /** + * Set the specified trigger delay settings to the camera. + * + * @param pTriggerDelay Structure providing trigger delay settings. + * @param broadcast Whether the action should be broadcast. + * + * @see GetTriggerModeInfo() + * @see GetTriggerMode() + * @see SetTriggerMode() + * @see GetTriggerDelayInfo() + * @see GetTriggerDelay() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetTriggerDelay( + @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetTriggerDelay( + @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay ); + + /*@}*/ + + /** + * \name Strobe + * + * These functions deal with strobe control on the camera. + */ + /*@{*/ + + /** + * Retrieve strobe information from the camera. + * + * @param pStrobeInfo Structure to receive strobe information. + * + * @see GetStrobe() + * @see SetStrobe() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetStrobeInfo( StrobeInfo pStrobeInfo ); + + /** + * Retrieve current strobe settings from the camera. The strobe pin + * must be specified in the structure before being passed in to + * the function. + * + * @param pStrobeControl Structure to receive strobe settings. + * + * @see GetStrobeInfo() + * @see SetStrobe() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetStrobe( StrobeControl pStrobeControl ); + + /** + * Set current strobe settings to the camera. The strobe pin + * must be specified in the structure before being passed in to + * the function. + * + * @param pStrobeControl Structure providing strobe settings. + * @param broadcast Whether the action should be broadcast. + * + * @see GetStrobeInfo() + * @see GetStrobe() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetStrobe( + @Const StrobeControl pStrobeControl, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetStrobe( + @Const StrobeControl pStrobeControl ); + + /*@}*/ + + /** + * \name Look Up Table + * + * These functions deal with Look Up Table control on the camera. + */ + /*@{*/ + + /** + * Query if LUT support is available on the camera. Note that some cameras + * may report support for the LUT and return an inputBitDepth of 0. In these + * cases use log2(numEntries) for the inputBitDepth. + * + * @param pData The LUT structure to be filled. + * + * @see EnableLUT() + * @see GetLUTChannel() + * @see SetLUTChannel() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetLUTInfo( LUTData pData ); + + /** + * Query the read/write status of a single LUT bank. + * + * @param bank The bank to query. + * @param pReadSupported Whether reading from the bank is supported. + * @param pWriteSupported Whether writing to the bank is supported. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetLUTBankInfo( + @Cast("unsigned int") int bank, + @Cast("bool*") BoolPointer pReadSupported, + @Cast("bool*") BoolPointer pWriteSupported ); + public native @ByVal Error GetLUTBankInfo( + @Cast("unsigned int") int bank, + @Cast("bool*") boolean[] pReadSupported, + @Cast("bool*") boolean[] pWriteSupported ); + + /** + * Get the LUT bank that is currently being used. For cameras with + * PGR LUT, the active bank is always 0. + * + * @param pActiveBank The currently active bank. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntPointer pActiveBank ); + public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntBuffer pActiveBank ); + public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") int[] pActiveBank ); + + /** + * Set the LUT bank that will be used. + * + * @param activeBank The bank to be set as active. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetActiveLUTBank( @Cast("unsigned int") int activeBank ); + + /** + * Enable or disable LUT functionality on the camera. + * + * @param on Whether to enable or disable LUT. + * + * @see GetLUTInfo() + * @see GetLUTChannel() + * @see SetLUTChannel() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error EnableLUT( @Cast("bool") boolean on ); + + /** + * Get the LUT channel settings from the camera. + * + * @param bank Bank to retrieve. + * @param channel Channel to retrieve. + * @param sizeEntries Number of entries in LUT table to read. + * @param pEntries Array to store LUT entries. + * + * @see GetLUTInfo() + * @see EnableLUT() + * @see SetLUTChannel() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntPointer pEntries ); + public native @ByVal Error GetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntBuffer pEntries ); + public native @ByVal Error GetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") int[] pEntries ); + + /** + * Set the LUT channel settings to the camera. + * + * @param bank Bank to set. + * @param channel Channel to set. + * @param sizeEntries Number of entries in LUT table to write. This must be the + * same size as numEntries returned by GetLutInfo(). + * @param pEntries Array containing LUT entries to write. + * + * @see GetLUTInfo() + * @see EnableLUT() + * @see GetLUTChannel() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("const unsigned int*") IntPointer pEntries ); + public native @ByVal Error SetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("const unsigned int*") IntBuffer pEntries ); + public native @ByVal Error SetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("const unsigned int*") int[] pEntries ); + + /*@}*/ + + /** + * \name Memory Channels + * + * These functions deal with memory channel control on the camera. + */ + /*@{*/ + + /** + * Retrieve the current memory channel from the camera. + * + * @param pCurrentChannel Current memory channel. + * + * @see SaveToMemoryChannel() + * @see RestoreFromMemoryChannel() + * @see GetMemoryChannelInfo() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntPointer pCurrentChannel ); + public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntBuffer pCurrentChannel ); + public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") int[] pCurrentChannel ); + + /** + * Save the current settings to the specfied current memory channel. + * + * @param channel Memory channel to save to. + * + * @see GetMemoryChannel() + * @see RestoreFromMemoryChannel() + * @see GetMemoryChannelInfo() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SaveToMemoryChannel( @Cast("unsigned int") int channel ); + + /** + * Restore the specfied current memory channel. + * + * @param channel Memory channel to restore from. + * + * @see GetMemoryChannel() + * @see SaveToMemoryChannel() + * @see GetMemoryChannelInfo() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error RestoreFromMemoryChannel( @Cast("unsigned int") int channel ); + + /** + * Query the camera for memory channel support. If the number of + * channels is 0, then memory channel support is not available. + * + * @param pNumChannels Number of memory channels supported. + * + * @see GetMemoryChannel() + * @see SaveToMemoryChannel() + * @see RestoreFromMemoryChannel() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntPointer pNumChannels ); + public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntBuffer pNumChannels ); + public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") int[] pNumChannels ); + + /*@}*/ + + /** + * \name Embedded Image Information + * + * These functions deal with embedded image information control + * on the camera. + */ + /*@{*/ + + /** + * Get the current status of the embedded image information register, + * as well as the availability of each embedded property. + * + * @param pInfo Structure to be filled. + * + * @see SetEmbeddedImageInfo() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); + + /** + * Sets the on/off values of the embedded image information structure + * to the camera. + * + * @param pInfo Structure to be used. + * + * @see GetEmbeddedImageInfo() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); + + /*@}*/ + + /** + * \name Register Operation + * + * These functions deal with register operation on the camera. + */ + /*@{*/ + + /** + * Write to the specified register on the camera. + * + * @param address DCAM address to be written to. + * @param value The value to be written. + * @param broadcast Whether the action should be broadcast. + * + * @see ReadRegister() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error WriteRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int") int value, + @Cast("bool") boolean broadcast/*=false*/); + public native @ByVal Error WriteRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int") int value); + + /** + * Read the specified register from the camera. + * + * @param address DCAM address to be read from. + * @param pValue The value that is read. + * + * @see WriteRegister() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error ReadRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pValue ); + public native @ByVal Error ReadRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pValue ); + public native @ByVal Error ReadRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int*") int[] pValue ); + + /** + * Write to the specified register block on the camera. + * + * @param addressHigh Top 16 bits of the 48 bit absolute address to + * write to. + * @param addressLow Bottom 32 bits of the 48 bits absolute address to + * write to. + * @param pBuffer Array containing data to be written. + * @param length Size of array, in quadlets. + * + * @see ReadRegisterBlock() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error WriteRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error WriteRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error WriteRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Read from the specified register block on the camera. + * + * @param addressHigh Top 16 bits of the 48 bit absolute address to + * read from. + * @param addressLow Bottom 32 bits of the 48 bits absolute address to + * read from. + * @param pBuffer Array to store read data. + * @param length Size of array, in quadlets. + * + * @see WriteRegisterBlock() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error ReadRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error ReadRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error ReadRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Returns a text representation of the register value. + * + * @param registerVal The register value to query. + * + * @return The text representation of the register. + */ + + + /** + * Returns a Timestamp struct containing 1394 CYCLE_TIME information + * + * @param registerVal The register value to query. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetCycleTime(TimeStamp timeStamp); + + /* + * Returns the camera diagnostic infomation. + * + * @param pStats Pointer to the CameraStats structure. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetStats( CameraStats pStats ); + + /* + * Reset the camera diagnostic infomation. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error ResetStats(); + + /* + * Register the camera to issue a custom callback function call for a + * specific device event. + * + * @param pOpts Pointer to the EventOptions structure which defines the + * callback function to use, the event for which to register + * the device, and a pointer to user data (optional) to be + * passed to the callback function. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error RegisterEvent( EventOptions pOpts ); + + /* + * De-register an event previously registered with the camera. + * + * @param pOpts Pointer to the EventOptions structure which defines the + * callback function to use, the event for which to register + * the device, and a pointer to user data (optional) to be + * passed to the callback function. The callback function and + * user data elements of the EventOptions structure are ignored + * in this call, and just the event name within the structure is + * used with this function call. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error DeregisterEvent( EventOptions pOpts ); + + /* + * Register the camera to issue a custom callback function call for a + * specific device event. + * + * @param pOpts Pointer to the EventOptions structure which defines the + * callback function to use, the event for which to register + * the device, and a pointer to user data (optional) to be + * passed to the callback function. The event name element of + * the structure is ignored with this function call. If a single + * event has already been registered via RegisterEvent(), this + * call will fail, as the user could accidentally change the + * the internal callback function pointer for a queued event. + * The user will need to de-register all registered events, + * then call this function again. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error RegisterAllEvents( EventOptions pOpts ); + + /* + * De-register all events registered with the camera. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error DeregisterAllEvents( ); + } + + +// #endif // PGR_FC2_CAMERABASE_H_ + + +// Parsed from + +//============================================================================= +// 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: Camera.h 347612 2017-12-01 20:44:28Z wgallego $ +//============================================================================= + +// #ifndef PGR_FC2_CAMERA_H_ +// #define PGR_FC2_CAMERA_H_ + +// #include "CameraBase.h" + /** + * The Camera object represents a physical camera that uses the IIDC + * register set. The object must first be connected to using Connect() + * before any other operations can proceed. + * + * It is possible for more than 1 Camera object to connect to a single + * physical camera. However, isochronous transmission to more than + * 1 Camera object is not supported. + * + * \nosubgrouping + */ + @Namespace("FlyCapture2") public static class Camera extends CameraBase { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Camera(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public Camera(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public Camera position(long position) { + return (Camera)super.position(position); + } + + + /** + * Default constructor. + */ + public Camera() { super((Pointer)null); allocate(); } + private native void allocate(); + + /** + * Default destructor. + */ + + /** + * \name DCAM Formats + * + * These functions deal with DCAM video mode and frame rate + * on the camera. They are only used for firewire and usb2 cameras. + */ + /*@{*/ + + /** + * Query the camera to determine if the specified video mode and + * frame rate is supported. + * + * @param videoMode Video mode to check. + * @param frameRate Frame rate to check. + * @param pSupported Whether the video mode and frame rate is + * supported. + * + * @see GetVideoModeAndFrameRate() + * @see SetVideoModeAndFrameRate() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetVideoModeAndFrameRateInfo( + @Cast("FlyCapture2::VideoMode") int videoMode, + @Cast("FlyCapture2::FrameRate") int frameRate, + @Cast("bool*") BoolPointer pSupported); + public native @ByVal Error GetVideoModeAndFrameRateInfo( + @Cast("FlyCapture2::VideoMode") int videoMode, + @Cast("FlyCapture2::FrameRate") int frameRate, + @Cast("bool*") boolean[] pSupported); + + /** + * Get the current video mode and frame rate from the camera. If + * the camera is in Format7, the video mode will be VIDEOMODE_FORMAT7 + * and the frame rate will be FRAMERATE_FORMAT7. + * + * @param pVideoMode Current video mode. + * @param pFrameRate Current frame rate. + * + * @see GetVideoModeAndFrameRateInfo() + * @see SetVideoModeAndFrameRate() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetVideoModeAndFrameRate( + @Cast("FlyCapture2::VideoMode*") IntPointer pVideoMode, + @Cast("FlyCapture2::FrameRate*") IntPointer pFrameRate ); + public native @ByVal Error GetVideoModeAndFrameRate( + @Cast("FlyCapture2::VideoMode*") IntBuffer pVideoMode, + @Cast("FlyCapture2::FrameRate*") IntBuffer pFrameRate ); + public native @ByVal Error GetVideoModeAndFrameRate( + @Cast("FlyCapture2::VideoMode*") int[] pVideoMode, + @Cast("FlyCapture2::FrameRate*") int[] pFrameRate ); + + /** + * Set the specified video mode and frame rate to the camera. It is + * not possible to set the camera to VIDEOMODE_FORMAT7 or + * FRAMERATE_FORMAT7. Use the Format7 functions to set the camera + * into Format7. + * + * @param videoMode Video mode to set to camera. + * @param frameRate Frame rate to set to camera. + * + * @see GetVideoModeAndFrameRateInfo() + * @see GetVideoModeAndFrameRate() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetVideoModeAndFrameRate( + @Cast("FlyCapture2::VideoMode") int videoMode, + @Cast("FlyCapture2::FrameRate") int frameRate ); + + /*@}*/ + + /** + * \name Format7 + * + * These functions deal with Format7 custom image control on the camera. + */ + /*@{*/ + + /** + * Retrieve the availability of Format7 custom image mode and the + * camera capabilities for the specified Format7 mode. The mode must + * be specified in the Format7Info structure in order for the + * function to succeed. + * + * @param pInfo Structure to be filled with the capabilities of the + * specified mode and the current state in the specified + * mode. + * @param pSupported Whether the specified mode is supported. + * + * @see ValidateFormat7Settings() + * @see GetFormat7Configuration() + * @see SetFormat7Configuration() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetFormat7Info( + Format7Info pInfo, + @Cast("bool*") BoolPointer pSupported ); + public native @ByVal Error GetFormat7Info( + Format7Info pInfo, + @Cast("bool*") boolean[] pSupported ); + + /** + * Validates Format7ImageSettings structure and returns valid packet + * size information if the image settings are valid. The current + * image settings are cached while validation is taking place. The + * cached settings are restored when validation is complete. + * + * @param pImageSettings Structure containing the image settings. + * @param pSettingsAreValid Whether the settings are valid. + * @param pPacketInfo Packet size information that can be used to + * determine a valid packet size. + * + * @see GetFormat7Info() + * @see GetFormat7Configuration() + * @see SetFormat7Configuration() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error ValidateFormat7Settings( + @Const Format7ImageSettings pImageSettings, + @Cast("bool*") BoolPointer pSettingsAreValid, + Format7PacketInfo pPacketInfo ); + public native @ByVal Error ValidateFormat7Settings( + @Const Format7ImageSettings pImageSettings, + @Cast("bool*") boolean[] pSettingsAreValid, + Format7PacketInfo pPacketInfo ); + + /** + * Get the current Format7 configuration from the camera. This call + * will only succeed if the camera is already in Format7. + * + * @param pImageSettings Current image settings. + * @param pPacketSize Current packet size. + * @param pPercentage Current packet size as a percentage. + * + * @see GetFormat7Info() + * @see ValidateFormat7Settings() + * @see SetFormat7Configuration() + * @see GetVideoModeAndFrameRate() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error GetFormat7Configuration( + Format7ImageSettings pImageSettings, + @Cast("unsigned int*") IntPointer pPacketSize, + FloatPointer pPercentage ); + public native @ByVal Error GetFormat7Configuration( + Format7ImageSettings pImageSettings, + @Cast("unsigned int*") IntBuffer pPacketSize, + FloatBuffer pPercentage ); + public native @ByVal Error GetFormat7Configuration( + Format7ImageSettings pImageSettings, + @Cast("unsigned int*") int[] pPacketSize, + float[] pPercentage ); + + /** + * Set the current Format7 configuration to the camera. + * + * @param pImageSettings Image settings to be written to the camera. + * @param packetSize Packet size to be written to the camera. + * + * @see GetFormat7Info() + * @see ValidateFormat7Settings() + * @see GetFormat7Configuration() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetFormat7Configuration( + @Const Format7ImageSettings pImageSettings, + @Cast("unsigned int") int packetSize ); + + /** + * Set the current Format7 configuration to the camera. + * + * @param pImageSettings Image settings to be written to the camera. + * @param percentSpeed Percentage of packet size to be written to + * the camera. + * + * @see GetFormat7Info() + * @see ValidateFormat7Settings() + * @see GetFormat7Configuration() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error SetFormat7Configuration( + @Const Format7ImageSettings pImageSettings, + float percentSpeed ); + + /*@}*/ + + /** + * The following functions are inherited from CameraBase. See + * CameraBase.h for further information. + */ + + public native @ByVal Error Connect( PGRGuid pGuid/*=NULL*/ ); + public native @ByVal Error Connect( ); + public native @ByVal Error Disconnect(); + public native @Cast("bool") boolean IsConnected(); + public native @ByVal Error SetCallback( + ImageEventCallback callbackFn, + @Const Pointer pCallbackData/*=NULL*/ ); + public native @ByVal Error SetCallback( + ImageEventCallback callbackFn ); + public native @ByVal Error StartCapture( + ImageEventCallback callbackFn/*=NULL*/, + @Const Pointer pCallbackData/*=NULL*/ ); + public native @ByVal Error StartCapture( ); + public static native @ByVal Error StartSyncCapture( + @Cast("unsigned int") int numCameras, + @Cast("const FlyCapture2::Camera**") PointerPointer ppCameras, + @Cast("FlyCapture2::ImageEventCallback*") @ByPtrPtr ImageEventCallback pCallbackFns/*=NULL*/, + @Cast("const void**") PointerPointer pCallbackDataArray/*=NULL*/ ); + public static native @ByVal Error StartSyncCapture( + @Cast("unsigned int") int numCameras, + @Const @ByPtrPtr Camera ppCameras ); + public static native @ByVal Error StartSyncCapture( + @Cast("unsigned int") int numCameras, + @Const @ByPtrPtr Camera ppCameras, + @Cast("FlyCapture2::ImageEventCallback*") @ByPtrPtr ImageEventCallback pCallbackFns/*=NULL*/, + @Cast("const void**") @ByPtrPtr Pointer pCallbackDataArray/*=NULL*/ ); + public native @ByVal Error RetrieveBuffer( Image pImage ); + public native @ByVal Error StopCapture(); + public native @ByVal Error WaitForBufferEvent( Image pImage, @Cast("unsigned int") int eventNumber ); + public native @ByVal Error SetUserBuffers( + @Cast("unsigned char*const") BytePointer pMemBuffers, + int size, + int numBuffers ); + public native @ByVal Error SetUserBuffers( + @Cast("unsigned char*const") ByteBuffer pMemBuffers, + int size, + int numBuffers ); + public native @ByVal Error SetUserBuffers( + @Cast("unsigned char*const") byte[] pMemBuffers, + int size, + int numBuffers ); + public native @ByVal Error GetConfiguration( FC2Config pConfig ); + public native @ByVal Error SetConfiguration( @Const FC2Config pConfig ); + public native @ByVal Error GetCameraInfo( CameraInfo pCameraInfo ); + public native @ByVal Error GetPropertyInfo( PropertyInfo pPropInfo ); + public native @ByVal Error GetProperty( Property pProp ); + public native @ByVal Error SetProperty( + @Const Property pProp, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetProperty( + @Const Property pProp ); + public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntPointer pDirection); + public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") IntBuffer pDirection); + public native @ByVal Error GetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int*") int[] pDirection); + public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction, @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetGPIOPinDirection( @Cast("unsigned int") int pin, @Cast("unsigned int") int direction ); + public native @ByVal Error GetTriggerModeInfo( TriggerModeInfo pTriggerModeInfo ); + public native @ByVal Error GetTriggerMode( TriggerMode pTriggerMode ); + public native @ByVal Error SetTriggerMode( + @Const TriggerMode pTriggerMode, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetTriggerMode( + @Const TriggerMode pTriggerMode ); + public native @ByVal Error FireSoftwareTrigger( @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error FireSoftwareTrigger( ); + public native @ByVal Error GetTriggerDelayInfo( @Cast("FlyCapture2::TriggerDelayInfo*") PropertyInfo pTriggerDelayInfo ); + public native @ByVal Error GetTriggerDelay( @Cast("FlyCapture2::TriggerDelay*") Property pTriggerDelay ); + public native @ByVal Error SetTriggerDelay( + @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetTriggerDelay( + @Cast("const FlyCapture2::TriggerDelay*") Property pTriggerDelay ); + public native @ByVal Error GetStrobeInfo( StrobeInfo pStrobeInfo ); + public native @ByVal Error GetStrobe( StrobeControl pStrobeControl ); + public native @ByVal Error SetStrobe( + @Const StrobeControl pStrobeControl, + @Cast("bool") boolean broadcast/*=false*/ ); + public native @ByVal Error SetStrobe( + @Const StrobeControl pStrobeControl ); + public native @ByVal Error GetLUTInfo( LUTData pData ); + public native @ByVal Error GetLUTBankInfo( + @Cast("unsigned int") int bank, + @Cast("bool*") BoolPointer pReadSupported, + @Cast("bool*") BoolPointer pWriteSupported ); + public native @ByVal Error GetLUTBankInfo( + @Cast("unsigned int") int bank, + @Cast("bool*") boolean[] pReadSupported, + @Cast("bool*") boolean[] pWriteSupported ); + public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntPointer pActiveBank ); + public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") IntBuffer pActiveBank ); + public native @ByVal Error GetActiveLUTBank( @Cast("unsigned int*") int[] pActiveBank ); + public native @ByVal Error SetActiveLUTBank( @Cast("unsigned int") int activeBank ); + public native @ByVal Error EnableLUT( @Cast("bool") boolean on ); + public native @ByVal Error GetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntPointer pEntries ); + public native @ByVal Error GetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntBuffer pEntries ); + public native @ByVal Error GetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") int[] pEntries ); + public native @ByVal Error SetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("const unsigned int*") IntPointer pEntries ); + public native @ByVal Error SetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("const unsigned int*") IntBuffer pEntries ); + public native @ByVal Error SetLUTChannel( + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("const unsigned int*") int[] pEntries ); + public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntPointer pCurrentChannel ); + public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") IntBuffer pCurrentChannel ); + public native @ByVal Error GetMemoryChannel( @Cast("unsigned int*") int[] pCurrentChannel ); + public native @ByVal Error SaveToMemoryChannel( @Cast("unsigned int") int channel ); + public native @ByVal Error RestoreFromMemoryChannel( @Cast("unsigned int") int channel ); + public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntPointer pNumChannels ); + public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") IntBuffer pNumChannels ); + public native @ByVal Error GetMemoryChannelInfo( @Cast("unsigned int*") int[] pNumChannels ); + public native @ByVal Error GetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); + public native @ByVal Error SetEmbeddedImageInfo( EmbeddedImageInfo pInfo ); + public native @ByVal Error WriteRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int") int value, + @Cast("bool") boolean broadcast/*=false*/); + public native @ByVal Error WriteRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int") int value); + public native @ByVal Error ReadRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pValue ); + public native @ByVal Error ReadRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pValue ); + public native @ByVal Error ReadRegister( + @Cast("unsigned int") int address, + @Cast("unsigned int*") int[] pValue ); + public native @ByVal Error WriteRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error WriteRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error WriteRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error ReadRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error ReadRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public native @ByVal Error ReadRegisterBlock( + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("const char*") BytePointer GetRegisterString( @Cast("unsigned int") int registerVal); + public native @ByVal Error GetCycleTime(TimeStamp timeStamp); + public native @ByVal Error GetStats( CameraStats pStats ); + public native @ByVal Error ResetStats(); + + public native @ByVal Error RegisterEvent( EventOptions pOpts ); + public native @ByVal Error DeregisterEvent( EventOptions pOpts ); + public native @ByVal Error RegisterAllEvents( EventOptions pOpts ); + public native @ByVal Error DeregisterAllEvents( ); + + } + + // #endif // PGR_FC2_CAMERA_H_ @@ -5813,8 +5783,7 @@ public static class AsyncCommandCallback extends FunctionPointer { * * @return An Error indicating the success or failure of the function. */ - public static native @ByVal Error GetDriverDeviceName(@Const PGRGuid guid, @StdString BytePointer deviceName); - public static native @ByVal Error GetDriverDeviceName(@Const PGRGuid guid, @StdString String deviceName); + public static native @ByVal Error GetDriverDeviceName(@Const PGRGuid guid, @StdString @ByRef BytePointer deviceName); /** * Get system information. @@ -5905,145 +5874,6 @@ public static class AsyncCommandCallback extends FunctionPointer { -// Parsed from - -//============================================================================= -// 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: AVIRecorder.h 316355 2017-02-20 23:02:28Z alin $ -//============================================================================= - -// #ifndef PGR_FC2_AVIRECORDER_H -// #define PGR_FC2_AVIRECORDER_H - -// #include "FlyCapture2Platform.h" -// #include "FlyCapture2Defs.h" - - /** - * The AVIRecorder class provides the functionality for the user to record - * images to an AVI file. - */ - @Namespace("FlyCapture2") @NoOffset public static class AVIRecorder extends Pointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVIRecorder(Pointer p) { super(p); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public AVIRecorder(long size) { super((Pointer)null); allocateArray(size); } - private native void allocateArray(long size); - @Override public AVIRecorder position(long position) { - return (AVIRecorder)super.position(position); - } - - - /** - * Default constructor. - */ - public AVIRecorder() { super((Pointer)null); allocate(); } - private native void allocate(); - - /** - * Default destructor. - */ - - /** - * Open an AVI file in preparation for writing Images to disk. - * The size of AVI files is limited to 2GB. The filenames are - * automatically generated using the filename specified. - * - * @param pFileName The filename of the AVI file. - * @param pOption Options to apply to the AVI file. - * - * @see AVIClose() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error AVIOpen( - @Cast("const char*") BytePointer pFileName, - AVIOption pOption ); - public native @ByVal Error AVIOpen( - String pFileName, - AVIOption pOption ); - - /** - * Open an MJPEG AVI file in preparation for writing Images to disk. - * The size of AVI files is limited to 2GB. The filenames are - * automatically generated using the filename specified. - * - * @param pFileName The filename of the AVI file. - * @param pOption MJPEG options to apply to the AVI file. - * - * @see AVIClose() - * @see MJPGOption - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error AVIOpen( - @Cast("const char*") BytePointer pFileName, - MJPGOption pOption ); - public native @ByVal Error AVIOpen( - String pFileName, - MJPGOption pOption ); - - - /** - * Open an H264 MP4 file in preparation for writing Images to disk. - * The size of MP4 files is limited to 2GB. The filenames are - * automatically generated using the filename specified. - * - * @param pFileName The filename of the MP4 file. - * @param pOption H264 options to apply to the MP4 file. - * - * @see AVIClose() - * @see H264Option - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error AVIOpen( - @Cast("const char*") BytePointer pFileName, - H264Option pOption ); - public native @ByVal Error AVIOpen( - String pFileName, - H264Option pOption ); - - - /** - * Append an image to the AVI/MP4 file. - * - * @param pImage The image to append. - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error AVIAppend( Image pImage); - - /** - * Close the AVI/MP4 file. - * - * @see AVIOpen() - * - * @return An Error indicating the success or failure of the function. - */ - public native @ByVal Error AVIClose( ); - } - - -// #endif //PGR_FC2_AVIRECORDER_H - - // Parsed from //============================================================================= @@ -6561,6 +6391,271 @@ private native void allocate( // #endif +// Parsed from + +//============================================================================= +// Copyright (c) 2001-2018 FLIR Systems, 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. +//============================================================================= + +// #ifndef FLIR_FLYCAPTURE2VIDEODEFS_H +// #define FLIR_FLYCAPTURE2VIDEODEFS_H + +// #include + /** + * \defgroup VideoSaveStructures Video saving structures. + * + * These structures define various parameters used for saving videos. + */ + + /*@{*/ + + /** Options for saving MJPG files. */ + @Namespace("FlyCapture2") @NoOffset public static class MJPGOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public MJPGOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public MJPGOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public MJPGOption position(long position) { + return (MJPGOption)super.position(position); + } + + /** Frame rate of the stream */ + public native float frameRate(); public native MJPGOption frameRate(float frameRate); + + /** Image quality (1-100) */ + public native @Cast("unsigned int") int quality(); public native MJPGOption quality(int quality); + + public native @Cast("unsigned int") int reserved(int i); public native MJPGOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public MJPGOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving H264 files. */ + @Namespace("FlyCapture2") @NoOffset public static class H264Option extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public H264Option(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public H264Option(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public H264Option position(long position) { + return (H264Option)super.position(position); + } + + /** Frame rate of the stream */ + public native float frameRate(); public native H264Option frameRate(float frameRate); + + /** Width of source image */ + public native @Cast("unsigned int") int width(); public native H264Option width(int width); + + /** Height of source image */ + public native @Cast("unsigned int") int height(); public native H264Option height(int height); + + /** Bitrate to encode at */ + public native @Cast("unsigned int") int bitrate(); public native H264Option bitrate(int bitrate); + + /** Reserved for future use */ + public native @Cast("unsigned int") int reserved(int i); public native H264Option reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public H264Option() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /** Options for saving AVI files. */ + @Namespace("FlyCapture2") @NoOffset public static class AVIOption extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public AVIOption(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public AVIOption(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public AVIOption position(long position) { + return (AVIOption)super.position(position); + } + + /** Frame rate of the stream */ + public native float frameRate(); public native AVIOption frameRate(float frameRate); + + /** Reserved for future use */ + public native @Cast("unsigned int") int reserved(int i); public native AVIOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + public AVIOption() { super((Pointer)null); allocate(); } + private native void allocate(); + } + + /*@}*/ + + +// #endif // FLIR_FLYCAPTURE2VIDEODEFS_H + +// Parsed from + +//============================================================================= +// Copyright (c) 2001-2018 FLIR Systems, 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. +//============================================================================= + +// #ifndef FLIR_FLYCAPTURE2VIDEO_H +// #define FLIR_FLYCAPTURE2VIDEO_H + +// #include "FlyCapture2Platform.h" +// #include "FlyCapture2VideoDefs.h" + + /** + * The FlyCapture2Video class provides the functionality for the user to record + * images to an AVI file. + */ + @Namespace("FlyCapture2") @NoOffset public static class FlyCapture2Video extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public FlyCapture2Video(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public FlyCapture2Video(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public FlyCapture2Video position(long position) { + return (FlyCapture2Video)super.position(position); + } + + + /** + * Default constructor. + */ + public FlyCapture2Video() { super((Pointer)null); allocate(); } + private native void allocate(); + + /** + * Default destructor. + */ + + /** + * Open an AVI file in preparation for writing Images to disk. + * The size of AVI files is limited to 2GB. The filenames are + * automatically generated using the filename specified. + * + * @param pFileName The filename of the AVI file. + * @param pOption Options to apply to the AVI file. + * + * @see SetMaximumFileSize() + * @see Close() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Open( + @Cast("const char*") BytePointer pFileName, + AVIOption pOption); + public native @ByVal Error Open( + String pFileName, + AVIOption pOption); + + /** + * Open an MJPEG AVI file in preparation for writing Images to disk. + * The size of AVI files is limited to 2GB. The filenames are + * automatically generated using the filename specified. + * + * @param pFileName The filename of the AVI file. + * @param pOption MJPEG options to apply to the AVI file. + * + * @see SetMaximumFileSize() + * @see Close() + * @see MJPGOption + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Open( + @Cast("const char*") BytePointer pFileName, + MJPGOption pOption); + public native @ByVal Error Open( + String pFileName, + MJPGOption pOption); + + + /** + * Open an H.264 video file in preparation for writing Images to disk. + * If the file extension is not specified, MP4 will be used as the default + * container. Consult ffmpeg documentation for a list of supported containers. + * + * @param pFileName The filename of the video file. + * @param pOption H.264 options to apply to the video file. + * + * @see Close() + * @see H264Option + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Open( + @Cast("const char*") BytePointer pFileName, + H264Option pOption); + public native @ByVal Error Open( + String pFileName, + H264Option pOption); + + + /** + * Append an image to the AVI/MP4 file. + * + * @param pImage The image to append. + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Append(Image pImage); + + /** + * Close the AVI/MP4 file. + * + * @see Open() + * + * @return An Error indicating the success or failure of the function. + */ + public native @ByVal Error Close(); + + /** + * Set the maximum file size (in megabytes) of a AVI/MP4 file. A new AVI/MP4 file + * is created automatically when file size limit is reached. Setting + * a maximum size of 0 indicates no limit on file size. + * + * @param size The maximum AVI file size in MB. + * + * @see Append() + * + */ + public native void SetMaximumFileSize(@Cast("unsigned int") int size); + } + + +// #endif // FLIR_FLYCAPTURE2VIDEO_H + + // Parsed from //============================================================================= diff --git a/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2_C.java b/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2_C.java index dbc9fe6d9fc..0a2cefdfa20 100644 --- a/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2_C.java +++ b/flycapture/src/main/java/org/bytedeco/javacpp/FlyCapture2_C.java @@ -1,4 +1,4 @@ -// Targeted by JavaCPP version 1.4.3: DO NOT EDIT THIS FILE +// Targeted by JavaCPP version 1.4.4-SNAPSHOT: DO NOT EDIT THIS FILE package org.bytedeco.javacpp; @@ -12,7 +12,7 @@ public class FlyCapture2_C extends org.bytedeco.javacpp.presets.FlyCapture2_C { // Parsed from //============================================================================= -// Copyright � 2017 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved. +// Copyright (c) 2001-2018 FLIR Systems, Inc. All Rights Reserved. // // This software is the confidential and proprietary information of FLIR // Integrated Imaging Solutions, Inc. ("Confidential Information"). You @@ -27,12 +27,9 @@ public class FlyCapture2_C extends org.bytedeco.javacpp.presets.FlyCapture2_C { // SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING // THIS SOFTWARE OR ITS DERIVATIVES. //============================================================================= -//============================================================================= -// $Id: FlyCapture2Defs_C.h,v 1.74 2010-12-13 23:58:00 mgara Exp $ -//============================================================================= -// #ifndef PGR_FC2_FLYCAPTURE2DEFS_C_H -// #define PGR_FC2_FLYCAPTURE2DEFS_C_H +// #ifndef FLIR_FLYCAPTURE2DEFS_C_H +// #define FLIR_FLYCAPTURE2DEFS_C_H // #include @@ -49,11 +46,11 @@ public class FlyCapture2_C extends org.bytedeco.javacpp.presets.FlyCapture2_C { // #ifdef __cplusplus // #endif - /** - * \defgroup CTypeDefs TypeDefs - */ + /** + * \defgroup CTypeDefs TypeDefs + */ - /*@{*/ + /*@{*/ // #ifndef FALSE public static final int FALSE = 0; @@ -69,2334 +66,2246 @@ public class FlyCapture2_C extends org.bytedeco.javacpp.presets.FlyCapture2_C { public static final int MAX_STRING_LENGTH = 512; - /** - * A context to the FlyCapture2 C library. It must be created before - * performing any calls to the library. - */ - @Namespace @Name("void") @Opaque public static class fc2Context extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2Context() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Context(Pointer p) { super(p); } - } - - /** - * A context to the FlyCapture2 C GUI library. It must be created before - * performing any calls to the library. - */ - @Namespace @Name("void") @Opaque public static class fc2GuiContext extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2GuiContext() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2GuiContext(Pointer p) { super(p); } - } - - /** - * An internal pointer used in the fc2Image structure. - */ - @Namespace @Name("void") @Opaque public static class fc2ImageImpl extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2ImageImpl() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2ImageImpl(Pointer p) { super(p); } - } - - /** - * A context referring to the AVI recorder object. - */ - @Namespace @Name("void") @Opaque public static class fc2AVIContext extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2AVIContext() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2AVIContext(Pointer p) { super(p); } - } - - /** - * A context referring to the ImageStatistics object. - */ - @Namespace @Name("void") @Opaque public static class fc2ImageStatisticsContext extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2ImageStatisticsContext() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2ImageStatisticsContext(Pointer p) { super(p); } - } - - /** - * A context referring to the TopologyNode object. - */ - @Namespace @Name("void") @Opaque public static class fc2TopologyNodeContext extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2TopologyNodeContext() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2TopologyNodeContext(Pointer p) { super(p); } - } - - /** - * A GUID to the camera. It is used to uniquely identify a camera. - */ - public static class fc2PGRGuid extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2PGRGuid() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2PGRGuid(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2PGRGuid(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2PGRGuid position(long position) { - return (fc2PGRGuid)super.position(position); - } - - public native @Cast("unsigned int") int value(int i); public native fc2PGRGuid value(int i, int value); - @MemberGetter public native @Cast("unsigned int*") IntPointer value(); - - } - - /*@}*/ - - /** - * \defgroup CEnumerations Enumerations - */ - - /*@{*/ - - /** The error types returned by functions. */ - /** enum _fc2Error */ - public static final int - /** Undefined */ - FC2_ERROR_UNDEFINED = -1, - /** Function returned with no errors. */ - FC2_ERROR_OK = 0, - /** General failure. */ - FC2_ERROR_FAILED = 1, - /** Function has not been implemented. */ - FC2_ERROR_NOT_IMPLEMENTED = 2, - /** Could not connect to Bus Master. */ - FC2_ERROR_FAILED_BUS_MASTER_CONNECTION = 3, - /** Camera has not been connected. */ - FC2_ERROR_NOT_CONNECTED = 4, - /** Initialization failed. */ - FC2_ERROR_INIT_FAILED = 5, - /** Camera has not been initialized. */ - FC2_ERROR_NOT_INTITIALIZED = 6, - /** Invalid parameter passed to function. */ - FC2_ERROR_INVALID_PARAMETER = 7, - /** Setting set to camera is invalid. */ - FC2_ERROR_INVALID_SETTINGS = 8, - /** Invalid Bus Manager object. */ - FC2_ERROR_INVALID_BUS_MANAGER = 9, - /** Could not allocate memory. */ - FC2_ERROR_MEMORY_ALLOCATION_FAILED = 10, - /** Low level error. */ - FC2_ERROR_LOW_LEVEL_FAILURE = 11, - /** Device not found. */ - FC2_ERROR_NOT_FOUND = 12, - /** GUID failure. */ - FC2_ERROR_FAILED_GUID = 13, - /** Packet size set to camera is invalid. */ - FC2_ERROR_INVALID_PACKET_SIZE = 14, - /** Invalid mode has been passed to function. */ - FC2_ERROR_INVALID_MODE = 15, - /** Error due to not being in Format7. */ - FC2_ERROR_NOT_IN_FORMAT7 = 16, - /** This feature is unsupported. */ - FC2_ERROR_NOT_SUPPORTED = 17, - /** Timeout error. */ - FC2_ERROR_TIMEOUT = 18, - /** Bus Master Failure. */ - FC2_ERROR_BUS_MASTER_FAILED = 19, - /** Generation Count Mismatch. */ - FC2_ERROR_INVALID_GENERATION = 20, - /** Look Up Table failure. */ - FC2_ERROR_LUT_FAILED = 21, - /** IIDC failure. */ - FC2_ERROR_IIDC_FAILED = 22, - /** Strobe failure. */ - FC2_ERROR_STROBE_FAILED = 23, - /** Trigger failure. */ - FC2_ERROR_TRIGGER_FAILED = 24, - /** Property failure. */ - FC2_ERROR_PROPERTY_FAILED = 25, - /** Property is not present. */ - FC2_ERROR_PROPERTY_NOT_PRESENT = 26, - /** Register access failed. */ - FC2_ERROR_REGISTER_FAILED = 27, - /** Register read failed. */ - FC2_ERROR_READ_REGISTER_FAILED = 28, - /** Register write failed. */ - FC2_ERROR_WRITE_REGISTER_FAILED = 29, - /** Isochronous failure. */ - FC2_ERROR_ISOCH_FAILED = 30, - /** Isochronous transfer has already been started. */ - FC2_ERROR_ISOCH_ALREADY_STARTED = 31, - /** Isochronous transfer has not been started. */ - FC2_ERROR_ISOCH_NOT_STARTED = 32, - /** Isochronous start failed. */ - FC2_ERROR_ISOCH_START_FAILED = 33, - /** Isochronous retrieve buffer failed. */ - FC2_ERROR_ISOCH_RETRIEVE_BUFFER_FAILED = 34, - /** Isochronous stop failed. */ - FC2_ERROR_ISOCH_STOP_FAILED = 35, - /** Isochronous image synchronization failed. */ - FC2_ERROR_ISOCH_SYNC_FAILED = 36, - /** Isochronous bandwidth exceeded. */ - FC2_ERROR_ISOCH_BANDWIDTH_EXCEEDED = 37, - /** Image conversion failed. */ - FC2_ERROR_IMAGE_CONVERSION_FAILED = 38, - /** Image library failure. */ - FC2_ERROR_IMAGE_LIBRARY_FAILURE = 39, - /** Buffer is too small. */ - FC2_ERROR_BUFFER_TOO_SMALL = 40, - /** There is an image consistency error. */ - FC2_ERROR_IMAGE_CONSISTENCY_ERROR = 41, - /** The installed driver is not compatible with the library. */ - FC2_ERROR_INCOMPATIBLE_DRIVER = 42, - FC2_ERROR_FORCE_32BITS = FULL_32BIT_VALUE; - - /** The type of bus callback to register a callback function for. */ - /** enum _fc2BusCallbackType */ - public static final int - /** Register for all bus events. */ - FC2_BUS_RESET = 0, - /** Register for arrivals only. */ - FC2_ARRIVAL = 1, - /** Register for removals only. */ - FC2_REMOVAL = 2, - FC2_CALLBACK_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * The grab strategy employed during image transfer. This type controls - * how images that stream off the camera accumulate in a user buffer - * for handling. - */ - /* - @remark Unlike earlier versions of the FlyCapture SDK, it is no longer - * necessary to explicitly start the image grabbing process before - * specifying an image grabbing mode. - */ - /** enum _fc2GrabMode */ - public static final int - /** - * Grabs the newest image in the user buffer each time the - * RetrieveBuffer() function is called. Older images are dropped - * instead of accumulating in the user buffer. Grabbing blocks if the - * camera has not finished transmitting the next available image. If - * the camera is transmitting images faster than the application can - * grab them, images may be dropped and only the most recent image - * is stored for grabbing. Note that this mode is the equivalent of - * flycaptureLockLatest in earlier versions of the FlyCapture SDK. - */ - FC2_DROP_FRAMES = 0, - - /** - * Images accumulate in the user buffer, and the oldest image is - * grabbed for handling before being discarded. This member can be - * used to guarantee that each image is seen. However, image processing - * time must not exceed transmission time from the camera to the - * buffer. Grabbing blocks if the camera has not finished transmitting - * the next available image. The buffer size is controlled by the - * numBuffers parameter in the FC2Config struct. Note that this mode is - * the equivalent of flycaptureLockNext in earlier versions of the - * FlyCapture SDK. - */ - FC2_BUFFER_FRAMES = 1, - - /** - * Unspecified grab mode. - */ - FC2_UNSPECIFIED_GRAB_MODE = 2, - FC2_GRAB_MODE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Timeout options for grabbing images. */ - /** enum _fc2GrabTimeout */ - public static final int - /** Non-blocking wait. */ - FC2_TIMEOUT_NONE = 0, - /** Wait indefinitely. */ - FC2_TIMEOUT_INFINITE = -1, - /** Unspecified timeout setting. */ - FC2_TIMEOUT_UNSPECIFIED = -2, - FC2_GRAB_TIMEOUT_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Bandwidth allocation options for 1394 devices. */ - /** enum _fc2BandwidthAllocation */ - public static final int - /** Do not allocate bandwidth. */ - FC2_BANDWIDTH_ALLOCATION_OFF = 0, - /** Allocate bandwidth. This is the default setting. */ - FC2_BANDWIDTH_ALLOCATION_ON = 1, - /** - * Bandwidth allocation is not supported by either the camera or - * operating system. - */ - FC2_BANDWIDTH_ALLOCATION_UNSUPPORTED = 2, - /** Not specified. This leaves the current setting unchanged. */ - FC2_BANDWIDTH_ALLOCATION_UNSPECIFIED = 3, - FC2_BANDWIDTH_ALLOCATION_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Interfaces that a camera may use to communicate with a host. */ - /** enum _fc2InterfaceType */ - public static final int - /** IEEE-1394 (Includes 1394a and 1394b). */ - FC2_INTERFACE_IEEE1394 = 0, - /** USB 2.0. */ - FC2_INTERFACE_USB_2 = 1, - /** USB 3.0. */ - FC2_INTERFACE_USB_3 = 2, - /** GigE. */ - FC2_INTERFACE_GIGE = 3, - /** Unknown interface. */ - FC2_INTERFACE_UNKNOWN = 4, - FC2_INTERFACE_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * Camera properties. Not all properties may be supported, depending - * on the camera model. - */ - /** enum _fc2PropertyType */ - public static final int - FC2_BRIGHTNESS = 0, - FC2_AUTO_EXPOSURE = 1, - FC2_SHARPNESS = 2, - FC2_WHITE_BALANCE = 3, - FC2_HUE = 4, - FC2_SATURATION = 5, - FC2_GAMMA = 6, - FC2_IRIS = 7, - FC2_FOCUS = 8, - FC2_ZOOM = 9, - FC2_PAN = 10, - FC2_TILT = 11, - FC2_SHUTTER = 12, - FC2_GAIN = 13, - FC2_TRIGGER_MODE = 14, - FC2_TRIGGER_DELAY = 15, - FC2_FRAME_RATE = 16, - FC2_TEMPERATURE = 17, - FC2_UNSPECIFIED_PROPERTY_TYPE = 18, - FC2_PROPERTY_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Frame rates in frames per second. */ - /** enum _fc2FrameRate */ - public static final int - /** 1.875 fps. */ - FC2_FRAMERATE_1_875 = 0, - /** 3.75 fps. */ - FC2_FRAMERATE_3_75 = 1, - /** 7.5 fps. */ - FC2_FRAMERATE_7_5 = 2, - /** 15 fps. */ - FC2_FRAMERATE_15 = 3, - /** 30 fps. */ - FC2_FRAMERATE_30 = 4, - /** 60 fps. */ - FC2_FRAMERATE_60 = 5, - /** 120 fps. */ - FC2_FRAMERATE_120 = 6, - /** 240 fps. */ - FC2_FRAMERATE_240 = 7, - /** Custom frame rate for Format7 functionality. */ - FC2_FRAMERATE_FORMAT7 = 8, - /** Number of possible camera frame rates. */ - FC2_NUM_FRAMERATES = 9, - FC2_FRAMERATE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** DCAM video modes. */ - /** enum _fc2VideoMode */ - public static final int - /** 160x120 YUV444. */ - FC2_VIDEOMODE_160x120YUV444 = 0, - /** 320x240 YUV422. */ - FC2_VIDEOMODE_320x240YUV422 = 1, - /** 640x480 YUV411. */ - FC2_VIDEOMODE_640x480YUV411 = 2, - /** 640x480 YUV422. */ - FC2_VIDEOMODE_640x480YUV422 = 3, - /** 640x480 24-bit RGB. */ - FC2_VIDEOMODE_640x480RGB = 4, - /** 640x480 8-bit. */ - FC2_VIDEOMODE_640x480Y8 = 5, - /** 640x480 16-bit. */ - FC2_VIDEOMODE_640x480Y16 = 6, - /** 800x600 YUV422. */ - FC2_VIDEOMODE_800x600YUV422 = 7, - /** 800x600 RGB. */ - FC2_VIDEOMODE_800x600RGB = 8, - /** 800x600 8-bit. */ - FC2_VIDEOMODE_800x600Y8 = 9, - /** 800x600 16-bit. */ - FC2_VIDEOMODE_800x600Y16 = 10, - /** 1024x768 YUV422. */ - FC2_VIDEOMODE_1024x768YUV422 = 11, - /** 1024x768 RGB. */ - FC2_VIDEOMODE_1024x768RGB = 12, - /** 1024x768 8-bit. */ - FC2_VIDEOMODE_1024x768Y8 = 13, - /** 1024x768 16-bit. */ - FC2_VIDEOMODE_1024x768Y16 = 14, - /** 1280x960 YUV422. */ - FC2_VIDEOMODE_1280x960YUV422 = 15, - /** 1280x960 RGB. */ - FC2_VIDEOMODE_1280x960RGB = 16, - /** 1280x960 8-bit. */ - FC2_VIDEOMODE_1280x960Y8 = 17, - /** 1280x960 16-bit. */ - FC2_VIDEOMODE_1280x960Y16 = 18, - /** 1600x1200 YUV422. */ - FC2_VIDEOMODE_1600x1200YUV422 = 19, - /** 1600x1200 RGB. */ - FC2_VIDEOMODE_1600x1200RGB = 20, - /** 1600x1200 8-bit. */ - FC2_VIDEOMODE_1600x1200Y8 = 21, - /** 1600x1200 16-bit. */ - FC2_VIDEOMODE_1600x1200Y16 = 22, - /** Custom video mode for Format7 functionality. */ - FC2_VIDEOMODE_FORMAT7 = 23, - /** Number of possible video modes. */ - FC2_NUM_VIDEOMODES = 24, - FC2_VIDEOMODE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Camera modes for DCAM formats as well as Format7. */ - /** enum _fc2Mode */ - public static final int - FC2_MODE_0 = 0, - FC2_MODE_1 = 1, - FC2_MODE_2 = 2, - FC2_MODE_3 = 3, - FC2_MODE_4 = 4, - FC2_MODE_5 = 5, - FC2_MODE_6 = 6, - FC2_MODE_7 = 7, - FC2_MODE_8 = 8, - FC2_MODE_9 = 9, - FC2_MODE_10 = 10, - FC2_MODE_11 = 11, - FC2_MODE_12 = 12, - FC2_MODE_13 = 13, - FC2_MODE_14 = 14, - FC2_MODE_15 = 15, - FC2_MODE_16 = 16, - FC2_MODE_17 = 17, - FC2_MODE_18 = 18, - FC2_MODE_19 = 19, - FC2_MODE_20 = 20, - FC2_MODE_21 = 21, - FC2_MODE_22 = 22, - FC2_MODE_23 = 23, - FC2_MODE_24 = 24, - FC2_MODE_25 = 25, - FC2_MODE_26 = 26, - FC2_MODE_27 = 27, - FC2_MODE_28 = 28, - FC2_MODE_29 = 29, - FC2_MODE_30 = 30, - FC2_MODE_31 = 31, - /** Number of modes */ - FC2_NUM_MODES = 32, - FC2_MODE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Pixel formats available for Format7 modes. */ - /** enum _fc2PixelFormat */ - public static final int - /** 8 bits of mono information. */ - FC2_PIXEL_FORMAT_MONO8 = 0x80000000, - /** YUV 4:1:1. */ - FC2_PIXEL_FORMAT_411YUV8 = 0x40000000, - /** YUV 4:2:2. */ - FC2_PIXEL_FORMAT_422YUV8 = 0x20000000, - /** YUV 4:4:4. */ - FC2_PIXEL_FORMAT_444YUV8 = 0x10000000, - /** R = G = B = 8 bits. */ - FC2_PIXEL_FORMAT_RGB8 = 0x08000000, - /** 16 bits of mono information. */ - FC2_PIXEL_FORMAT_MONO16 = 0x04000000, - /** R = G = B = 16 bits. */ - FC2_PIXEL_FORMAT_RGB16 = 0x02000000, - /** 16 bits of signed mono information. */ - FC2_PIXEL_FORMAT_S_MONO16 = 0x01000000, - /** R = G = B = 16 bits signed. */ - FC2_PIXEL_FORMAT_S_RGB16 = 0x00800000, - /** 8 bit raw data output of sensor. */ - FC2_PIXEL_FORMAT_RAW8 = 0x00400000, - /** 16 bit raw data output of sensor. */ - FC2_PIXEL_FORMAT_RAW16 = 0x00200000, - /** 12 bits of mono information. */ - FC2_PIXEL_FORMAT_MONO12 = 0x00100000, - /** 12 bit raw data output of sensor. */ - FC2_PIXEL_FORMAT_RAW12 = 0x00080000, - /** 24 bit BGR. */ - FC2_PIXEL_FORMAT_BGR = 0x80000008, - /** 32 bit BGRU. */ - FC2_PIXEL_FORMAT_BGRU = 0x40000008, - /** 24 bit RGB. */ - FC2_PIXEL_FORMAT_RGB = FC2_PIXEL_FORMAT_RGB8, - /** 32 bit RGBU. */ - FC2_PIXEL_FORMAT_RGBU = 0x40000002, - /** R = G = B = 16 bits. */ - FC2_PIXEL_FORMAT_BGR16 = 0x02000001, - /** 64 bit BGRU. */ - FC2_PIXEL_FORMAT_BGRU16 = 0x02000002, - /** JPEG compressed stream. */ - FC2_PIXEL_FORMAT_422YUV8_JPEG = 0x40000001, - /** Number of pixel formats. */ - FC2_NUM_PIXEL_FORMATS = 20, - /** Unspecified pixel format. */ - FC2_UNSPECIFIED_PIXEL_FORMAT = 0; - - /** Bus speeds. */ - /** enum _fc2BusSpeed */ - public static final int - /** 100Mbits/sec. */ - FC2_BUSSPEED_S100 = 0, - /** 200Mbits/sec. */ - FC2_BUSSPEED_S200 = 1, - /** 400Mbits/sec. */ - FC2_BUSSPEED_S400 = 2, - /** 480Mbits/sec. Only for USB2 cameras. */ - FC2_BUSSPEED_S480 = 3, - /** 800Mbits/sec. */ - FC2_BUSSPEED_S800 = 4, - /** 1600Mbits/sec. */ - FC2_BUSSPEED_S1600 = 5, - /** 3200Mbits/sec. */ - FC2_BUSSPEED_S3200 = 6, - /** 5000Mbits/sec. Only for USB3 cameras. */ - FC2_BUSSPEED_S5000 = 7, - /** 10Base-T. Only for GigE cameras. */ - FC2_BUSSPEED_10BASE_T = 8, - /** 100Base-T. Only for GigE cameras.*/ - FC2_BUSSPEED_100BASE_T = 9, - /** 1000Base-T (Gigabit Ethernet). Only for GigE cameras. */ - FC2_BUSSPEED_1000BASE_T = 10, - /** 10000Base-T. Only for GigE cameras. */ - FC2_BUSSPEED_10000BASE_T = 11, - /** The fastest speed available. */ - FC2_BUSSPEED_S_FASTEST = 12, - /** Any speed that is available. */ - FC2_BUSSPEED_ANY = 13, - /** Unknown bus speed. */ - FC2_BUSSPEED_SPEED_UNKNOWN = -1, - FC2_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; - - /** enum _fc2PCIeBusSpeed */ - public static final int - FC2_PCIE_BUSSPEED_2_5 = 0, /** 2.5 Gb/s */ - FC2_PCIE_BUSSPEED_5_0 = 1, /** 5.0 Gb/s */ - FC2_PCIE_BUSSPEED_UNKNOWN = -1, /** Speed is unknown */ - FC2_PCIE_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Types of low level drivers that FlyCapture uses. */ - /** enum _fc2DriverType */ - public static final int - /** PGRCam.sys. */ - FC2_DRIVER_1394_CAM = 0, - /** PGR1394.sys. */ - FC2_DRIVER_1394_PRO = 1, - /** firewire_core. */ - FC2_DRIVER_1394_JUJU = 2, - /** video1394. */ - FC2_DRIVER_1394_VIDEO1394 = 3, - /** raw1394. */ - FC2_DRIVER_1394_RAW1394 = 4, - /** No usb driver used just BSD stack. (Linux only) */ - FC2_DRIVER_USB_NONE = 5, - /** PGRUsbCam.sys. */ - FC2_DRIVER_USB_CAM = 6, - /** PGRXHCI.sys. */ - FC2_DRIVER_USB3_PRO = 7, - /** no GigE drivers used, MS/BSD stack. */ - FC2_DRIVER_GIGE_NONE = 8, - /** PGRGigE.sys. */ - FC2_DRIVER_GIGE_FILTER = 9, - /** PGRGigEPro.sys. */ - FC2_DRIVER_GIGE_PRO = 10, - /** PgrLwf.sys. */ - FC2_DRIVER_GIGE_LWF = 11, - /** Unknown driver type. */ - FC2_DRIVER_UNKNOWN = -1, - FC2_DRIVER_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * Color processing algorithms. Please refer to our knowledge base at - * article at http://www.ptgrey.com/support/kb/index.asp?a=4&q=33 for - * complete details for each algorithm. - */ - /** enum _fc2ColorProcessingAlgorithm */ - public static final int - /** Default method. */ - FC2_DEFAULT = 0, - /** No color processing. */ - FC2_NO_COLOR_PROCESSING = 1, - /** - * Fastest but lowest quality. Equivalent to - * FLYCAPTURE_NEAREST_NEIGHBOR_FAST in FlyCapture. - */ - FC2_NEAREST_NEIGHBOR_FAST = 2, - /** Weights surrounding pixels based on localized edge orientation. */ - FC2_EDGE_SENSING = 3, - /** Well-balanced speed and quality. */ - FC2_HQ_LINEAR = 4, - /** Slowest but produces good results. */ - FC2_RIGOROUS = 5, - /** Multithreaded with similar results to edge sensing. */ - FC2_IPP = 6, - /** Best quality but much faster than rigorous. */ - FC2_DIRECTIONAL = 7, - /** Weighted pixel average from different directions*/ - FC2_WEIGHTED_DIRECTIONAL = 8, - FC2_COLOR_PROCESSING_ALGORITHM_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Bayer tile formats. */ - /** enum _fc2BayerTileFormat */ - public static final int - /** No bayer tile format. */ - FC2_BT_NONE = 0, - /** Red-Green-Green-Blue. */ - FC2_BT_RGGB = 1, - /** Green-Red-Blue-Green. */ - FC2_BT_GRBG = 2, - /** Green-Blue-Red-Green. */ - FC2_BT_GBRG = 3, - /** Blue-Green-Green-Red. */ - FC2_BT_BGGR = 4, - FC2_BT_FORCE_32BITS = FULL_32BIT_VALUE; - - /** File formats to be used for saving images to disk. */ - /** enum _fc2ImageFileFormat */ - public static final int - /** Determine file format from file extension. */ - FC2_FROM_FILE_EXT = -1, - /** Portable gray map. */ - FC2_PGM = 0, - /** Portable pixmap. */ - FC2_PPM = 1, - /** Bitmap. */ - FC2_BMP = 2, - /** JPEG. */ - FC2_JPEG = 3, - /** JPEG 2000. */ - FC2_JPEG2000 = 4, - /** Tagged image file format. */ - FC2_TIFF = 5, - /** Portable network graphics. */ - FC2_PNG = 6, - /** Raw data. */ - FC2_RAW = 7, - FC2_IMAGE_FILE_FORMAT_FORCE_32BITS = FULL_32BIT_VALUE; - - /*@}*/ - - /** - * \defgroup CGigEEnums GigE specific enumerations - * - * These enumerations are specific to GigE camera operation only. - */ - - /*@{*/ - - /** Possible properties that can be queried from the camera. */ - /** enum _fc2GigEPropertyType */ - public static final int - FC2_HEARTBEAT = 0, - FC2_HEARTBEAT_TIMEOUT = 1, - PACKET_SIZE = 2, - PACKET_DELAY = 3; - - /*@}*/ - - /** - * Channels that allow statistics to be calculated. - */ - /** enum _fc2StatisticsChannel */ - public static final int - FC2_STATISTICS_GREY = 0, - FC2_STATISTICS_RED = 1, - FC2_STATISTICS_GREEN = 2, - FC2_STATISTICS_BLUE = 3, - FC2_STATISTICS_HUE = 4, - FC2_STATISTICS_SATURATION = 5, - FC2_STATISTICS_LIGHTNESS = 6, - FC2_STATISTICS_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Possible operating systems. */ - /** enum _fc2OSType */ - public static final int - /** All Windows 32-bit variants. */ - FC2_WINDOWS_X86 = 0, - /** All Windows 64-bit variants. */ - FC2_WINDOWS_X64 = 1, - /** All Linux 32-bit variants. */ - FC2_LINUX_X86 = 2, - /** All Linux 32-bit variants. */ - FC2_LINUX_X64 = 3, - /** Mac OSX. */ - FC2_MAC = 4, - /** Unknown operating system. */ - FC2_UNKNOWN_OS = 5, - FC2_OSTYPE_FORCE_32BITS = FULL_32BIT_VALUE; - - /** Possible byte orders. */ - /** enum _fc2ByteOrder */ - public static final int - FC2_BYTE_ORDER_LITTLE_ENDIAN = 0, - FC2_BYTE_ORDER_BIG_ENDIAN = 1, - FC2_BYTE_ORDER_FORCE_32BITS = FULL_32BIT_VALUE; - - /** - * Possible states of a port on a node. - */ - /** enum _fc2PortType */ - public static final int - NOT_CONNECTED = 1, - CONNECTED_TO_PARENT = 2, - CONNECTED_TO_CHILD = 3; - - /** - * Type of node. - */ - /** enum _fc2NodeType */ - public static final int - COMPUTER = 0, - BUS = 1, - CAMERA = 2, - NODE = 3; - - /** - * \defgroup CStructures Structures - */ - - /*@{*/ - - // - // Description: - // An image. It is comparable to the Image class in the C++ library. - // The fields in this structure should be considered read only. - // - public static class fc2Image extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Image() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Image(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Image(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Image position(long position) { - return (fc2Image)super.position(position); - } - - public native @Cast("unsigned int") int rows(); public native fc2Image rows(int rows); - public native @Cast("unsigned int") int cols(); public native fc2Image cols(int cols); - public native @Cast("unsigned int") int stride(); public native fc2Image stride(int stride); - public native @Cast("unsigned char*") BytePointer pData(); public native fc2Image pData(BytePointer pData); - public native @Cast("unsigned int") int dataSize(); public native fc2Image dataSize(int dataSize); - public native @Cast("unsigned int") int receivedDataSize(); public native fc2Image receivedDataSize(int receivedDataSize); - public native @Cast("fc2PixelFormat") int format(); public native fc2Image format(int format); - public native @Cast("fc2BayerTileFormat") int bayerFormat(); public native fc2Image bayerFormat(int bayerFormat); - - public native fc2ImageImpl imageImpl(); public native fc2Image imageImpl(fc2ImageImpl imageImpl); - - } - - /** Description of the system. */ - public static class fc2SystemInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2SystemInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2SystemInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2SystemInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2SystemInfo position(long position) { - return (fc2SystemInfo)super.position(position); - } - - /** Operating system type as described by OSType. */ - public native @Cast("fc2OSType") int osType(); public native fc2SystemInfo osType(int osType); - - /** Detailed description of the operating system. */ - public native @Cast("char") byte osDescription(int i); public native fc2SystemInfo osDescription(int i, byte osDescription); - @MemberGetter public native @Cast("char*") BytePointer osDescription(); - - /** Byte order of the system. */ - public native @Cast("fc2ByteOrder") int byteOrder(); public native fc2SystemInfo byteOrder(int byteOrder); - - /** Amount of memory available on the system. */ - public native @Cast("size_t") long sysMemSize(); public native fc2SystemInfo sysMemSize(long sysMemSize); - - /** Detailed description of the CPU. */ - public native @Cast("char") byte cpuDescription(int i); public native fc2SystemInfo cpuDescription(int i, byte cpuDescription); - @MemberGetter public native @Cast("char*") BytePointer cpuDescription(); - - /** Number of cores on all CPUs on the system. */ - public native @Cast("size_t") long numCpuCores(); public native fc2SystemInfo numCpuCores(long numCpuCores); - - /** List of drivers used. */ - public native @Cast("char") byte driverList(int i); public native fc2SystemInfo driverList(int i, byte driverList); - @MemberGetter public native @Cast("char*") BytePointer driverList(); - - /** List of libraries used. */ - public native @Cast("char") byte libraryList(int i); public native fc2SystemInfo libraryList(int i, byte libraryList); - @MemberGetter public native @Cast("char*") BytePointer libraryList(); - - /** Detailed description of the GPU. */ - public native @Cast("char") byte gpuDescription(int i); public native fc2SystemInfo gpuDescription(int i, byte gpuDescription); - @MemberGetter public native @Cast("char*") BytePointer gpuDescription(); - - /** Screen resolution width in pixels. */ - public native @Cast("size_t") long screenWidth(); public native fc2SystemInfo screenWidth(long screenWidth); - - /** Screen resolution height in pixels. */ - public native @Cast("size_t") long screenHeight(); public native fc2SystemInfo screenHeight(long screenHeight); - - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2SystemInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** The current version of the library. */ - public static class fc2Version extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Version() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Version(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Version(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Version position(long position) { - return (fc2Version)super.position(position); - } - - /** Major version number. */ - public native @Cast("unsigned int") int major(); public native fc2Version major(int major); - /** Minor version number. */ - public native @Cast("unsigned int") int minor(); public native fc2Version minor(int minor); - /** Type version number. */ - public native @Cast("unsigned int") int type(); public native fc2Version type(int type); - /** Build version number. */ - public native @Cast("unsigned int") int build(); public native fc2Version build(int build); - } - - /** - * \defgroup CGigEStructures GigE specific structures - * - * These structures are specific to GigE camera operation only. - */ - - /*@{*/ - - /** IPv4 address. */ - public static class fc2IPAddress extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2IPAddress() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2IPAddress(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2IPAddress(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2IPAddress position(long position) { - return (fc2IPAddress)super.position(position); - } - - public native @Cast("unsigned char") byte octets(int i); public native fc2IPAddress octets(int i, byte octets); - @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); - } - - /** MAC address. */ - public static class fc2MACAddress extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2MACAddress() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2MACAddress(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2MACAddress(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2MACAddress position(long position) { - return (fc2MACAddress)super.position(position); - } - - public native @Cast("unsigned char") byte octets(int i); public native fc2MACAddress octets(int i, byte octets); - @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); - } - - /** A GigE property. */ - public static class fc2GigEProperty extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2GigEProperty() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2GigEProperty(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2GigEProperty(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2GigEProperty position(long position) { - return (fc2GigEProperty)super.position(position); - } - - /** The type of property. */ - public native @Cast("fc2GigEPropertyType") int propType(); public native fc2GigEProperty propType(int propType); - /** - * Whether the property is readable. If this is false, then - * no other value in this structure is valid. - */ - public native @Cast("BOOL") int isReadable(); public native fc2GigEProperty isReadable(int isReadable); - /** Whether the property is writable. */ - public native @Cast("BOOL") int isWritable(); public native fc2GigEProperty isWritable(int isWritable); - /** Minimum value. */ - public native @Cast("unsigned int") int min(); public native fc2GigEProperty min(int min); - /** Maximum value. */ - public native @Cast("unsigned int") int max(); public native fc2GigEProperty max(int max); - /** Current value. */ - public native @Cast("unsigned int") int value(); public native fc2GigEProperty value(int value); - - public native @Cast("unsigned int") int reserved(int i); public native fc2GigEProperty reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /** Information about a single GigE stream channel. */ - public static class fc2GigEStreamChannel extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2GigEStreamChannel() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2GigEStreamChannel(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2GigEStreamChannel(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2GigEStreamChannel position(long position) { - return (fc2GigEStreamChannel)super.position(position); - } - - /** Network interface index used (or to use). */ - public native @Cast("unsigned int") int networkInterfaceIndex(); public native fc2GigEStreamChannel networkInterfaceIndex(int networkInterfaceIndex); - /** Host port on the PC where the camera will send the data stream. */ - public native @Cast("unsigned int") int hostPort(); public native fc2GigEStreamChannel hostPort(int hostPort); - /** Disable IP fragmentation of packets. */ - public native @Cast("BOOL") int doNotFragment(); public native fc2GigEStreamChannel doNotFragment(int doNotFragment); - /** Packet size, in bytes. */ - public native @Cast("unsigned int") int packetSize(); public native fc2GigEStreamChannel packetSize(int packetSize); - /** Inter packet delay, in timestamp counter units. */ - public native @Cast("unsigned int") int interPacketDelay(); public native fc2GigEStreamChannel interPacketDelay(int interPacketDelay); - /** Destination IP address. It can be a multicast or unicast address. */ - public native @ByRef fc2IPAddress destinationIpAddress(); public native fc2GigEStreamChannel destinationIpAddress(fc2IPAddress destinationIpAddress); - /** Source UDP port of the stream channel. Read only. */ - public native @Cast("unsigned int") int sourcePort(); public native fc2GigEStreamChannel sourcePort(int sourcePort); - - public native @Cast("unsigned int") int reserved(int i); public native fc2GigEStreamChannel reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /** - * Configuration for a GigE camera. These options are options that are - * generally should be set before starting isochronous transfer. - */ - public static class fc2GigEConfig extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2GigEConfig() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2GigEConfig(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2GigEConfig(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2GigEConfig position(long position) { - return (fc2GigEConfig)super.position(position); - } - - /** Turn on/off packet resend functionality */ - public native @Cast("BOOL") int enablePacketResend(); public native fc2GigEConfig enablePacketResend(int enablePacketResend); - - /** - * Number of retries to perform when a register read/write timeout - * is received by the library. The default value is 0. - */ - public native @Cast("unsigned int") int registerTimeoutRetries(); public native fc2GigEConfig registerTimeoutRetries(int registerTimeoutRetries); - - /** - * Register read/write timeout value, in microseconds. - * The default value is dependent on the interface type. - */ - public native @Cast("unsigned int") int registerTimeout(); public native fc2GigEConfig registerTimeout(int registerTimeout); - - public native @Cast("unsigned int") int reserved(int i); public native fc2GigEConfig reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /** Format 7 information for a single mode. */ - public static class fc2GigEImageSettingsInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2GigEImageSettingsInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2GigEImageSettingsInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2GigEImageSettingsInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2GigEImageSettingsInfo position(long position) { - return (fc2GigEImageSettingsInfo)super.position(position); - } - - /** Maximum image width. */ - public native @Cast("unsigned int") int maxWidth(); public native fc2GigEImageSettingsInfo maxWidth(int maxWidth); - /** Maximum image height. */ - public native @Cast("unsigned int") int maxHeight(); public native fc2GigEImageSettingsInfo maxHeight(int maxHeight); - /** Horizontal step size for the offset. */ - public native @Cast("unsigned int") int offsetHStepSize(); public native fc2GigEImageSettingsInfo offsetHStepSize(int offsetHStepSize); - /** Vertical step size for the offset. */ - public native @Cast("unsigned int") int offsetVStepSize(); public native fc2GigEImageSettingsInfo offsetVStepSize(int offsetVStepSize); - /** Horizontal step size for the image. */ - public native @Cast("unsigned int") int imageHStepSize(); public native fc2GigEImageSettingsInfo imageHStepSize(int imageHStepSize); - /** Vertical step size for the image. */ - public native @Cast("unsigned int") int imageVStepSize(); public native fc2GigEImageSettingsInfo imageVStepSize(int imageVStepSize); - /** Supported pixel formats in a bit field. */ - public native @Cast("unsigned int") int pixelFormatBitField(); public native fc2GigEImageSettingsInfo pixelFormatBitField(int pixelFormatBitField); - /** Vendor unique pixel formats in a bit field. */ - public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native fc2GigEImageSettingsInfo vendorPixelFormatBitField(int vendorPixelFormatBitField); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2GigEImageSettingsInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /** Image settings for a GigE camera. */ - public static class fc2GigEImageSettings extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2GigEImageSettings() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2GigEImageSettings(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2GigEImageSettings(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2GigEImageSettings position(long position) { - return (fc2GigEImageSettings)super.position(position); - } - - /** Horizontal image offset. */ - public native @Cast("unsigned int") int offsetX(); public native fc2GigEImageSettings offsetX(int offsetX); - /** Vertical image offset. */ - public native @Cast("unsigned int") int offsetY(); public native fc2GigEImageSettings offsetY(int offsetY); - /** Width of image. */ - public native @Cast("unsigned int") int width(); public native fc2GigEImageSettings width(int width); - /** Height of image. */ - public native @Cast("unsigned int") int height(); public native fc2GigEImageSettings height(int height); - /** Pixel format of image. */ - public native @Cast("fc2PixelFormat") int pixelFormat(); public native fc2GigEImageSettings pixelFormat(int pixelFormat); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2GigEImageSettings reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /*@}*/ - - /** - * \defgroup CIIDCStructures IIDC specific structures - * - * These structures are specific to IIDC camera operation only. - */ - - /*@{*/ - - /** Format 7 image settings. */ - public static class fc2Format7ImageSettings extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Format7ImageSettings() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Format7ImageSettings(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Format7ImageSettings(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Format7ImageSettings position(long position) { - return (fc2Format7ImageSettings)super.position(position); - } - - /** Format 7 mode. */ - public native @Cast("fc2Mode") int mode(); public native fc2Format7ImageSettings mode(int mode); - /** Horizontal image offset. */ - public native @Cast("unsigned int") int offsetX(); public native fc2Format7ImageSettings offsetX(int offsetX); - /** Vertical image offset. */ - public native @Cast("unsigned int") int offsetY(); public native fc2Format7ImageSettings offsetY(int offsetY); - /** Width of image. */ - public native @Cast("unsigned int") int width(); public native fc2Format7ImageSettings width(int width); - /** Height of image. */ - public native @Cast("unsigned int") int height(); public native fc2Format7ImageSettings height(int height); - /** Pixel format of image. */ - public native @Cast("fc2PixelFormat") int pixelFormat(); public native fc2Format7ImageSettings pixelFormat(int pixelFormat); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2Format7ImageSettings reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Format 7 information for a single mode. */ - public static class fc2Format7Info extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Format7Info() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Format7Info(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Format7Info(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Format7Info position(long position) { - return (fc2Format7Info)super.position(position); - } - - /** Format 7 mode. */ - public native @Cast("fc2Mode") int mode(); public native fc2Format7Info mode(int mode); - - /** Maximum image width. */ - public native @Cast("unsigned int") int maxWidth(); public native fc2Format7Info maxWidth(int maxWidth); - /** Maximum image height. */ - public native @Cast("unsigned int") int maxHeight(); public native fc2Format7Info maxHeight(int maxHeight); - /** Horizontal step size for the offset. */ - public native @Cast("unsigned int") int offsetHStepSize(); public native fc2Format7Info offsetHStepSize(int offsetHStepSize); - /** Vertical step size for the offset. */ - public native @Cast("unsigned int") int offsetVStepSize(); public native fc2Format7Info offsetVStepSize(int offsetVStepSize); - /** Horizontal step size for the image. */ - public native @Cast("unsigned int") int imageHStepSize(); public native fc2Format7Info imageHStepSize(int imageHStepSize); - /** Vertical step size for the image. */ - public native @Cast("unsigned int") int imageVStepSize(); public native fc2Format7Info imageVStepSize(int imageVStepSize); - /** Supported pixel formats in a bit field. */ - public native @Cast("unsigned int") int pixelFormatBitField(); public native fc2Format7Info pixelFormatBitField(int pixelFormatBitField); - /** Vendor unique pixel formats in a bit field. */ - public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native fc2Format7Info vendorPixelFormatBitField(int vendorPixelFormatBitField); - /** Current packet size in bytes. */ - public native @Cast("unsigned int") int packetSize(); public native fc2Format7Info packetSize(int packetSize); - /** Minimum packet size in bytes for current mode. */ - public native @Cast("unsigned int") int minPacketSize(); public native fc2Format7Info minPacketSize(int minPacketSize); - /** Maximum packet size in bytes for current mode. */ - public native @Cast("unsigned int") int maxPacketSize(); public native fc2Format7Info maxPacketSize(int maxPacketSize); - /** Current packet size as a percentage of maximum packet size. */ - public native float percentage(); public native fc2Format7Info percentage(float percentage); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2Format7Info reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Format 7 packet information. */ - public static class fc2Format7PacketInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Format7PacketInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Format7PacketInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Format7PacketInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Format7PacketInfo position(long position) { - return (fc2Format7PacketInfo)super.position(position); - } - - /** Recommended bytes per packet. */ - public native @Cast("unsigned int") int recommendedBytesPerPacket(); public native fc2Format7PacketInfo recommendedBytesPerPacket(int recommendedBytesPerPacket); - /** Maximum bytes per packet. */ - public native @Cast("unsigned int") int maxBytesPerPacket(); public native fc2Format7PacketInfo maxBytesPerPacket(int maxBytesPerPacket); - /** Minimum bytes per packet. */ - public native @Cast("unsigned int") int unitBytesPerPacket(); public native fc2Format7PacketInfo unitBytesPerPacket(int unitBytesPerPacket); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2Format7PacketInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } + /** + * A context to the FlyCapture2 C library. It must be created before + * performing any calls to the library. + */ + @Namespace @Name("void") @Opaque public static class fc2Context extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public fc2Context() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Context(Pointer p) { super(p); } + } + + /** + * A context to the FlyCapture2 C GUI library. It must be created before + * performing any calls to the library. + */ + @Namespace @Name("void") @Opaque public static class fc2GuiContext extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public fc2GuiContext() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2GuiContext(Pointer p) { super(p); } + } + + /** + * An internal pointer used in the fc2Image structure. + */ + @Namespace @Name("void") @Opaque public static class fc2ImageImpl extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public fc2ImageImpl() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2ImageImpl(Pointer p) { super(p); } + } + + /** + * A context referring to the ImageStatistics object. + */ + @Namespace @Name("void") @Opaque public static class fc2ImageStatisticsContext extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public fc2ImageStatisticsContext() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2ImageStatisticsContext(Pointer p) { super(p); } + } + + /** + * A context referring to the TopologyNode object. + */ + @Namespace @Name("void") @Opaque public static class fc2TopologyNodeContext extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public fc2TopologyNodeContext() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2TopologyNodeContext(Pointer p) { super(p); } + } + + /** + * A GUID to the camera. It is used to uniquely identify a camera. + */ + public static class fc2PGRGuid extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2PGRGuid() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2PGRGuid(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2PGRGuid(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2PGRGuid position(long position) { + return (fc2PGRGuid)super.position(position); + } + + public native @Cast("unsigned int") int value(int i); public native fc2PGRGuid value(int i, int value); + @MemberGetter public native @Cast("unsigned int*") IntPointer value(); + + } + + /*@}*/ + + /** + * \defgroup CEnumerations Enumerations + */ + + /*@{*/ + + /** The error types returned by functions. */ + /** enum _fc2Error */ + public static final int + /** Undefined */ + FC2_ERROR_UNDEFINED = -1, + /** Function returned with no errors. */ + FC2_ERROR_OK = 0, + /** General failure. */ + FC2_ERROR_FAILED = 1, + /** Function has not been implemented. */ + FC2_ERROR_NOT_IMPLEMENTED = 2, + /** Could not connect to Bus Master. */ + FC2_ERROR_FAILED_BUS_MASTER_CONNECTION = 3, + /** Camera has not been connected. */ + FC2_ERROR_NOT_CONNECTED = 4, + /** Initialization failed. */ + FC2_ERROR_INIT_FAILED = 5, + /** Camera has not been initialized. */ + FC2_ERROR_NOT_INTITIALIZED = 6, + /** Invalid parameter passed to function. */ + FC2_ERROR_INVALID_PARAMETER = 7, + /** Setting set to camera is invalid. */ + FC2_ERROR_INVALID_SETTINGS = 8, + /** Invalid Bus Manager object. */ + FC2_ERROR_INVALID_BUS_MANAGER = 9, + /** Could not allocate memory. */ + FC2_ERROR_MEMORY_ALLOCATION_FAILED = 10, + /** Low level error. */ + FC2_ERROR_LOW_LEVEL_FAILURE = 11, + /** Device not found. */ + FC2_ERROR_NOT_FOUND = 12, + /** GUID failure. */ + FC2_ERROR_FAILED_GUID = 13, + /** Packet size set to camera is invalid. */ + FC2_ERROR_INVALID_PACKET_SIZE = 14, + /** Invalid mode has been passed to function. */ + FC2_ERROR_INVALID_MODE = 15, + /** Error due to not being in Format7. */ + FC2_ERROR_NOT_IN_FORMAT7 = 16, + /** This feature is unsupported. */ + FC2_ERROR_NOT_SUPPORTED = 17, + /** Timeout error. */ + FC2_ERROR_TIMEOUT = 18, + /** Bus Master Failure. */ + FC2_ERROR_BUS_MASTER_FAILED = 19, + /** Generation Count Mismatch. */ + FC2_ERROR_INVALID_GENERATION = 20, + /** Look Up Table failure. */ + FC2_ERROR_LUT_FAILED = 21, + /** IIDC failure. */ + FC2_ERROR_IIDC_FAILED = 22, + /** Strobe failure. */ + FC2_ERROR_STROBE_FAILED = 23, + /** Trigger failure. */ + FC2_ERROR_TRIGGER_FAILED = 24, + /** Property failure. */ + FC2_ERROR_PROPERTY_FAILED = 25, + /** Property is not present. */ + FC2_ERROR_PROPERTY_NOT_PRESENT = 26, + /** Register access failed. */ + FC2_ERROR_REGISTER_FAILED = 27, + /** Register read failed. */ + FC2_ERROR_READ_REGISTER_FAILED = 28, + /** Register write failed. */ + FC2_ERROR_WRITE_REGISTER_FAILED = 29, + /** Isochronous failure. */ + FC2_ERROR_ISOCH_FAILED = 30, + /** Isochronous transfer has already been started. */ + FC2_ERROR_ISOCH_ALREADY_STARTED = 31, + /** Isochronous transfer has not been started. */ + FC2_ERROR_ISOCH_NOT_STARTED = 32, + /** Isochronous start failed. */ + FC2_ERROR_ISOCH_START_FAILED = 33, + /** Isochronous retrieve buffer failed. */ + FC2_ERROR_ISOCH_RETRIEVE_BUFFER_FAILED = 34, + /** Isochronous stop failed. */ + FC2_ERROR_ISOCH_STOP_FAILED = 35, + /** Isochronous image synchronization failed. */ + FC2_ERROR_ISOCH_SYNC_FAILED = 36, + /** Isochronous bandwidth exceeded. */ + FC2_ERROR_ISOCH_BANDWIDTH_EXCEEDED = 37, + /** Image conversion failed. */ + FC2_ERROR_IMAGE_CONVERSION_FAILED = 38, + /** Image library failure. */ + FC2_ERROR_IMAGE_LIBRARY_FAILURE = 39, + /** Buffer is too small. */ + FC2_ERROR_BUFFER_TOO_SMALL = 40, + /** There is an image consistency error. */ + FC2_ERROR_IMAGE_CONSISTENCY_ERROR = 41, + /** The installed driver is not compatible with the library. */ + FC2_ERROR_INCOMPATIBLE_DRIVER = 42, + FC2_ERROR_FORCE_32BITS = FULL_32BIT_VALUE; + + /** The type of bus callback to register a callback function for. */ + /** enum _fc2BusCallbackType */ + public static final int + /** Register for all bus events. */ + FC2_BUS_RESET = 0, + /** Register for arrivals only. */ + FC2_ARRIVAL = 1, + /** Register for removals only. */ + FC2_REMOVAL = 2, + FC2_CALLBACK_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * The grab strategy employed during image transfer. This type controls + * how images that stream off the camera accumulate in a user buffer + * for handling. + */ + /* + @remark Unlike earlier versions of the FlyCapture SDK, it is no longer + * necessary to explicitly start the image grabbing process before + * specifying an image grabbing mode. + */ + /** enum _fc2GrabMode */ + public static final int + /** + * Grabs the newest image in the user buffer each time the + * RetrieveBuffer() function is called. Older images are dropped + * instead of accumulating in the user buffer. Grabbing blocks if the + * camera has not finished transmitting the next available image. If + * the camera is transmitting images faster than the application can + * grab them, images may be dropped and only the most recent image + * is stored for grabbing. Note that this mode is the equivalent of + * flycaptureLockLatest in earlier versions of the FlyCapture SDK. + */ + FC2_DROP_FRAMES = 0, + + /** + * Images accumulate in the user buffer, and the oldest image is + * grabbed for handling before being discarded. This member can be + * used to guarantee that each image is seen. However, image processing + * time must not exceed transmission time from the camera to the + * buffer. Grabbing blocks if the camera has not finished transmitting + * the next available image. The buffer size is controlled by the + * numBuffers parameter in the FC2Config struct. Note that this mode is + * the equivalent of flycaptureLockNext in earlier versions of the + * FlyCapture SDK. + */ + FC2_BUFFER_FRAMES = 1, - /*@}*/ + /** + * Unspecified grab mode. + */ + FC2_UNSPECIFIED_GRAB_MODE = 2, + FC2_GRAB_MODE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Timeout options for grabbing images. */ + /** enum _fc2GrabTimeout */ + public static final int + /** Non-blocking wait. */ + FC2_TIMEOUT_NONE = 0, + /** Wait indefinitely. */ + FC2_TIMEOUT_INFINITE = -1, + /** Unspecified timeout setting. */ + FC2_TIMEOUT_UNSPECIFIED = -2, + FC2_GRAB_TIMEOUT_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Bandwidth allocation options for 1394 devices. */ + /** enum _fc2BandwidthAllocation */ + public static final int + /** Do not allocate bandwidth. */ + FC2_BANDWIDTH_ALLOCATION_OFF = 0, + /** Allocate bandwidth. This is the default setting. */ + FC2_BANDWIDTH_ALLOCATION_ON = 1, + /** + * Bandwidth allocation is not supported by either the camera or + * operating system. + */ + FC2_BANDWIDTH_ALLOCATION_UNSUPPORTED = 2, + /** Not specified. This leaves the current setting unchanged. */ + FC2_BANDWIDTH_ALLOCATION_UNSPECIFIED = 3, + FC2_BANDWIDTH_ALLOCATION_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Interfaces that a camera may use to communicate with a host. */ + /** enum _fc2InterfaceType */ + public static final int + /** IEEE-1394 (Includes 1394a and 1394b). */ + FC2_INTERFACE_IEEE1394 = 0, + /** USB 2.0. */ + FC2_INTERFACE_USB_2 = 1, + /** USB 3.0. */ + FC2_INTERFACE_USB_3 = 2, + /** GigE. */ + FC2_INTERFACE_GIGE = 3, + /** Unknown interface. */ + FC2_INTERFACE_UNKNOWN = 4, + FC2_INTERFACE_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * Camera properties. Not all properties may be supported, depending + * on the camera model. + */ + /** enum _fc2PropertyType */ + public static final int + FC2_BRIGHTNESS = 0, + FC2_AUTO_EXPOSURE = 1, + FC2_SHARPNESS = 2, + FC2_WHITE_BALANCE = 3, + FC2_HUE = 4, + FC2_SATURATION = 5, + FC2_GAMMA = 6, + FC2_IRIS = 7, + FC2_FOCUS = 8, + FC2_ZOOM = 9, + FC2_PAN = 10, + FC2_TILT = 11, + FC2_SHUTTER = 12, + FC2_GAIN = 13, + FC2_TRIGGER_MODE = 14, + FC2_TRIGGER_DELAY = 15, + FC2_FRAME_RATE = 16, + FC2_TEMPERATURE = 17, + FC2_UNSPECIFIED_PROPERTY_TYPE = 18, + FC2_PROPERTY_TYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Frame rates in frames per second. */ + /** enum _fc2FrameRate */ + public static final int + /** 1.875 fps. */ + FC2_FRAMERATE_1_875 = 0, + /** 3.75 fps. */ + FC2_FRAMERATE_3_75 = 1, + /** 7.5 fps. */ + FC2_FRAMERATE_7_5 = 2, + /** 15 fps. */ + FC2_FRAMERATE_15 = 3, + /** 30 fps. */ + FC2_FRAMERATE_30 = 4, + /** 60 fps. */ + FC2_FRAMERATE_60 = 5, + /** 120 fps. */ + FC2_FRAMERATE_120 = 6, + /** 240 fps. */ + FC2_FRAMERATE_240 = 7, + /** Custom frame rate for Format7 functionality. */ + FC2_FRAMERATE_FORMAT7 = 8, + /** Number of possible camera frame rates. */ + FC2_NUM_FRAMERATES = 9, + FC2_FRAMERATE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** DCAM video modes. */ + /** enum _fc2VideoMode */ + public static final int + /** 160x120 YUV444. */ + FC2_VIDEOMODE_160x120YUV444 = 0, + /** 320x240 YUV422. */ + FC2_VIDEOMODE_320x240YUV422 = 1, + /** 640x480 YUV411. */ + FC2_VIDEOMODE_640x480YUV411 = 2, + /** 640x480 YUV422. */ + FC2_VIDEOMODE_640x480YUV422 = 3, + /** 640x480 24-bit RGB. */ + FC2_VIDEOMODE_640x480RGB = 4, + /** 640x480 8-bit. */ + FC2_VIDEOMODE_640x480Y8 = 5, + /** 640x480 16-bit. */ + FC2_VIDEOMODE_640x480Y16 = 6, + /** 800x600 YUV422. */ + FC2_VIDEOMODE_800x600YUV422 = 7, + /** 800x600 RGB. */ + FC2_VIDEOMODE_800x600RGB = 8, + /** 800x600 8-bit. */ + FC2_VIDEOMODE_800x600Y8 = 9, + /** 800x600 16-bit. */ + FC2_VIDEOMODE_800x600Y16 = 10, + /** 1024x768 YUV422. */ + FC2_VIDEOMODE_1024x768YUV422 = 11, + /** 1024x768 RGB. */ + FC2_VIDEOMODE_1024x768RGB = 12, + /** 1024x768 8-bit. */ + FC2_VIDEOMODE_1024x768Y8 = 13, + /** 1024x768 16-bit. */ + FC2_VIDEOMODE_1024x768Y16 = 14, + /** 1280x960 YUV422. */ + FC2_VIDEOMODE_1280x960YUV422 = 15, + /** 1280x960 RGB. */ + FC2_VIDEOMODE_1280x960RGB = 16, + /** 1280x960 8-bit. */ + FC2_VIDEOMODE_1280x960Y8 = 17, + /** 1280x960 16-bit. */ + FC2_VIDEOMODE_1280x960Y16 = 18, + /** 1600x1200 YUV422. */ + FC2_VIDEOMODE_1600x1200YUV422 = 19, + /** 1600x1200 RGB. */ + FC2_VIDEOMODE_1600x1200RGB = 20, + /** 1600x1200 8-bit. */ + FC2_VIDEOMODE_1600x1200Y8 = 21, + /** 1600x1200 16-bit. */ + FC2_VIDEOMODE_1600x1200Y16 = 22, + /** Custom video mode for Format7 functionality. */ + FC2_VIDEOMODE_FORMAT7 = 23, + /** Number of possible video modes. */ + FC2_NUM_VIDEOMODES = 24, + FC2_VIDEOMODE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Camera modes for DCAM formats as well as Format7. */ + /** enum _fc2Mode */ + public static final int + FC2_MODE_0 = 0, + FC2_MODE_1 = 1, + FC2_MODE_2 = 2, + FC2_MODE_3 = 3, + FC2_MODE_4 = 4, + FC2_MODE_5 = 5, + FC2_MODE_6 = 6, + FC2_MODE_7 = 7, + FC2_MODE_8 = 8, + FC2_MODE_9 = 9, + FC2_MODE_10 = 10, + FC2_MODE_11 = 11, + FC2_MODE_12 = 12, + FC2_MODE_13 = 13, + FC2_MODE_14 = 14, + FC2_MODE_15 = 15, + FC2_MODE_16 = 16, + FC2_MODE_17 = 17, + FC2_MODE_18 = 18, + FC2_MODE_19 = 19, + FC2_MODE_20 = 20, + FC2_MODE_21 = 21, + FC2_MODE_22 = 22, + FC2_MODE_23 = 23, + FC2_MODE_24 = 24, + FC2_MODE_25 = 25, + FC2_MODE_26 = 26, + FC2_MODE_27 = 27, + FC2_MODE_28 = 28, + FC2_MODE_29 = 29, + FC2_MODE_30 = 30, + FC2_MODE_31 = 31, + /** Number of modes */ + FC2_NUM_MODES = 32, + FC2_MODE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Pixel formats available for Format7 modes. */ + /** enum _fc2PixelFormat */ + public static final int + /** 8 bits of mono information. */ + FC2_PIXEL_FORMAT_MONO8 = 0x80000000, + /** YUV 4:1:1. */ + FC2_PIXEL_FORMAT_411YUV8 = 0x40000000, + /** YUV 4:2:2. */ + FC2_PIXEL_FORMAT_422YUV8 = 0x20000000, + /** YUV 4:4:4. */ + FC2_PIXEL_FORMAT_444YUV8 = 0x10000000, + /** R = G = B = 8 bits. */ + FC2_PIXEL_FORMAT_RGB8 = 0x08000000, + /** 16 bits of mono information. */ + FC2_PIXEL_FORMAT_MONO16 = 0x04000000, + /** R = G = B = 16 bits. */ + FC2_PIXEL_FORMAT_RGB16 = 0x02000000, + /** 16 bits of signed mono information. */ + FC2_PIXEL_FORMAT_S_MONO16 = 0x01000000, + /** R = G = B = 16 bits signed. */ + FC2_PIXEL_FORMAT_S_RGB16 = 0x00800000, + /** 8 bit raw data output of sensor. */ + FC2_PIXEL_FORMAT_RAW8 = 0x00400000, + /** 16 bit raw data output of sensor. */ + FC2_PIXEL_FORMAT_RAW16 = 0x00200000, + /** 12 bits of mono information. */ + FC2_PIXEL_FORMAT_MONO12 = 0x00100000, + /** 12 bit raw data output of sensor. */ + FC2_PIXEL_FORMAT_RAW12 = 0x00080000, + /** 24 bit BGR. */ + FC2_PIXEL_FORMAT_BGR = 0x80000008, + /** 32 bit BGRU. */ + FC2_PIXEL_FORMAT_BGRU = 0x40000008, + /** 24 bit RGB. */ + FC2_PIXEL_FORMAT_RGB = FC2_PIXEL_FORMAT_RGB8, + /** 32 bit RGBU. */ + FC2_PIXEL_FORMAT_RGBU = 0x40000002, + /** R = G = B = 16 bits. */ + FC2_PIXEL_FORMAT_BGR16 = 0x02000001, + /** 64 bit BGRU. */ + FC2_PIXEL_FORMAT_BGRU16 = 0x02000002, + /** JPEG compressed stream. */ + FC2_PIXEL_FORMAT_422YUV8_JPEG = 0x40000001, + /** Number of pixel formats. */ + FC2_NUM_PIXEL_FORMATS = 20, + /** Unspecified pixel format. */ + FC2_UNSPECIFIED_PIXEL_FORMAT = 0; + + /** Bus speeds. */ + /** enum _fc2BusSpeed */ + public static final int + /** 100Mbits/sec. */ + FC2_BUSSPEED_S100 = 0, + /** 200Mbits/sec. */ + FC2_BUSSPEED_S200 = 1, + /** 400Mbits/sec. */ + FC2_BUSSPEED_S400 = 2, + /** 480Mbits/sec. Only for USB2 cameras. */ + FC2_BUSSPEED_S480 = 3, + /** 800Mbits/sec. */ + FC2_BUSSPEED_S800 = 4, + /** 1600Mbits/sec. */ + FC2_BUSSPEED_S1600 = 5, + /** 3200Mbits/sec. */ + FC2_BUSSPEED_S3200 = 6, + /** 5000Mbits/sec. Only for USB3 cameras. */ + FC2_BUSSPEED_S5000 = 7, + /** 10Base-T. Only for GigE cameras. */ + FC2_BUSSPEED_10BASE_T = 8, + /** 100Base-T. Only for GigE cameras.*/ + FC2_BUSSPEED_100BASE_T = 9, + /** 1000Base-T (Gigabit Ethernet). Only for GigE cameras. */ + FC2_BUSSPEED_1000BASE_T = 10, + /** 10000Base-T. Only for GigE cameras. */ + FC2_BUSSPEED_10000BASE_T = 11, + /** The fastest speed available. */ + FC2_BUSSPEED_S_FASTEST = 12, + /** Any speed that is available. */ + FC2_BUSSPEED_ANY = 13, + /** Unknown bus speed. */ + FC2_BUSSPEED_SPEED_UNKNOWN = -1, + FC2_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; + + /** enum _fc2PCIeBusSpeed */ + public static final int + FC2_PCIE_BUSSPEED_2_5 = 0, /** 2.5 Gb/s */ + FC2_PCIE_BUSSPEED_5_0 = 1, /** 5.0 Gb/s */ + FC2_PCIE_BUSSPEED_UNKNOWN = -1, /** Speed is unknown */ + FC2_PCIE_BUSSPEED_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Types of low level drivers that FlyCapture uses. */ + /** enum _fc2DriverType */ + public static final int + /** PGRCam.sys. */ + FC2_DRIVER_1394_CAM = 0, + /** PGR1394.sys. */ + FC2_DRIVER_1394_PRO = 1, + /** firewire_core. */ + FC2_DRIVER_1394_JUJU = 2, + /** video1394. */ + FC2_DRIVER_1394_VIDEO1394 = 3, + /** raw1394. */ + FC2_DRIVER_1394_RAW1394 = 4, + /** No usb driver used just BSD stack. (Linux only) */ + FC2_DRIVER_USB_NONE = 5, + /** PGRUsbCam.sys. */ + FC2_DRIVER_USB_CAM = 6, + /** PGRXHCI.sys. */ + FC2_DRIVER_USB3_PRO = 7, + /** no GigE drivers used, MS/BSD stack. */ + FC2_DRIVER_GIGE_NONE = 8, + /** PGRGigE.sys. */ + FC2_DRIVER_GIGE_FILTER = 9, + /** PGRGigEPro.sys. */ + FC2_DRIVER_GIGE_PRO = 10, + /** PgrLwf.sys. */ + FC2_DRIVER_GIGE_LWF = 11, + /** Unknown driver type. */ + FC2_DRIVER_UNKNOWN = -1, + FC2_DRIVER_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * Color processing algorithms. Please refer to our knowledge base at + * article at http://www.ptgrey.com/support/kb/index.asp?a=4&q=33 for + * complete details for each algorithm. + */ + /** enum _fc2ColorProcessingAlgorithm */ + public static final int + /** Default method. */ + FC2_DEFAULT = 0, + /** No color processing. */ + FC2_NO_COLOR_PROCESSING = 1, + /** + * Fastest but lowest quality. Equivalent to + * FLYCAPTURE_NEAREST_NEIGHBOR_FAST in FlyCapture. + */ + FC2_NEAREST_NEIGHBOR_FAST = 2, + /** Weights surrounding pixels based on localized edge orientation. */ + FC2_EDGE_SENSING = 3, + /** Well-balanced speed and quality. */ + FC2_HQ_LINEAR = 4, + /** Slowest but produces good results. */ + FC2_RIGOROUS = 5, + /** Multithreaded with similar results to edge sensing. */ + FC2_IPP = 6, + /** Best quality but much faster than rigorous. */ + FC2_DIRECTIONAL = 7, + /** Weighted pixel average from different directions*/ + FC2_WEIGHTED_DIRECTIONAL = 8, + FC2_COLOR_PROCESSING_ALGORITHM_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Bayer tile formats. */ + /** enum _fc2BayerTileFormat */ + public static final int + /** No bayer tile format. */ + FC2_BT_NONE = 0, + /** Red-Green-Green-Blue. */ + FC2_BT_RGGB = 1, + /** Green-Red-Blue-Green. */ + FC2_BT_GRBG = 2, + /** Green-Blue-Red-Green. */ + FC2_BT_GBRG = 3, + /** Blue-Green-Green-Red. */ + FC2_BT_BGGR = 4, + FC2_BT_FORCE_32BITS = FULL_32BIT_VALUE; + + /** File formats to be used for saving images to disk. */ + /** enum _fc2ImageFileFormat */ + public static final int + /** Determine file format from file extension. */ + FC2_FROM_FILE_EXT = -1, + /** Portable gray map. */ + FC2_PGM = 0, + /** Portable pixmap. */ + FC2_PPM = 1, + /** Bitmap. */ + FC2_BMP = 2, + /** JPEG. */ + FC2_JPEG = 3, + /** JPEG 2000. */ + FC2_JPEG2000 = 4, + /** Tagged image file format. */ + FC2_TIFF = 5, + /** Portable network graphics. */ + FC2_PNG = 6, + /** Raw data. */ + FC2_RAW = 7, + FC2_IMAGE_FILE_FORMAT_FORCE_32BITS = FULL_32BIT_VALUE; + + /*@}*/ + + /** + * \defgroup CGigEEnums GigE specific enumerations + * + * These enumerations are specific to GigE camera operation only. + */ + + /*@{*/ + + /** Possible properties that can be queried from the camera. */ + /** enum _fc2GigEPropertyType */ + public static final int + FC2_HEARTBEAT = 0, + FC2_HEARTBEAT_TIMEOUT = 1, + PACKET_SIZE = 2, + PACKET_DELAY = 3; + + /*@}*/ + + /** + * Channels that allow statistics to be calculated. + */ + /** enum _fc2StatisticsChannel */ + public static final int + FC2_STATISTICS_GREY = 0, + FC2_STATISTICS_RED = 1, + FC2_STATISTICS_GREEN = 2, + FC2_STATISTICS_BLUE = 3, + FC2_STATISTICS_HUE = 4, + FC2_STATISTICS_SATURATION = 5, + FC2_STATISTICS_LIGHTNESS = 6, + FC2_STATISTICS_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Possible operating systems. */ + /** enum _fc2OSType */ + public static final int + /** All Windows 32-bit variants. */ + FC2_WINDOWS_X86 = 0, + /** All Windows 64-bit variants. */ + FC2_WINDOWS_X64 = 1, + /** All Linux 32-bit variants. */ + FC2_LINUX_X86 = 2, + /** All Linux 32-bit variants. */ + FC2_LINUX_X64 = 3, + /** Mac OSX. */ + FC2_MAC = 4, + /** Unknown operating system. */ + FC2_UNKNOWN_OS = 5, + FC2_OSTYPE_FORCE_32BITS = FULL_32BIT_VALUE; + + /** Possible byte orders. */ + /** enum _fc2ByteOrder */ + public static final int + FC2_BYTE_ORDER_LITTLE_ENDIAN = 0, + FC2_BYTE_ORDER_BIG_ENDIAN = 1, + FC2_BYTE_ORDER_FORCE_32BITS = FULL_32BIT_VALUE; + + /** + * Possible states of a port on a node. + */ + /** enum _fc2PortType */ + public static final int + NOT_CONNECTED = 1, + CONNECTED_TO_PARENT = 2, + CONNECTED_TO_CHILD = 3; + + /** + * Type of node. + */ + /** enum _fc2NodeType */ + public static final int + COMPUTER = 0, + BUS = 1, + CAMERA = 2, + NODE = 3; + + /** + * \defgroup CStructures Structures + */ + + /*@{*/ + + // + // Description: + // An image. It is comparable to the Image class in the C++ library. + // The fields in this structure should be considered read only. + // + public static class fc2Image extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Image() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Image(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Image(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Image position(long position) { + return (fc2Image)super.position(position); + } + + public native @Cast("unsigned int") int rows(); public native fc2Image rows(int rows); + public native @Cast("unsigned int") int cols(); public native fc2Image cols(int cols); + public native @Cast("unsigned int") int stride(); public native fc2Image stride(int stride); + public native @Cast("unsigned char*") BytePointer pData(); public native fc2Image pData(BytePointer pData); + public native @Cast("unsigned int") int dataSize(); public native fc2Image dataSize(int dataSize); + public native @Cast("unsigned int") int receivedDataSize(); public native fc2Image receivedDataSize(int receivedDataSize); + public native @Cast("fc2PixelFormat") int format(); public native fc2Image format(int format); + public native @Cast("fc2BayerTileFormat") int bayerFormat(); public native fc2Image bayerFormat(int bayerFormat); + + public native fc2ImageImpl imageImpl(); public native fc2Image imageImpl(fc2ImageImpl imageImpl); + + } + + /** Description of the system. */ + public static class fc2SystemInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2SystemInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2SystemInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2SystemInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2SystemInfo position(long position) { + return (fc2SystemInfo)super.position(position); + } + + /** Operating system type as described by OSType. */ + public native @Cast("fc2OSType") int osType(); public native fc2SystemInfo osType(int osType); + + /** Detailed description of the operating system. */ + public native @Cast("char") byte osDescription(int i); public native fc2SystemInfo osDescription(int i, byte osDescription); + @MemberGetter public native @Cast("char*") BytePointer osDescription(); + + /** Byte order of the system. */ + public native @Cast("fc2ByteOrder") int byteOrder(); public native fc2SystemInfo byteOrder(int byteOrder); + + /** Amount of memory available on the system. */ + public native @Cast("size_t") long sysMemSize(); public native fc2SystemInfo sysMemSize(long sysMemSize); + + /** Detailed description of the CPU. */ + public native @Cast("char") byte cpuDescription(int i); public native fc2SystemInfo cpuDescription(int i, byte cpuDescription); + @MemberGetter public native @Cast("char*") BytePointer cpuDescription(); + + /** Number of cores on all CPUs on the system. */ + public native @Cast("size_t") long numCpuCores(); public native fc2SystemInfo numCpuCores(long numCpuCores); + + /** List of drivers used. */ + public native @Cast("char") byte driverList(int i); public native fc2SystemInfo driverList(int i, byte driverList); + @MemberGetter public native @Cast("char*") BytePointer driverList(); + + /** List of libraries used. */ + public native @Cast("char") byte libraryList(int i); public native fc2SystemInfo libraryList(int i, byte libraryList); + @MemberGetter public native @Cast("char*") BytePointer libraryList(); + + /** Detailed description of the GPU. */ + public native @Cast("char") byte gpuDescription(int i); public native fc2SystemInfo gpuDescription(int i, byte gpuDescription); + @MemberGetter public native @Cast("char*") BytePointer gpuDescription(); + + /** Screen resolution width in pixels. */ + public native @Cast("size_t") long screenWidth(); public native fc2SystemInfo screenWidth(long screenWidth); + + /** Screen resolution height in pixels. */ + public native @Cast("size_t") long screenHeight(); public native fc2SystemInfo screenHeight(long screenHeight); + + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2SystemInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** The current version of the library. */ + public static class fc2Version extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Version() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Version(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Version(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Version position(long position) { + return (fc2Version)super.position(position); + } + + /** Major version number. */ + public native @Cast("unsigned int") int major(); public native fc2Version major(int major); + /** Minor version number. */ + public native @Cast("unsigned int") int minor(); public native fc2Version minor(int minor); + /** Type version number. */ + public native @Cast("unsigned int") int type(); public native fc2Version type(int type); + /** Build version number. */ + public native @Cast("unsigned int") int build(); public native fc2Version build(int build); + } + + /** + * \defgroup CGigEStructures GigE specific structures + * + * These structures are specific to GigE camera operation only. + */ + + /*@{*/ + + /** IPv4 address. */ + public static class fc2IPAddress extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2IPAddress() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2IPAddress(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2IPAddress(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2IPAddress position(long position) { + return (fc2IPAddress)super.position(position); + } + + public native @Cast("unsigned char") byte octets(int i); public native fc2IPAddress octets(int i, byte octets); + @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); + } + + /** MAC address. */ + public static class fc2MACAddress extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2MACAddress() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2MACAddress(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2MACAddress(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2MACAddress position(long position) { + return (fc2MACAddress)super.position(position); + } + + public native @Cast("unsigned char") byte octets(int i); public native fc2MACAddress octets(int i, byte octets); + @MemberGetter public native @Cast("unsigned char*") BytePointer octets(); + } + + /** A GigE property. */ + public static class fc2GigEProperty extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2GigEProperty() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2GigEProperty(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2GigEProperty(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2GigEProperty position(long position) { + return (fc2GigEProperty)super.position(position); + } + + /** The type of property. */ + public native @Cast("fc2GigEPropertyType") int propType(); public native fc2GigEProperty propType(int propType); + /** + * Whether the property is readable. If this is false, then + * no other value in this structure is valid. + */ + public native @Cast("BOOL") int isReadable(); public native fc2GigEProperty isReadable(int isReadable); + /** Whether the property is writable. */ + public native @Cast("BOOL") int isWritable(); public native fc2GigEProperty isWritable(int isWritable); + /** Minimum value. */ + public native @Cast("unsigned int") int min(); public native fc2GigEProperty min(int min); + /** Maximum value. */ + public native @Cast("unsigned int") int max(); public native fc2GigEProperty max(int max); + /** Current value. */ + public native @Cast("unsigned int") int value(); public native fc2GigEProperty value(int value); + + public native @Cast("unsigned int") int reserved(int i); public native fc2GigEProperty reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + /** Information about a single GigE stream channel. */ + public static class fc2GigEStreamChannel extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2GigEStreamChannel() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2GigEStreamChannel(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2GigEStreamChannel(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2GigEStreamChannel position(long position) { + return (fc2GigEStreamChannel)super.position(position); + } + + /** Network interface index used (or to use). */ + public native @Cast("unsigned int") int networkInterfaceIndex(); public native fc2GigEStreamChannel networkInterfaceIndex(int networkInterfaceIndex); + /** Host port on the PC where the camera will send the data stream. */ + public native @Cast("unsigned int") int hostPort(); public native fc2GigEStreamChannel hostPort(int hostPort); + /** Disable IP fragmentation of packets. */ + public native @Cast("BOOL") int doNotFragment(); public native fc2GigEStreamChannel doNotFragment(int doNotFragment); + /** Packet size, in bytes. */ + public native @Cast("unsigned int") int packetSize(); public native fc2GigEStreamChannel packetSize(int packetSize); + /** Inter packet delay, in timestamp counter units. */ + public native @Cast("unsigned int") int interPacketDelay(); public native fc2GigEStreamChannel interPacketDelay(int interPacketDelay); + /** Destination IP address. It can be a multicast or unicast address. */ + public native @ByRef fc2IPAddress destinationIpAddress(); public native fc2GigEStreamChannel destinationIpAddress(fc2IPAddress destinationIpAddress); + /** Source UDP port of the stream channel. Read only. */ + public native @Cast("unsigned int") int sourcePort(); public native fc2GigEStreamChannel sourcePort(int sourcePort); + + public native @Cast("unsigned int") int reserved(int i); public native fc2GigEStreamChannel reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + /** + * Configuration for a GigE camera. These options are options that are + * generally should be set before starting isochronous transfer. + */ + public static class fc2GigEConfig extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2GigEConfig() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2GigEConfig(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2GigEConfig(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2GigEConfig position(long position) { + return (fc2GigEConfig)super.position(position); + } + + /** Turn on/off packet resend functionality */ + public native @Cast("BOOL") int enablePacketResend(); public native fc2GigEConfig enablePacketResend(int enablePacketResend); + + /** + * Number of retries to perform when a register read/write timeout + * is received by the library. The default value is 0. + */ + public native @Cast("unsigned int") int registerTimeoutRetries(); public native fc2GigEConfig registerTimeoutRetries(int registerTimeoutRetries); - /** - * Configuration for a camera. These options are options that are - * generally should be set before starting isochronous transfer. - */ - public static class fc2Config extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Config() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Config(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Config(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Config position(long position) { - return (fc2Config)super.position(position); - } - - /** Number of buffers used by the FlyCapture2 library to grab images. */ - public native @Cast("unsigned int") int numBuffers(); public native fc2Config numBuffers(int numBuffers); - - /** - * Number of notifications per image. This value should only be set - * after the image settings to be used is set to the camera. - * The default number of notifications is 1. - * - * There are 4 general scenarios: - * - 1 notification - End of image - * - 2 notifications - After first packet and end of image - * - 3 notifications - After first packet, middle of image, end of image - * - x notifications - After first packet, (x -2) spread evenly, end of image - * - * Specifying zero for the number of notifications will be ignored (the current value - * will not be modified). - * - * Note that the event numbers start at 0. Ex. when 3 notifications are - * used, the three events will be 0, 1 and 2. - */ - public native @Cast("unsigned int") int numImageNotifications(); public native fc2Config numImageNotifications(int numImageNotifications); - - /** - * Minimum number of notifications needed for the current image - * settings on the camera. Read-only value. - */ - public native @Cast("unsigned int") int minNumImageNotifications(); public native fc2Config minNumImageNotifications(int minNumImageNotifications); - - /** - * Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() - * will wait for an image before timing out and returning. - */ - public native int grabTimeout(); public native fc2Config grabTimeout(int grabTimeout); - - /** Grab mode for the camera. The default is DROP_FRAMES. */ - public native @Cast("fc2GrabMode") int grabMode(); public native fc2Config grabMode(int grabMode); - - /** This parameter enables RetrieveBuffer to run in high - * performance mode. This means that any interaction - * with the camera, other than grabbing the image is disabled. - * Currently Retrieve buffer reads registers on the camera to - * determine which embedded image information settings have been - * enabled, and it reads what the bayer tile is currently set to. - * When High Performance mode is on, these reads are disabled. This - * means that any changes to the Bayer Tile or to the Embedded image - * info after StartCapture() will not be tracked when made using - * direct register writes. If the corresponding SetEmbededImageInfo() - * and GetEmbededImageInfo() calls are used then the changes will be - * appropriately reflected. This also means that changes to embedded - * image info from other processes will not be updated either. */ - public native @Cast("BOOL") int highPerformanceRetrieveBuffer(); public native fc2Config highPerformanceRetrieveBuffer(int highPerformanceRetrieveBuffer); - - /** Isochronous bus speed. */ - public native @Cast("fc2BusSpeed") int isochBusSpeed(); public native fc2Config isochBusSpeed(int isochBusSpeed); - - /** Asynchronous bus speed. */ - public native @Cast("fc2BusSpeed") int asyncBusSpeed(); public native fc2Config asyncBusSpeed(int asyncBusSpeed); - - /** - * Bandwidth allocation flag that tells the camera the bandwidth - * allocation strategy to employ. - */ - public native @Cast("fc2BandwidthAllocation") int bandwidthAllocation(); public native fc2Config bandwidthAllocation(int bandwidthAllocation); - - /** - * Number of retries to perform when a register read/write timeout - * is received by the library. The default value is 0. - */ - public native @Cast("unsigned int") int registerTimeoutRetries(); public native fc2Config registerTimeoutRetries(int registerTimeoutRetries); - - /** - * Register read/write timeout value, in microseconds. - * The default value is dependent on the interface type. - */ - public native @Cast("unsigned int") int registerTimeout(); public native fc2Config registerTimeout(int registerTimeout); - - /** Reserved for future use */ - public native @Cast("unsigned int") int reserved(int i); public native fc2Config reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** + * Register read/write timeout value, in microseconds. + * The default value is dependent on the interface type. + */ + public native @Cast("unsigned int") int registerTimeout(); public native fc2GigEConfig registerTimeout(int registerTimeout); + + public native @Cast("unsigned int") int reserved(int i); public native fc2GigEConfig reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + /** Format 7 information for a single mode. */ + public static class fc2GigEImageSettingsInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2GigEImageSettingsInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2GigEImageSettingsInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2GigEImageSettingsInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2GigEImageSettingsInfo position(long position) { + return (fc2GigEImageSettingsInfo)super.position(position); + } + + /** Maximum image width. */ + public native @Cast("unsigned int") int maxWidth(); public native fc2GigEImageSettingsInfo maxWidth(int maxWidth); + /** Maximum image height. */ + public native @Cast("unsigned int") int maxHeight(); public native fc2GigEImageSettingsInfo maxHeight(int maxHeight); + /** Horizontal step size for the offset. */ + public native @Cast("unsigned int") int offsetHStepSize(); public native fc2GigEImageSettingsInfo offsetHStepSize(int offsetHStepSize); + /** Vertical step size for the offset. */ + public native @Cast("unsigned int") int offsetVStepSize(); public native fc2GigEImageSettingsInfo offsetVStepSize(int offsetVStepSize); + /** Horizontal step size for the image. */ + public native @Cast("unsigned int") int imageHStepSize(); public native fc2GigEImageSettingsInfo imageHStepSize(int imageHStepSize); + /** Vertical step size for the image. */ + public native @Cast("unsigned int") int imageVStepSize(); public native fc2GigEImageSettingsInfo imageVStepSize(int imageVStepSize); + /** Supported pixel formats in a bit field. */ + public native @Cast("unsigned int") int pixelFormatBitField(); public native fc2GigEImageSettingsInfo pixelFormatBitField(int pixelFormatBitField); + /** Vendor unique pixel formats in a bit field. */ + public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native fc2GigEImageSettingsInfo vendorPixelFormatBitField(int vendorPixelFormatBitField); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2GigEImageSettingsInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + /** Image settings for a GigE camera. */ + public static class fc2GigEImageSettings extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2GigEImageSettings() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2GigEImageSettings(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2GigEImageSettings(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2GigEImageSettings position(long position) { + return (fc2GigEImageSettings)super.position(position); + } + + /** Horizontal image offset. */ + public native @Cast("unsigned int") int offsetX(); public native fc2GigEImageSettings offsetX(int offsetX); + /** Vertical image offset. */ + public native @Cast("unsigned int") int offsetY(); public native fc2GigEImageSettings offsetY(int offsetY); + /** Width of image. */ + public native @Cast("unsigned int") int width(); public native fc2GigEImageSettings width(int width); + /** Height of image. */ + public native @Cast("unsigned int") int height(); public native fc2GigEImageSettings height(int height); + /** Pixel format of image. */ + public native @Cast("fc2PixelFormat") int pixelFormat(); public native fc2GigEImageSettings pixelFormat(int pixelFormat); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2GigEImageSettings reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + /*@}*/ + + /** + * \defgroup CIIDCStructures IIDC specific structures + * + * These structures are specific to IIDC camera operation only. + */ + + /*@{*/ + + /** Format 7 image settings. */ + public static class fc2Format7ImageSettings extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Format7ImageSettings() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Format7ImageSettings(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Format7ImageSettings(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Format7ImageSettings position(long position) { + return (fc2Format7ImageSettings)super.position(position); + } + + /** Format 7 mode. */ + public native @Cast("fc2Mode") int mode(); public native fc2Format7ImageSettings mode(int mode); + /** Horizontal image offset. */ + public native @Cast("unsigned int") int offsetX(); public native fc2Format7ImageSettings offsetX(int offsetX); + /** Vertical image offset. */ + public native @Cast("unsigned int") int offsetY(); public native fc2Format7ImageSettings offsetY(int offsetY); + /** Width of image. */ + public native @Cast("unsigned int") int width(); public native fc2Format7ImageSettings width(int width); + /** Height of image. */ + public native @Cast("unsigned int") int height(); public native fc2Format7ImageSettings height(int height); + /** Pixel format of image. */ + public native @Cast("fc2PixelFormat") int pixelFormat(); public native fc2Format7ImageSettings pixelFormat(int pixelFormat); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2Format7ImageSettings reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Format 7 information for a single mode. */ + public static class fc2Format7Info extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Format7Info() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Format7Info(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Format7Info(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Format7Info position(long position) { + return (fc2Format7Info)super.position(position); + } + + /** Format 7 mode. */ + public native @Cast("fc2Mode") int mode(); public native fc2Format7Info mode(int mode); + + /** Maximum image width. */ + public native @Cast("unsigned int") int maxWidth(); public native fc2Format7Info maxWidth(int maxWidth); + /** Maximum image height. */ + public native @Cast("unsigned int") int maxHeight(); public native fc2Format7Info maxHeight(int maxHeight); + /** Horizontal step size for the offset. */ + public native @Cast("unsigned int") int offsetHStepSize(); public native fc2Format7Info offsetHStepSize(int offsetHStepSize); + /** Vertical step size for the offset. */ + public native @Cast("unsigned int") int offsetVStepSize(); public native fc2Format7Info offsetVStepSize(int offsetVStepSize); + /** Horizontal step size for the image. */ + public native @Cast("unsigned int") int imageHStepSize(); public native fc2Format7Info imageHStepSize(int imageHStepSize); + /** Vertical step size for the image. */ + public native @Cast("unsigned int") int imageVStepSize(); public native fc2Format7Info imageVStepSize(int imageVStepSize); + /** Supported pixel formats in a bit field. */ + public native @Cast("unsigned int") int pixelFormatBitField(); public native fc2Format7Info pixelFormatBitField(int pixelFormatBitField); + /** Vendor unique pixel formats in a bit field. */ + public native @Cast("unsigned int") int vendorPixelFormatBitField(); public native fc2Format7Info vendorPixelFormatBitField(int vendorPixelFormatBitField); + /** Current packet size in bytes. */ + public native @Cast("unsigned int") int packetSize(); public native fc2Format7Info packetSize(int packetSize); + /** Minimum packet size in bytes for current mode. */ + public native @Cast("unsigned int") int minPacketSize(); public native fc2Format7Info minPacketSize(int minPacketSize); + /** Maximum packet size in bytes for current mode. */ + public native @Cast("unsigned int") int maxPacketSize(); public native fc2Format7Info maxPacketSize(int maxPacketSize); + /** Current packet size as a percentage of maximum packet size. */ + public native float percentage(); public native fc2Format7Info percentage(float percentage); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2Format7Info reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Format 7 packet information. */ + public static class fc2Format7PacketInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Format7PacketInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Format7PacketInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Format7PacketInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Format7PacketInfo position(long position) { + return (fc2Format7PacketInfo)super.position(position); + } + + /** Recommended bytes per packet. */ + public native @Cast("unsigned int") int recommendedBytesPerPacket(); public native fc2Format7PacketInfo recommendedBytesPerPacket(int recommendedBytesPerPacket); + /** Maximum bytes per packet. */ + public native @Cast("unsigned int") int maxBytesPerPacket(); public native fc2Format7PacketInfo maxBytesPerPacket(int maxBytesPerPacket); + /** Minimum bytes per packet. */ + public native @Cast("unsigned int") int unitBytesPerPacket(); public native fc2Format7PacketInfo unitBytesPerPacket(int unitBytesPerPacket); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2Format7PacketInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /*@}*/ + + /** + * Configuration for a camera. These options are options that are + * generally should be set before starting isochronous transfer. + */ + public static class fc2Config extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Config() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Config(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Config(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Config position(long position) { + return (fc2Config)super.position(position); + } + + /** Number of buffers used by the FlyCapture2 library to grab images. */ + public native @Cast("unsigned int") int numBuffers(); public native fc2Config numBuffers(int numBuffers); + + /** + * Number of notifications per image. This value should only be set + * after the image settings to be used is set to the camera. + * The default number of notifications is 1. + * + * There are 4 general scenarios: + * - 1 notification - End of image + * - 2 notifications - After first packet and end of image + * - 3 notifications - After first packet, middle of image, end of image + * - x notifications - After first packet, (x -2) spread evenly, end of image + * + * Specifying zero for the number of notifications will be ignored (the current value + * will not be modified). + * + * Note that the event numbers start at 0. Ex. when 3 notifications are + * used, the three events will be 0, 1 and 2. + */ + public native @Cast("unsigned int") int numImageNotifications(); public native fc2Config numImageNotifications(int numImageNotifications); - } + /** + * Minimum number of notifications needed for the current image + * settings on the camera. Read-only value. + */ + public native @Cast("unsigned int") int minNumImageNotifications(); public native fc2Config minNumImageNotifications(int minNumImageNotifications); - /** - * Information about a specific camera property. This structure is also - * also used as the TriggerDelayInfo structure. - */ - public static class fc2PropertyInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2PropertyInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2PropertyInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2PropertyInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2PropertyInfo position(long position) { - return (fc2PropertyInfo)super.position(position); - } - - /** Property info type. */ - public native @Cast("fc2PropertyType") int type(); public native fc2PropertyInfo type(int type); - /** Flag indicating if the property is present. */ - public native @Cast("BOOL") int present(); public native fc2PropertyInfo present(int present); - /** Flag indicating if auto is supported. */ - public native @Cast("BOOL") int autoSupported(); public native fc2PropertyInfo autoSupported(int autoSupported); - /** Flag indicating if manual is supported. */ - public native @Cast("BOOL") int manualSupported(); public native fc2PropertyInfo manualSupported(int manualSupported); - /** Flag indicating if on/off is supported. */ - public native @Cast("BOOL") int onOffSupported(); public native fc2PropertyInfo onOffSupported(int onOffSupported); - /** Flag indicating if one push is supported. */ - public native @Cast("BOOL") int onePushSupported(); public native fc2PropertyInfo onePushSupported(int onePushSupported); - /** Flag indicating if absolute mode is supported. */ - public native @Cast("BOOL") int absValSupported(); public native fc2PropertyInfo absValSupported(int absValSupported); - /** Flag indicating if property value can be read out. */ - public native @Cast("BOOL") int readOutSupported(); public native fc2PropertyInfo readOutSupported(int readOutSupported); - /** Minimum value (as an integer). */ - public native @Cast("unsigned int") int min(); public native fc2PropertyInfo min(int min); - /** Maximum value (as an integer). */ - public native @Cast("unsigned int") int max(); public native fc2PropertyInfo max(int max); - /** Minimum value (as a floating point value). */ - public native float absMin(); public native fc2PropertyInfo absMin(float absMin); - /** Maximum value (as a floating point value). */ - public native float absMax(); public native fc2PropertyInfo absMax(float absMax); - /** Textual description of units. */ - public native @Cast("char") byte pUnits(int i); public native fc2PropertyInfo pUnits(int i, byte pUnits); - @MemberGetter public native @Cast("char*") BytePointer pUnits(); - /** Abbreviated textual description of units. */ - public native @Cast("char") byte pUnitAbbr(int i); public native fc2PropertyInfo pUnitAbbr(int i, byte pUnitAbbr); - @MemberGetter public native @Cast("char*") BytePointer pUnitAbbr(); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2PropertyInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** + * Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() + * will wait for an image before timing out and returning. + */ + public native int grabTimeout(); public native fc2Config grabTimeout(int grabTimeout); + + /** Grab mode for the camera. The default is DROP_FRAMES. */ + public native @Cast("fc2GrabMode") int grabMode(); public native fc2Config grabMode(int grabMode); + + /** This parameter enables RetrieveBuffer to run in high + * performance mode. This means that any interaction + * with the camera, other than grabbing the image is disabled. + * Currently Retrieve buffer reads registers on the camera to + * determine which embedded image information settings have been + * enabled, and it reads what the bayer tile is currently set to. + * When High Performance mode is on, these reads are disabled. This + * means that any changes to the Bayer Tile or to the Embedded image + * info after StartCapture() will not be tracked when made using + * direct register writes. If the corresponding SetEmbededImageInfo() + * and GetEmbededImageInfo() calls are used then the changes will be + * appropriately reflected. This also means that changes to embedded + * image info from other processes will not be updated either. */ + public native @Cast("BOOL") int highPerformanceRetrieveBuffer(); public native fc2Config highPerformanceRetrieveBuffer(int highPerformanceRetrieveBuffer); + + /** Isochronous bus speed. */ + public native @Cast("fc2BusSpeed") int isochBusSpeed(); public native fc2Config isochBusSpeed(int isochBusSpeed); + + /** Asynchronous bus speed. */ + public native @Cast("fc2BusSpeed") int asyncBusSpeed(); public native fc2Config asyncBusSpeed(int asyncBusSpeed); + + /** + * Bandwidth allocation flag that tells the camera the bandwidth + * allocation strategy to employ. + */ + public native @Cast("fc2BandwidthAllocation") int bandwidthAllocation(); public native fc2Config bandwidthAllocation(int bandwidthAllocation); - } + /** + * Number of retries to perform when a register read/write timeout + * is received by the library. The default value is 0. + */ + public native @Cast("unsigned int") int registerTimeoutRetries(); public native fc2Config registerTimeoutRetries(int registerTimeoutRetries); - /** - * A specific camera property. \n - * For example, to set the gain to 12dB, set the following values: - * - \a type - \c GAIN - * - \a absControl - \c true - * - \a onePush - \c false - * - \a onOff - \c true - * - \a autoManualMode - \c false - * - \a absValue - \c 12.0 - */ - public static class fc2Property extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2Property() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2Property(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2Property(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2Property position(long position) { - return (fc2Property)super.position(position); - } - - /** Property info type. */ - public native @Cast("fc2PropertyType") int type(); public native fc2Property type(int type); - /** Flag indicating if the property is present. */ - public native @Cast("BOOL") int present(); public native fc2Property present(int present); - /** + /** + * Register read/write timeout value, in microseconds. + * The default value is dependent on the interface type. + */ + public native @Cast("unsigned int") int registerTimeout(); public native fc2Config registerTimeout(int registerTimeout); + + /** Reserved for future use */ + public native @Cast("unsigned int") int reserved(int i); public native fc2Config reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** + * Information about a specific camera property. This structure is also + * also used as the TriggerDelayInfo structure. + */ + public static class fc2PropertyInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2PropertyInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2PropertyInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2PropertyInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2PropertyInfo position(long position) { + return (fc2PropertyInfo)super.position(position); + } + + /** Property info type. */ + public native @Cast("fc2PropertyType") int type(); public native fc2PropertyInfo type(int type); + /** Flag indicating if the property is present. */ + public native @Cast("BOOL") int present(); public native fc2PropertyInfo present(int present); + /** Flag indicating if auto is supported. */ + public native @Cast("BOOL") int autoSupported(); public native fc2PropertyInfo autoSupported(int autoSupported); + /** Flag indicating if manual is supported. */ + public native @Cast("BOOL") int manualSupported(); public native fc2PropertyInfo manualSupported(int manualSupported); + /** Flag indicating if on/off is supported. */ + public native @Cast("BOOL") int onOffSupported(); public native fc2PropertyInfo onOffSupported(int onOffSupported); + /** Flag indicating if one push is supported. */ + public native @Cast("BOOL") int onePushSupported(); public native fc2PropertyInfo onePushSupported(int onePushSupported); + /** Flag indicating if absolute mode is supported. */ + public native @Cast("BOOL") int absValSupported(); public native fc2PropertyInfo absValSupported(int absValSupported); + /** Flag indicating if property value can be read out. */ + public native @Cast("BOOL") int readOutSupported(); public native fc2PropertyInfo readOutSupported(int readOutSupported); + /** Minimum value (as an integer). */ + public native @Cast("unsigned int") int min(); public native fc2PropertyInfo min(int min); + /** Maximum value (as an integer). */ + public native @Cast("unsigned int") int max(); public native fc2PropertyInfo max(int max); + /** Minimum value (as a floating point value). */ + public native float absMin(); public native fc2PropertyInfo absMin(float absMin); + /** Maximum value (as a floating point value). */ + public native float absMax(); public native fc2PropertyInfo absMax(float absMax); + /** Textual description of units. */ + public native @Cast("char") byte pUnits(int i); public native fc2PropertyInfo pUnits(int i, byte pUnits); + @MemberGetter public native @Cast("char*") BytePointer pUnits(); + /** Abbreviated textual description of units. */ + public native @Cast("char") byte pUnitAbbr(int i); public native fc2PropertyInfo pUnitAbbr(int i, byte pUnitAbbr); + @MemberGetter public native @Cast("char*") BytePointer pUnitAbbr(); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2PropertyInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** + * A specific camera property. \n + * For example, to set the gain to 12dB, set the following values: + * - \a type - \c GAIN + * - \a absControl - \c true + * - \a onePush - \c false + * - \a onOff - \c true + * - \a autoManualMode - \c false + * - \a absValue - \c 12.0 + */ + public static class fc2Property extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2Property() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2Property(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2Property(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2Property position(long position) { + return (fc2Property)super.position(position); + } + + /** Property info type. */ + public native @Cast("fc2PropertyType") int type(); public native fc2Property type(int type); + /** Flag indicating if the property is present. */ + public native @Cast("BOOL") int present(); public native fc2Property present(int present); + /** * Flag controlling absolute mode (real world units) * or non-absolute mode (camera internal units). */ - public native @Cast("BOOL") int absControl(); public native fc2Property absControl(int absControl); - /** Flag controlling one push. */ - public native @Cast("BOOL") int onePush(); public native fc2Property onePush(int onePush); - /** Flag controlling on/off. */ - public native @Cast("BOOL") int onOff(); public native fc2Property onOff(int onOff); - /** Flag controlling auto. */ - public native @Cast("BOOL") int autoManualMode(); public native fc2Property autoManualMode(int autoManualMode); - /** + public native @Cast("BOOL") int absControl(); public native fc2Property absControl(int absControl); + /** Flag controlling one push. */ + public native @Cast("BOOL") int onePush(); public native fc2Property onePush(int onePush); + /** Flag controlling on/off. */ + public native @Cast("BOOL") int onOff(); public native fc2Property onOff(int onOff); + /** Flag controlling auto. */ + public native @Cast("BOOL") int autoManualMode(); public native fc2Property autoManualMode(int autoManualMode); + /** * Value A (integer). * Used to configure properties in non-absolute mode. */ - public native @Cast("unsigned int") int valueA(); public native fc2Property valueA(int valueA); - /** + public native @Cast("unsigned int") int valueA(); public native fc2Property valueA(int valueA); + /** * Value B (integer). For white balance, value B applies to the blue value and * value A applies to the red value. */ - public native @Cast("unsigned int") int valueB(); public native fc2Property valueB(int valueB); - /** - * Floating point value. - * Used to configure properties in absolute mode. - */ - public native float absValue(); public native fc2Property absValue(float absValue); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2Property reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - // For convenience, trigger delay is the same structure - // used in a separate function along with trigger mode. - - } - - /** Information about a camera trigger property. */ - public static class fc2TriggerModeInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2TriggerModeInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2TriggerModeInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2TriggerModeInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2TriggerModeInfo position(long position) { - return (fc2TriggerModeInfo)super.position(position); - } - - /** Presence of trigger mode. */ - public native @Cast("BOOL") int present(); public native fc2TriggerModeInfo present(int present); - /** Flag indicating if trigger value can be read out. */ - public native @Cast("BOOL") int readOutSupported(); public native fc2TriggerModeInfo readOutSupported(int readOutSupported); - /** Flag indicating if on/off is supported. */ - public native @Cast("BOOL") int onOffSupported(); public native fc2TriggerModeInfo onOffSupported(int onOffSupported); - /** Flag indicating if polarity is supported. */ - public native @Cast("BOOL") int polaritySupported(); public native fc2TriggerModeInfo polaritySupported(int polaritySupported); - /** Flag indicating if the value is readable. */ - public native @Cast("BOOL") int valueReadable(); public native fc2TriggerModeInfo valueReadable(int valueReadable); - /** Source mask. */ - public native @Cast("unsigned int") int sourceMask(); public native fc2TriggerModeInfo sourceMask(int sourceMask); - /** Flag indicating if software trigger is supported. */ - public native @Cast("BOOL") int softwareTriggerSupported(); public native fc2TriggerModeInfo softwareTriggerSupported(int softwareTriggerSupported); - /** Mode mask. */ - public native @Cast("unsigned int") int modeMask(); public native fc2TriggerModeInfo modeMask(int modeMask); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2TriggerModeInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + public native @Cast("unsigned int") int valueB(); public native fc2Property valueB(int valueB); + /** + * Floating point value. + * Used to configure properties in absolute mode. + */ + public native float absValue(); public native fc2Property absValue(float absValue); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2Property reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + // For convenience, trigger delay is the same structure + // used in a separate function along with trigger mode. + + } + + /** Information about a camera trigger property. */ + public static class fc2TriggerModeInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2TriggerModeInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2TriggerModeInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2TriggerModeInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2TriggerModeInfo position(long position) { + return (fc2TriggerModeInfo)super.position(position); + } + + /** Presence of trigger mode. */ + public native @Cast("BOOL") int present(); public native fc2TriggerModeInfo present(int present); + /** Flag indicating if trigger value can be read out. */ + public native @Cast("BOOL") int readOutSupported(); public native fc2TriggerModeInfo readOutSupported(int readOutSupported); + /** Flag indicating if on/off is supported. */ + public native @Cast("BOOL") int onOffSupported(); public native fc2TriggerModeInfo onOffSupported(int onOffSupported); + /** Flag indicating if polarity is supported. */ + public native @Cast("BOOL") int polaritySupported(); public native fc2TriggerModeInfo polaritySupported(int polaritySupported); + /** Flag indicating if the value is readable. */ + public native @Cast("BOOL") int valueReadable(); public native fc2TriggerModeInfo valueReadable(int valueReadable); + /** Source mask. */ + public native @Cast("unsigned int") int sourceMask(); public native fc2TriggerModeInfo sourceMask(int sourceMask); + /** Flag indicating if software trigger is supported. */ + public native @Cast("BOOL") int softwareTriggerSupported(); public native fc2TriggerModeInfo softwareTriggerSupported(int softwareTriggerSupported); + /** Mode mask. */ + public native @Cast("unsigned int") int modeMask(); public native fc2TriggerModeInfo modeMask(int modeMask); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2TriggerModeInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** A camera trigger. */ + public static class fc2TriggerMode extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2TriggerMode() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2TriggerMode(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2TriggerMode(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2TriggerMode position(long position) { + return (fc2TriggerMode)super.position(position); + } + + /** Flag controlling on/off. */ + public native @Cast("BOOL") int onOff(); public native fc2TriggerMode onOff(int onOff); + /** Polarity value. */ + public native @Cast("unsigned int") int polarity(); public native fc2TriggerMode polarity(int polarity); + /** Source value. */ + public native @Cast("unsigned int") int source(); public native fc2TriggerMode source(int source); + /** Mode value. */ + public native @Cast("unsigned int") int mode(); public native fc2TriggerMode mode(int mode); + /** Parameter value. */ + public native @Cast("unsigned int") int parameter(); public native fc2TriggerMode parameter(int parameter); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2TriggerMode reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** A camera strobe property. */ + public static class fc2StrobeInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2StrobeInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2StrobeInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2StrobeInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2StrobeInfo position(long position) { + return (fc2StrobeInfo)super.position(position); + } + + /** Source value. */ + public native @Cast("unsigned int") int source(); public native fc2StrobeInfo source(int source); + /** Presence of strobe. */ + public native @Cast("BOOL") int present(); public native fc2StrobeInfo present(int present); + /** Flag indicating if strobe value can be read out. */ + public native @Cast("BOOL") int readOutSupported(); public native fc2StrobeInfo readOutSupported(int readOutSupported); + /** Flag indicating if on/off is supported. */ + public native @Cast("BOOL") int onOffSupported(); public native fc2StrobeInfo onOffSupported(int onOffSupported); + /** Flag indicating if polarity is supported. */ + public native @Cast("BOOL") int polaritySupported(); public native fc2StrobeInfo polaritySupported(int polaritySupported); + /** Minimum value. */ + public native float minValue(); public native fc2StrobeInfo minValue(float minValue); + /** Maximum value. */ + public native float maxValue(); public native fc2StrobeInfo maxValue(float maxValue); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2StrobeInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** A camera strobe. */ + public static class fc2StrobeControl extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2StrobeControl() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2StrobeControl(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2StrobeControl(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2StrobeControl position(long position) { + return (fc2StrobeControl)super.position(position); + } + + /** Source value. */ + public native @Cast("unsigned int") int source(); public native fc2StrobeControl source(int source); + /** Flag controlling on/off. */ + public native @Cast("BOOL") int onOff(); public native fc2StrobeControl onOff(int onOff); + /** Signal polarity. */ + public native @Cast("unsigned int") int polarity(); public native fc2StrobeControl polarity(int polarity); + /** Signal delay (in ms). */ + public native float delay(); public native fc2StrobeControl delay(float delay); + /** Signal duration (in ms). */ + public native float duration(); public native fc2StrobeControl duration(float duration); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2StrobeControl reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Timestamp information. */ + public static class fc2TimeStamp extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2TimeStamp() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2TimeStamp(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2TimeStamp(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2TimeStamp position(long position) { + return (fc2TimeStamp)super.position(position); + } + + /** Seconds. */ + public native long seconds(); public native fc2TimeStamp seconds(long seconds); + /** Microseconds. */ + public native @Cast("unsigned int") int microSeconds(); public native fc2TimeStamp microSeconds(int microSeconds); + /** 1394 cycle time seconds. */ + public native @Cast("unsigned int") int cycleSeconds(); public native fc2TimeStamp cycleSeconds(int cycleSeconds); + /** 1394 cycle time count. */ + public native @Cast("unsigned int") int cycleCount(); public native fc2TimeStamp cycleCount(int cycleCount); + /** 1394 cycle time offset. */ + public native @Cast("unsigned int") int cycleOffset(); public native fc2TimeStamp cycleOffset(int cycleOffset); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2TimeStamp reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Camera configuration ROM. */ + public static class fc2ConfigROM extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2ConfigROM() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2ConfigROM(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2ConfigROM(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2ConfigROM position(long position) { + return (fc2ConfigROM)super.position(position); + } + + /** Vendor ID of a node. */ + public native @Cast("unsigned int") int nodeVendorId(); public native fc2ConfigROM nodeVendorId(int nodeVendorId); + /** Chip ID (high part). */ + public native @Cast("unsigned int") int chipIdHi(); public native fc2ConfigROM chipIdHi(int chipIdHi); + /** Chip ID (low part). */ + public native @Cast("unsigned int") int chipIdLo(); public native fc2ConfigROM chipIdLo(int chipIdLo); + /** Unit Spec ID, usually 0xa02d. */ + public native @Cast("unsigned int") int unitSpecId(); public native fc2ConfigROM unitSpecId(int unitSpecId); + /** Unit software version. */ + public native @Cast("unsigned int") int unitSWVer(); public native fc2ConfigROM unitSWVer(int unitSWVer); + /** Unit sub software version. */ + public native @Cast("unsigned int") int unitSubSWVer(); public native fc2ConfigROM unitSubSWVer(int unitSubSWVer); + /** Vendor unique info 0. */ + public native @Cast("unsigned int") int vendorUniqueInfo_0(); public native fc2ConfigROM vendorUniqueInfo_0(int vendorUniqueInfo_0); + /** Vendor unique info 1. */ + public native @Cast("unsigned int") int vendorUniqueInfo_1(); public native fc2ConfigROM vendorUniqueInfo_1(int vendorUniqueInfo_1); + /** Vendor unique info 2. */ + public native @Cast("unsigned int") int vendorUniqueInfo_2(); public native fc2ConfigROM vendorUniqueInfo_2(int vendorUniqueInfo_2); + /** Vendor unique info 3. */ + public native @Cast("unsigned int") int vendorUniqueInfo_3(); public native fc2ConfigROM vendorUniqueInfo_3(int vendorUniqueInfo_3); + /** Keyword. */ + public native @Cast("char") byte pszKeyword(int i); public native fc2ConfigROM pszKeyword(int i, byte pszKeyword); + @MemberGetter public native @Cast("char*") BytePointer pszKeyword(); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2ConfigROM reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Camera information. */ + public static class fc2CameraInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2CameraInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2CameraInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2CameraInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2CameraInfo position(long position) { + return (fc2CameraInfo)super.position(position); + } + + /** Device serial number. */ + public native @Cast("unsigned int") int serialNumber(); public native fc2CameraInfo serialNumber(int serialNumber); + /** Interface type. */ + public native @Cast("fc2InterfaceType") int interfaceType(); public native fc2CameraInfo interfaceType(int interfaceType); + /** Driver type. */ + public native @Cast("fc2DriverType") int driverType(); public native fc2CameraInfo driverType(int driverType); + /** Flag indicating if this is a color camera. */ + public native @Cast("BOOL") int isColorCamera(); public native fc2CameraInfo isColorCamera(int isColorCamera); + /** Device model name. */ + public native @Cast("char") byte modelName(int i); public native fc2CameraInfo modelName(int i, byte modelName); + @MemberGetter public native @Cast("char*") BytePointer modelName(); + /** Device vendor name. */ + public native @Cast("char") byte vendorName(int i); public native fc2CameraInfo vendorName(int i, byte vendorName); + @MemberGetter public native @Cast("char*") BytePointer vendorName(); + /** String detailing the sensor information. */ + public native @Cast("char") byte sensorInfo(int i); public native fc2CameraInfo sensorInfo(int i, byte sensorInfo); + @MemberGetter public native @Cast("char*") BytePointer sensorInfo(); + /** String providing the sensor resolution. */ + public native @Cast("char") byte sensorResolution(int i); public native fc2CameraInfo sensorResolution(int i, byte sensorResolution); + @MemberGetter public native @Cast("char*") BytePointer sensorResolution(); + /** Driver name of driver being used. */ + public native @Cast("char") byte driverName(int i); public native fc2CameraInfo driverName(int i, byte driverName); + @MemberGetter public native @Cast("char*") BytePointer driverName(); + /** Firmware version of camera. */ + public native @Cast("char") byte firmwareVersion(int i); public native fc2CameraInfo firmwareVersion(int i, byte firmwareVersion); + @MemberGetter public native @Cast("char*") BytePointer firmwareVersion(); + /** Firmware build time. */ + public native @Cast("char") byte firmwareBuildTime(int i); public native fc2CameraInfo firmwareBuildTime(int i, byte firmwareBuildTime); + @MemberGetter public native @Cast("char*") BytePointer firmwareBuildTime(); + /** Maximum bus speed. */ + public native @Cast("fc2BusSpeed") int maximumBusSpeed(); public native fc2CameraInfo maximumBusSpeed(int maximumBusSpeed); + /** Bayer tile format. */ + public native @Cast("fc2BayerTileFormat") int bayerTileFormat(); public native fc2CameraInfo bayerTileFormat(int bayerTileFormat); + /** Bus number, set to 0 for GigE and USB cameras **/ + public native @Cast("fc2PCIeBusSpeed") int pcieBusSpeed(); public native fc2CameraInfo pcieBusSpeed(int pcieBusSpeed); + /** ieee1394 Node number, set to 0 for GigE and USB cameras **/ + public native @Cast("unsigned short") short nodeNumber(); public native fc2CameraInfo nodeNumber(short nodeNumber); + /** PCIe Bus Speed, set to PCIE_BUSSPEED_UNKNOWN for unsupported drivers **/ + public native @Cast("unsigned short") short busNumber(); public native fc2CameraInfo busNumber(short busNumber); + + /** \name IIDC specific information */ + /*@{*/ + /** DCAM version. */ + public native @Cast("unsigned int") int iidcVer(); public native fc2CameraInfo iidcVer(int iidcVer); + /** Configuration ROM data. */ + public native @ByRef fc2ConfigROM configROM(); public native fc2CameraInfo configROM(fc2ConfigROM configROM); + /*@}*/ + + /** \name GigE specific information */ + /*@{*/ + /** GigE Vision version. */ + public native @Cast("unsigned int") int gigEMajorVersion(); public native fc2CameraInfo gigEMajorVersion(int gigEMajorVersion); + /** GigE Vision minor version. */ + public native @Cast("unsigned int") int gigEMinorVersion(); public native fc2CameraInfo gigEMinorVersion(int gigEMinorVersion); + /** User defined name. */ + public native @Cast("char") byte userDefinedName(int i); public native fc2CameraInfo userDefinedName(int i, byte userDefinedName); + @MemberGetter public native @Cast("char*") BytePointer userDefinedName(); + /** XML URL 1. */ + public native @Cast("char") byte xmlURL1(int i); public native fc2CameraInfo xmlURL1(int i, byte xmlURL1); + @MemberGetter public native @Cast("char*") BytePointer xmlURL1(); + /** XML URL 2. */ + public native @Cast("char") byte xmlURL2(int i); public native fc2CameraInfo xmlURL2(int i, byte xmlURL2); + @MemberGetter public native @Cast("char*") BytePointer xmlURL2(); + /** MAC address */ + public native @ByRef fc2MACAddress macAddress(); public native fc2CameraInfo macAddress(fc2MACAddress macAddress); + /** IP address. */ + public native @ByRef fc2IPAddress ipAddress(); public native fc2CameraInfo ipAddress(fc2IPAddress ipAddress); + /** Subnet mask. */ + public native @ByRef fc2IPAddress subnetMask(); public native fc2CameraInfo subnetMask(fc2IPAddress subnetMask); + /** Default gateway. */ + public native @ByRef fc2IPAddress defaultGateway(); public native fc2CameraInfo defaultGateway(fc2IPAddress defaultGateway); + /** Status/Content of CCP register */ + public native @Cast("unsigned int") int ccpStatus(); public native fc2CameraInfo ccpStatus(int ccpStatus); + /** Local Application IP Address. */ + public native @Cast("unsigned int") int applicationIPAddress(); public native fc2CameraInfo applicationIPAddress(int applicationIPAddress); + /** Local Application port. */ + public native @Cast("unsigned int") int applicationPort(); public native fc2CameraInfo applicationPort(int applicationPort); + /*@}*/ + + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2CameraInfo reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Properties of a single embedded image info property. */ + public static class fc2EmbeddedImageInfoProperty extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2EmbeddedImageInfoProperty() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2EmbeddedImageInfoProperty(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2EmbeddedImageInfoProperty(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2EmbeddedImageInfoProperty position(long position) { + return (fc2EmbeddedImageInfoProperty)super.position(position); + } + + /** Whether this property is available. */ + public native @Cast("BOOL") int available(); public native fc2EmbeddedImageInfoProperty available(int available); + /** Whether this property is on or off. */ + public native @Cast("BOOL") int onOff(); public native fc2EmbeddedImageInfoProperty onOff(int onOff); + + } + + /** Properties of the possible embedded image information. */ + public static class fc2EmbeddedImageInfo extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2EmbeddedImageInfo() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2EmbeddedImageInfo(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2EmbeddedImageInfo(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2EmbeddedImageInfo position(long position) { + return (fc2EmbeddedImageInfo)super.position(position); + } + + public native @ByRef fc2EmbeddedImageInfoProperty timestamp(); public native fc2EmbeddedImageInfo timestamp(fc2EmbeddedImageInfoProperty timestamp); + public native @ByRef fc2EmbeddedImageInfoProperty gain(); public native fc2EmbeddedImageInfo gain(fc2EmbeddedImageInfoProperty gain); + public native @ByRef fc2EmbeddedImageInfoProperty shutter(); public native fc2EmbeddedImageInfo shutter(fc2EmbeddedImageInfoProperty shutter); + public native @ByRef fc2EmbeddedImageInfoProperty brightness(); public native fc2EmbeddedImageInfo brightness(fc2EmbeddedImageInfoProperty brightness); + public native @ByRef fc2EmbeddedImageInfoProperty exposure(); public native fc2EmbeddedImageInfo exposure(fc2EmbeddedImageInfoProperty exposure); + public native @ByRef fc2EmbeddedImageInfoProperty whiteBalance(); public native fc2EmbeddedImageInfo whiteBalance(fc2EmbeddedImageInfoProperty whiteBalance); + public native @ByRef fc2EmbeddedImageInfoProperty frameCounter(); public native fc2EmbeddedImageInfo frameCounter(fc2EmbeddedImageInfoProperty frameCounter); + public native @ByRef fc2EmbeddedImageInfoProperty strobePattern(); public native fc2EmbeddedImageInfo strobePattern(fc2EmbeddedImageInfoProperty strobePattern); + public native @ByRef fc2EmbeddedImageInfoProperty GPIOPinState(); public native fc2EmbeddedImageInfo GPIOPinState(fc2EmbeddedImageInfoProperty GPIOPinState); + public native @ByRef fc2EmbeddedImageInfoProperty ROIPosition(); public native fc2EmbeddedImageInfo ROIPosition(fc2EmbeddedImageInfoProperty ROIPosition); + + } + + /** Metadata related to an image. */ + public static class fc2ImageMetadata extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2ImageMetadata() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2ImageMetadata(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2ImageMetadata(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2ImageMetadata position(long position) { + return (fc2ImageMetadata)super.position(position); + } + + /** Embedded timestamp. */ + public native @Cast("unsigned int") int embeddedTimeStamp(); public native fc2ImageMetadata embeddedTimeStamp(int embeddedTimeStamp); + /** Embedded gain. */ + public native @Cast("unsigned int") int embeddedGain(); public native fc2ImageMetadata embeddedGain(int embeddedGain); + /** Embedded shutter. */ + public native @Cast("unsigned int") int embeddedShutter(); public native fc2ImageMetadata embeddedShutter(int embeddedShutter); + /** Embedded brightness. */ + public native @Cast("unsigned int") int embeddedBrightness(); public native fc2ImageMetadata embeddedBrightness(int embeddedBrightness); + /** Embedded exposure. */ + public native @Cast("unsigned int") int embeddedExposure(); public native fc2ImageMetadata embeddedExposure(int embeddedExposure); + /** Embedded white balance. */ + public native @Cast("unsigned int") int embeddedWhiteBalance(); public native fc2ImageMetadata embeddedWhiteBalance(int embeddedWhiteBalance); + /** Embedded frame counter. */ + public native @Cast("unsigned int") int embeddedFrameCounter(); public native fc2ImageMetadata embeddedFrameCounter(int embeddedFrameCounter); + /** Embedded strobe pattern. */ + public native @Cast("unsigned int") int embeddedStrobePattern(); public native fc2ImageMetadata embeddedStrobePattern(int embeddedStrobePattern); + /** Embedded GPIO pin state. */ + public native @Cast("unsigned int") int embeddedGPIOPinState(); public native fc2ImageMetadata embeddedGPIOPinState(int embeddedGPIOPinState); + /** Embedded ROI position. */ + public native @Cast("unsigned int") int embeddedROIPosition(); public native fc2ImageMetadata embeddedROIPosition(int embeddedROIPosition); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2ImageMetadata reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Information about the camera's look up table. */ + public static class fc2LUTData extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2LUTData() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2LUTData(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2LUTData(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2LUTData position(long position) { + return (fc2LUTData)super.position(position); + } + + /** Flag indicating if LUT is supported. */ + public native @Cast("BOOL") int supported(); public native fc2LUTData supported(int supported); + /** Flag indicating if LUT is enabled. */ + public native @Cast("BOOL") int enabled(); public native fc2LUTData enabled(int enabled); + /** The number of LUT banks available (Always 1 for PGR LUT). */ + public native @Cast("unsigned int") int numBanks(); public native fc2LUTData numBanks(int numBanks); + /** The number of LUT channels per bank available. */ + public native @Cast("unsigned int") int numChannels(); public native fc2LUTData numChannels(int numChannels); + /** The input bit depth of the LUT. */ + public native @Cast("unsigned int") int inputBitDepth(); public native fc2LUTData inputBitDepth(int inputBitDepth); + /** The output bit depth of the LUT. */ + public native @Cast("unsigned int") int outputBitDepth(); public native fc2LUTData outputBitDepth(int outputBitDepth); + /** The number of entries in the LUT. */ + public native @Cast("unsigned int") int numEntries(); public native fc2LUTData numEntries(int numEntries); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2LUTData reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Camera diagnostic information. */ + public static class fc2CameraStats extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2CameraStats() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2CameraStats(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2CameraStats(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2CameraStats position(long position) { + return (fc2CameraStats)super.position(position); + } + + /* Number of dropped images in DROP_IMAGE mode */ + public native @Cast("unsigned int") int imageDropped(); public native fc2CameraStats imageDropped(int imageDropped); + /* Number of corrupt images, such as missing packet, zero packet */ + public native @Cast("unsigned int") int imageCorrupt(); public native fc2CameraStats imageCorrupt(int imageCorrupt); + /* Number of transmissions failed of camera */ + public native @Cast("unsigned int") int imageXmitFailed(); public native fc2CameraStats imageXmitFailed(int imageXmitFailed); + /* Number of images dropped in driver */ + public native @Cast("unsigned int") int imageDriverDropped(); public native fc2CameraStats imageDriverDropped(int imageDriverDropped); + /* Errors of register reading */ + public native @Cast("unsigned int") int regReadFailed(); public native fc2CameraStats regReadFailed(int regReadFailed); + /* Errors of register writing */ + public native @Cast("unsigned int") int regWriteFailed(); public native fc2CameraStats regWriteFailed(int regWriteFailed); + /* Port errors */ + public native @Cast("unsigned int") int portErrors(); public native fc2CameraStats portErrors(int portErrors); + + /* The value of the camera power register. + * false: Camera is powered down. + * true: Camera is powered up. + */ + public native @Cast("BOOL") int cameraPowerUp(); public native fc2CameraStats cameraPowerUp(int cameraPowerUp); - } + /* The voltage values of the various voltage registers + * supported by the camera. + */ + public native float cameraVoltages(int i); public native fc2CameraStats cameraVoltages(int i, float cameraVoltages); + @MemberGetter public native FloatPointer cameraVoltages(); - /** A camera trigger. */ - public static class fc2TriggerMode extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2TriggerMode() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2TriggerMode(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2TriggerMode(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2TriggerMode position(long position) { - return (fc2TriggerMode)super.position(position); - } - - /** Flag controlling on/off. */ - public native @Cast("BOOL") int onOff(); public native fc2TriggerMode onOff(int onOff); - /** Polarity value. */ - public native @Cast("unsigned int") int polarity(); public native fc2TriggerMode polarity(int polarity); - /** Source value. */ - public native @Cast("unsigned int") int source(); public native fc2TriggerMode source(int source); - /** Mode value. */ - public native @Cast("unsigned int") int mode(); public native fc2TriggerMode mode(int mode); - /** Parameter value. */ - public native @Cast("unsigned int") int parameter(); public native fc2TriggerMode parameter(int parameter); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2TriggerMode reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** The number of voltage registers available. + * 0: the values in cameraVoltages[] are invalid. + */ + public native @Cast("unsigned int") int numVoltages(); public native fc2CameraStats numVoltages(int numVoltages); - } + /* The current values of the various current registers + * supported by the camera. + */ + public native float cameraCurrents(int i); public native fc2CameraStats cameraCurrents(int i, float cameraCurrents); + @MemberGetter public native FloatPointer cameraCurrents(); - /** A camera strobe property. */ - public static class fc2StrobeInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2StrobeInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2StrobeInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2StrobeInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2StrobeInfo position(long position) { - return (fc2StrobeInfo)super.position(position); - } - - /** Source value. */ - public native @Cast("unsigned int") int source(); public native fc2StrobeInfo source(int source); - /** Presence of strobe. */ - public native @Cast("BOOL") int present(); public native fc2StrobeInfo present(int present); - /** Flag indicating if strobe value can be read out. */ - public native @Cast("BOOL") int readOutSupported(); public native fc2StrobeInfo readOutSupported(int readOutSupported); - /** Flag indicating if on/off is supported. */ - public native @Cast("BOOL") int onOffSupported(); public native fc2StrobeInfo onOffSupported(int onOffSupported); - /** Flag indicating if polarity is supported. */ - public native @Cast("BOOL") int polaritySupported(); public native fc2StrobeInfo polaritySupported(int polaritySupported); - /** Minimum value. */ - public native float minValue(); public native fc2StrobeInfo minValue(float minValue); - /** Maximum value. */ - public native float maxValue(); public native fc2StrobeInfo maxValue(float maxValue); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2StrobeInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** The number of current registers available. + * 0: the values in cameraCurrents[] are invalid. + */ + public native @Cast("unsigned int") int numCurrents(); public native fc2CameraStats numCurrents(int numCurrents); - } + /* The temperature of the camera board-level components. The value is + * in kelvins (0�C = 273.15K) and are in one-tenths (0.1) of a kelvin. + */ + public native @Cast("unsigned int") int temperature(); public native fc2CameraStats temperature(int temperature); + + /* Time in seconds since the camera was initialized. */ + public native @Cast("unsigned int") int timeSinceInitialization(); public native fc2CameraStats timeSinceInitialization(int timeSinceInitialization); + /* Time in seconds since the camera detected a bus reset. */ + public native @Cast("unsigned int") int timeSinceBusReset(); public native fc2CameraStats timeSinceBusReset(int timeSinceBusReset); + /* Time stamp */ + public native @ByRef fc2TimeStamp timeStamp(); public native fc2CameraStats timeStamp(fc2TimeStamp timeStamp); + /* Number of packets requested for resend */ + public native @Cast("unsigned int") int numResendPacketsRequested(); public native fc2CameraStats numResendPacketsRequested(int numResendPacketsRequested); + /* Number of packet-resend packets received */ + public native @Cast("unsigned int") int numResendPacketsReceived(); public native fc2CameraStats numResendPacketsReceived(int numResendPacketsReceived); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2CameraStats reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** + * \defgroup CImageSaveStructures Image saving structures. + * + * These structures define various parameters used for saving images. + */ + + /*@{*/ + + /** Options for saving PNG images. */ + public static class fc2PNGOption extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2PNGOption() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2PNGOption(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2PNGOption(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2PNGOption position(long position) { + return (fc2PNGOption)super.position(position); + } + + /** Whether to save the PNG as interlaced. */ + public native @Cast("BOOL") int interlaced(); public native fc2PNGOption interlaced(int interlaced); + /** Compression level (0-9). 0 is no compression, 9 is best compression. */ + public native @Cast("unsigned int") int compressionLevel(); public native fc2PNGOption compressionLevel(int compressionLevel); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2PNGOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Options for saving PPM images. */ + public static class fc2PPMOption extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2PPMOption() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2PPMOption(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2PPMOption(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2PPMOption position(long position) { + return (fc2PPMOption)super.position(position); + } + + /** Whether to save the PPM as a binary file. */ + public native @Cast("BOOL") int binaryFile(); public native fc2PPMOption binaryFile(int binaryFile); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2PPMOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Options for saving PGM images. */ + public static class fc2PGMOption extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2PGMOption() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2PGMOption(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2PGMOption(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2PGMOption position(long position) { + return (fc2PGMOption)super.position(position); + } + + /** Whether to save the PPM as a binary file. */ + public native @Cast("BOOL") int binaryFile(); public native fc2PGMOption binaryFile(int binaryFile); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2PGMOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** enum _fc2TIFFCompressionMethod */ + public static final int + /** Save without any compression. */ + FC2_TIFF_NONE = 1, + /** Save using PACKBITS compression. */ + FC2_TIFF_PACKBITS = 2, + /** Save using DEFLATE compression (ZLIB compression). */ + FC2_TIFF_DEFLATE = 3, + /** Save using ADOBE DEFLATE compression */ + FC2_TIFF_ADOBE_DEFLATE = 4, + /** + * Save using CCITT Group 3 fax encoding. This is only valid for + * 1-bit images only. Default to LZW for other bit depths. + */ + FC2_TIFF_CCITTFAX3 = 5, + /** + * Save using CCITT Group 4 fax encoding. This is only valid for + * 1-bit images only. Default to LZW for other bit depths. + */ + FC2_TIFF_CCITTFAX4 = 6, + /** Save using LZW compression. */ + FC2_TIFF_LZW = 7, + /** + * Save using JPEG compression. This is only valid for 8-bit + * greyscale and 24-bit only. Default to LZW for other bit depths. + */ + FC2_TIFF_JPEG = 8; + + /** Options for saving TIFF images. */ + public static class fc2TIFFOption extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2TIFFOption() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2TIFFOption(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2TIFFOption(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2TIFFOption position(long position) { + return (fc2TIFFOption)super.position(position); + } + + /** Compression method to use for encoding TIFF images. */ + public native @Cast("fc2TIFFCompressionMethod") int compression(); public native fc2TIFFOption compression(int compression); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2TIFFOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Options for saving JPEG image. */ + public static class fc2JPEGOption extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2JPEGOption() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2JPEGOption(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2JPEGOption(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2JPEGOption position(long position) { + return (fc2JPEGOption)super.position(position); + } + + /** Whether to save as a progressive JPEG file. */ + public native @Cast("BOOL") int progressive(); public native fc2JPEGOption progressive(int progressive); + /** + * JPEG image quality in range (0-100). + * - 100 - Superb quality. + * - 75 - Good quality. + * - 50 - Normal quality. + * - 10 - Poor quality. + */ + public native @Cast("unsigned int") int quality(); public native fc2JPEGOption quality(int quality); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2JPEGOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + + } + + /** Options for saving JPEG2000 image. */ + public static class fc2JPG2Option extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2JPG2Option() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2JPG2Option(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2JPG2Option(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2JPG2Option position(long position) { + return (fc2JPG2Option)super.position(position); + } + + /** JPEG saving quality in range (1-512). */ + public native @Cast("unsigned int") int quality(); public native fc2JPG2Option quality(int quality); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2JPG2Option reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + /** Options for saving Bitmap image. */ + public static class fc2BMPOption extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2BMPOption() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2BMPOption(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2BMPOption(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2BMPOption position(long position) { + return (fc2BMPOption)super.position(position); + } + + public native @Cast("BOOL") int indexedColor_8bit(); public native fc2BMPOption indexedColor_8bit(int indexedColor_8bit); + /** Reserved for future use. */ + public native @Cast("unsigned int") int reserved(int i); public native fc2BMPOption reserved(int i, int reserved); + @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + } + + //============================================================================= + // Callbacks + //============================================================================= + + @Namespace @Name("void") @Opaque public static class fc2CallbackHandle extends Pointer { + /** Empty constructor. Calls {@code super((Pointer)null)}. */ + public fc2CallbackHandle() { super((Pointer)null); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2CallbackHandle(Pointer p) { super(p); } + } + public static class fc2BusEventCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2BusEventCallback(Pointer p) { super(p); } + protected fc2BusEventCallback() { allocate(); } + private native void allocate(); + public native void call( Pointer pParameter, @Cast("unsigned int") int serialNumber ); + } + public static class fc2ImageEventCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2ImageEventCallback(Pointer p) { super(p); } + protected fc2ImageEventCallback() { allocate(); } + private native void allocate(); + public native void call( fc2Image image, Pointer pCallbackData ); + } + public static class fc2AsyncCommandCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2AsyncCommandCallback(Pointer p) { super(p); } + protected fc2AsyncCommandCallback() { allocate(); } + private native void allocate(); + public native void call( @Cast("fc2Error") int retError, Pointer pUserData ); + } + public static class fc2CameraEventCallback extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2CameraEventCallback(Pointer p) { super(p); } + protected fc2CameraEventCallback() { allocate(); } + private native void allocate(); + public native void call( Pointer pCallbackData ); + } + + /******************************************************************************* + * Camera event data types + ******************************************************************************/ + /** Options for enabling device event registration. */ + public static class fc2EventOptions extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2EventOptions() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2EventOptions(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2EventOptions(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2EventOptions position(long position) { + return (fc2EventOptions)super.position(position); + } + + /** Callback function pointer */ + public native fc2CameraEventCallback EventCallbackFcn(); public native fc2EventOptions EventCallbackFcn(fc2CameraEventCallback EventCallbackFcn); + + /** Event name to register */ + @MemberGetter public native @Cast("const char*") BytePointer EventName(); + + /** Pointer to callback data to be passed to the callback function */ + @MemberGetter public native @Const Pointer EventUserData(); + + /** Size of the underlying struct passed as eventCallbackData for sanity checks */ + public native @Cast("size_t") long EventUserDataSize(); public native fc2EventOptions EventUserDataSize(long EventUserDataSize); + } + + + /* Callback data passed to the callback function provided when using + * RegisterEvent() or RegisterAllEvents(). + */ + public static class fc2EventCallbackData extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public fc2EventCallbackData() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public fc2EventCallbackData(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public fc2EventCallbackData(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public fc2EventCallbackData position(long position) { + return (fc2EventCallbackData)super.position(position); + } + + /** Pointer to the user-supplied data struct */ + public native Pointer EventUserData(); public native fc2EventCallbackData EventUserData(Pointer EventUserData); + + /** Size of the user data supplied to the RegisterEvent() + * function. + */ + public native @Cast("size_t") long EventUserDataSize(); public native fc2EventCallbackData EventUserDataSize(long EventUserDataSize); - /** A camera strobe. */ - public static class fc2StrobeControl extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2StrobeControl() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2StrobeControl(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2StrobeControl(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2StrobeControl position(long position) { - return (fc2StrobeControl)super.position(position); - } - - /** Source value. */ - public native @Cast("unsigned int") int source(); public native fc2StrobeControl source(int source); - /** Flag controlling on/off. */ - public native @Cast("BOOL") int onOff(); public native fc2StrobeControl onOff(int onOff); - /** Signal polarity. */ - public native @Cast("unsigned int") int polarity(); public native fc2StrobeControl polarity(int polarity); - /** Signal delay (in ms). */ - public native float delay(); public native fc2StrobeControl delay(float delay); - /** Signal duration (in ms). */ - public native float duration(); public native fc2StrobeControl duration(float duration); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2StrobeControl reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** The event name used to register the event. Provided so the user + * knows which event triggered the callback. + */ + @MemberGetter public native @Cast("const char*") BytePointer EventName(); - } + /** The device register which EventName maps to. Provides an alternate + * means of indexing into different event types. + */ + public native @Cast("unsigned long long") long EventID(); public native fc2EventCallbackData EventID(long EventID); - /** Timestamp information. */ - public static class fc2TimeStamp extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2TimeStamp() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2TimeStamp(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2TimeStamp(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2TimeStamp position(long position) { - return (fc2TimeStamp)super.position(position); - } - - /** Seconds. */ - public native long seconds(); public native fc2TimeStamp seconds(long seconds); - /** Microseconds. */ - public native @Cast("unsigned int") int microSeconds(); public native fc2TimeStamp microSeconds(int microSeconds); - /** 1394 cycle time seconds. */ - public native @Cast("unsigned int") int cycleSeconds(); public native fc2TimeStamp cycleSeconds(int cycleSeconds); - /** 1394 cycle time count. */ - public native @Cast("unsigned int") int cycleCount(); public native fc2TimeStamp cycleCount(int cycleCount); - /** 1394 cycle time offset. */ - public native @Cast("unsigned int") int cycleOffset(); public native fc2TimeStamp cycleOffset(int cycleOffset); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2TimeStamp reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** Timestamp indicated the time (as reported by the camera) at which + * the camera exposure operation completed. This can be compared with + * image timestamps if there is a need to map event timestamps to + * specific images, if applicable. + */ + public native @Cast("unsigned long long") long EventTimestamp(); public native fc2EventCallbackData EventTimestamp(long EventTimestamp); - } + /** A pointer to additional data pertaining to the event which just + * trigger the callback function. The data may be of difference sizes + * or may not even be allocated, depending on the type of event which + * triggered the callback. + */ + public native Pointer EventData(); public native fc2EventCallbackData EventData(Pointer EventData); - /** Camera configuration ROM. */ - public static class fc2ConfigROM extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2ConfigROM() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2ConfigROM(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2ConfigROM(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2ConfigROM position(long position) { - return (fc2ConfigROM)super.position(position); - } - - /** Vendor ID of a node. */ - public native @Cast("unsigned int") int nodeVendorId(); public native fc2ConfigROM nodeVendorId(int nodeVendorId); - /** Chip ID (high part). */ - public native @Cast("unsigned int") int chipIdHi(); public native fc2ConfigROM chipIdHi(int chipIdHi); - /** Chip ID (low part). */ - public native @Cast("unsigned int") int chipIdLo(); public native fc2ConfigROM chipIdLo(int chipIdLo); - /** Unit Spec ID, usually 0xa02d. */ - public native @Cast("unsigned int") int unitSpecId(); public native fc2ConfigROM unitSpecId(int unitSpecId); - /** Unit software version. */ - public native @Cast("unsigned int") int unitSWVer(); public native fc2ConfigROM unitSWVer(int unitSWVer); - /** Unit sub software version. */ - public native @Cast("unsigned int") int unitSubSWVer(); public native fc2ConfigROM unitSubSWVer(int unitSubSWVer); - /** Vendor unique info 0. */ - public native @Cast("unsigned int") int vendorUniqueInfo_0(); public native fc2ConfigROM vendorUniqueInfo_0(int vendorUniqueInfo_0); - /** Vendor unique info 1. */ - public native @Cast("unsigned int") int vendorUniqueInfo_1(); public native fc2ConfigROM vendorUniqueInfo_1(int vendorUniqueInfo_1); - /** Vendor unique info 2. */ - public native @Cast("unsigned int") int vendorUniqueInfo_2(); public native fc2ConfigROM vendorUniqueInfo_2(int vendorUniqueInfo_2); - /** Vendor unique info 3. */ - public native @Cast("unsigned int") int vendorUniqueInfo_3(); public native fc2ConfigROM vendorUniqueInfo_3(int vendorUniqueInfo_3); - /** Keyword. */ - public native @Cast("char") byte pszKeyword(int i); public native fc2ConfigROM pszKeyword(int i, byte pszKeyword); - @MemberGetter public native @Cast("char*") BytePointer pszKeyword(); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2ConfigROM reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /** The size of the structure pointed to by EventData. This value should + * be checked, especially if there are events which can trigger variable- + * length event data to be returned to the user when the callback function + * is issued. + */ + public native @Cast("size_t") long EventDataSize(); public native fc2EventCallbackData EventDataSize(long EventDataSize); + } - } + /*@}*/ - /** Camera information. */ - public static class fc2CameraInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2CameraInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2CameraInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2CameraInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2CameraInfo position(long position) { - return (fc2CameraInfo)super.position(position); - } - - /** Device serial number. */ - public native @Cast("unsigned int") int serialNumber(); public native fc2CameraInfo serialNumber(int serialNumber); - /** Interface type. */ - public native @Cast("fc2InterfaceType") int interfaceType(); public native fc2CameraInfo interfaceType(int interfaceType); - /** Driver type. */ - public native @Cast("fc2DriverType") int driverType(); public native fc2CameraInfo driverType(int driverType); - /** Flag indicating if this is a color camera. */ - public native @Cast("BOOL") int isColorCamera(); public native fc2CameraInfo isColorCamera(int isColorCamera); - /** Device model name. */ - public native @Cast("char") byte modelName(int i); public native fc2CameraInfo modelName(int i, byte modelName); - @MemberGetter public native @Cast("char*") BytePointer modelName(); - /** Device vendor name. */ - public native @Cast("char") byte vendorName(int i); public native fc2CameraInfo vendorName(int i, byte vendorName); - @MemberGetter public native @Cast("char*") BytePointer vendorName(); - /** String detailing the sensor information. */ - public native @Cast("char") byte sensorInfo(int i); public native fc2CameraInfo sensorInfo(int i, byte sensorInfo); - @MemberGetter public native @Cast("char*") BytePointer sensorInfo(); - /** String providing the sensor resolution. */ - public native @Cast("char") byte sensorResolution(int i); public native fc2CameraInfo sensorResolution(int i, byte sensorResolution); - @MemberGetter public native @Cast("char*") BytePointer sensorResolution(); - /** Driver name of driver being used. */ - public native @Cast("char") byte driverName(int i); public native fc2CameraInfo driverName(int i, byte driverName); - @MemberGetter public native @Cast("char*") BytePointer driverName(); - /** Firmware version of camera. */ - public native @Cast("char") byte firmwareVersion(int i); public native fc2CameraInfo firmwareVersion(int i, byte firmwareVersion); - @MemberGetter public native @Cast("char*") BytePointer firmwareVersion(); - /** Firmware build time. */ - public native @Cast("char") byte firmwareBuildTime(int i); public native fc2CameraInfo firmwareBuildTime(int i, byte firmwareBuildTime); - @MemberGetter public native @Cast("char*") BytePointer firmwareBuildTime(); - /** Maximum bus speed. */ - public native @Cast("fc2BusSpeed") int maximumBusSpeed(); public native fc2CameraInfo maximumBusSpeed(int maximumBusSpeed); - /** Bayer tile format. */ - public native @Cast("fc2BayerTileFormat") int bayerTileFormat(); public native fc2CameraInfo bayerTileFormat(int bayerTileFormat); - /** Bus number, set to 0 for GigE and USB cameras **/ - public native @Cast("fc2PCIeBusSpeed") int pcieBusSpeed(); public native fc2CameraInfo pcieBusSpeed(int pcieBusSpeed); - /** ieee1394 Node number, set to 0 for GigE and USB cameras **/ - public native @Cast("unsigned short") short nodeNumber(); public native fc2CameraInfo nodeNumber(short nodeNumber); - /** PCIe Bus Speed, set to PCIE_BUSSPEED_UNKNOWN for unsupported drivers **/ - public native @Cast("unsigned short") short busNumber(); public native fc2CameraInfo busNumber(short busNumber); - - /** \name IIDC specific information */ - /*@{*/ - /** DCAM version. */ - public native @Cast("unsigned int") int iidcVer(); public native fc2CameraInfo iidcVer(int iidcVer); - /** Configuration ROM data. */ - public native @ByRef fc2ConfigROM configROM(); public native fc2CameraInfo configROM(fc2ConfigROM configROM); - /*@}*/ - - /** \name GigE specific information */ - /*@{*/ - /** GigE Vision version. */ - public native @Cast("unsigned int") int gigEMajorVersion(); public native fc2CameraInfo gigEMajorVersion(int gigEMajorVersion); - /** GigE Vision minor version. */ - public native @Cast("unsigned int") int gigEMinorVersion(); public native fc2CameraInfo gigEMinorVersion(int gigEMinorVersion); - /** User defined name. */ - public native @Cast("char") byte userDefinedName(int i); public native fc2CameraInfo userDefinedName(int i, byte userDefinedName); - @MemberGetter public native @Cast("char*") BytePointer userDefinedName(); - /** XML URL 1. */ - public native @Cast("char") byte xmlURL1(int i); public native fc2CameraInfo xmlURL1(int i, byte xmlURL1); - @MemberGetter public native @Cast("char*") BytePointer xmlURL1(); - /** XML URL 2. */ - public native @Cast("char") byte xmlURL2(int i); public native fc2CameraInfo xmlURL2(int i, byte xmlURL2); - @MemberGetter public native @Cast("char*") BytePointer xmlURL2(); - /** MAC address */ - public native @ByRef fc2MACAddress macAddress(); public native fc2CameraInfo macAddress(fc2MACAddress macAddress); - /** IP address. */ - public native @ByRef fc2IPAddress ipAddress(); public native fc2CameraInfo ipAddress(fc2IPAddress ipAddress); - /** Subnet mask. */ - public native @ByRef fc2IPAddress subnetMask(); public native fc2CameraInfo subnetMask(fc2IPAddress subnetMask); - /** Default gateway. */ - public native @ByRef fc2IPAddress defaultGateway(); public native fc2CameraInfo defaultGateway(fc2IPAddress defaultGateway); - /** Status/Content of CCP register */ - public native @Cast("unsigned int") int ccpStatus(); public native fc2CameraInfo ccpStatus(int ccpStatus); - /** Local Application IP Address. */ - public native @Cast("unsigned int") int applicationIPAddress(); public native fc2CameraInfo applicationIPAddress(int applicationIPAddress); - /** Local Application port. */ - public native @Cast("unsigned int") int applicationPort(); public native fc2CameraInfo applicationPort(int applicationPort); - /*@}*/ - - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2CameraInfo reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); + /*@}*/ - } +// #ifdef __cplusplus +// #endif - /** Properties of a single embedded image info property. */ - public static class fc2EmbeddedImageInfoProperty extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2EmbeddedImageInfoProperty() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2EmbeddedImageInfoProperty(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2EmbeddedImageInfoProperty(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2EmbeddedImageInfoProperty position(long position) { - return (fc2EmbeddedImageInfoProperty)super.position(position); - } - - /** Whether this property is available. */ - public native @Cast("BOOL") int available(); public native fc2EmbeddedImageInfoProperty available(int available); - /** Whether this property is on or off. */ - public native @Cast("BOOL") int onOff(); public native fc2EmbeddedImageInfoProperty onOff(int onOff); +// #endif // FLIR_FLYCAPTURE2DEFS_C_H - } +// Parsed from - /** Properties of the possible embedded image information. */ - public static class fc2EmbeddedImageInfo extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2EmbeddedImageInfo() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2EmbeddedImageInfo(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2EmbeddedImageInfo(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2EmbeddedImageInfo position(long position) { - return (fc2EmbeddedImageInfo)super.position(position); - } - - public native @ByRef fc2EmbeddedImageInfoProperty timestamp(); public native fc2EmbeddedImageInfo timestamp(fc2EmbeddedImageInfoProperty timestamp); - public native @ByRef fc2EmbeddedImageInfoProperty gain(); public native fc2EmbeddedImageInfo gain(fc2EmbeddedImageInfoProperty gain); - public native @ByRef fc2EmbeddedImageInfoProperty shutter(); public native fc2EmbeddedImageInfo shutter(fc2EmbeddedImageInfoProperty shutter); - public native @ByRef fc2EmbeddedImageInfoProperty brightness(); public native fc2EmbeddedImageInfo brightness(fc2EmbeddedImageInfoProperty brightness); - public native @ByRef fc2EmbeddedImageInfoProperty exposure(); public native fc2EmbeddedImageInfo exposure(fc2EmbeddedImageInfoProperty exposure); - public native @ByRef fc2EmbeddedImageInfoProperty whiteBalance(); public native fc2EmbeddedImageInfo whiteBalance(fc2EmbeddedImageInfoProperty whiteBalance); - public native @ByRef fc2EmbeddedImageInfoProperty frameCounter(); public native fc2EmbeddedImageInfo frameCounter(fc2EmbeddedImageInfoProperty frameCounter); - public native @ByRef fc2EmbeddedImageInfoProperty strobePattern(); public native fc2EmbeddedImageInfo strobePattern(fc2EmbeddedImageInfoProperty strobePattern); - public native @ByRef fc2EmbeddedImageInfoProperty GPIOPinState(); public native fc2EmbeddedImageInfo GPIOPinState(fc2EmbeddedImageInfoProperty GPIOPinState); - public native @ByRef fc2EmbeddedImageInfoProperty ROIPosition(); public native fc2EmbeddedImageInfo ROIPosition(fc2EmbeddedImageInfoProperty ROIPosition); +//============================================================================= +// Copyright (c) 2001-2018 FLIR Systems, 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. +//============================================================================= - } - - /** Metadata related to an image. */ - public static class fc2ImageMetadata extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2ImageMetadata() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2ImageMetadata(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2ImageMetadata(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2ImageMetadata position(long position) { - return (fc2ImageMetadata)super.position(position); - } - - /** Embedded timestamp. */ - public native @Cast("unsigned int") int embeddedTimeStamp(); public native fc2ImageMetadata embeddedTimeStamp(int embeddedTimeStamp); - /** Embedded gain. */ - public native @Cast("unsigned int") int embeddedGain(); public native fc2ImageMetadata embeddedGain(int embeddedGain); - /** Embedded shutter. */ - public native @Cast("unsigned int") int embeddedShutter(); public native fc2ImageMetadata embeddedShutter(int embeddedShutter); - /** Embedded brightness. */ - public native @Cast("unsigned int") int embeddedBrightness(); public native fc2ImageMetadata embeddedBrightness(int embeddedBrightness); - /** Embedded exposure. */ - public native @Cast("unsigned int") int embeddedExposure(); public native fc2ImageMetadata embeddedExposure(int embeddedExposure); - /** Embedded white balance. */ - public native @Cast("unsigned int") int embeddedWhiteBalance(); public native fc2ImageMetadata embeddedWhiteBalance(int embeddedWhiteBalance); - /** Embedded frame counter. */ - public native @Cast("unsigned int") int embeddedFrameCounter(); public native fc2ImageMetadata embeddedFrameCounter(int embeddedFrameCounter); - /** Embedded strobe pattern. */ - public native @Cast("unsigned int") int embeddedStrobePattern(); public native fc2ImageMetadata embeddedStrobePattern(int embeddedStrobePattern); - /** Embedded GPIO pin state. */ - public native @Cast("unsigned int") int embeddedGPIOPinState(); public native fc2ImageMetadata embeddedGPIOPinState(int embeddedGPIOPinState); - /** Embedded ROI position. */ - public native @Cast("unsigned int") int embeddedROIPosition(); public native fc2ImageMetadata embeddedROIPosition(int embeddedROIPosition); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2ImageMetadata reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Information about the camera's look up table. */ - public static class fc2LUTData extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2LUTData() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2LUTData(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2LUTData(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2LUTData position(long position) { - return (fc2LUTData)super.position(position); - } - - /** Flag indicating if LUT is supported. */ - public native @Cast("BOOL") int supported(); public native fc2LUTData supported(int supported); - /** Flag indicating if LUT is enabled. */ - public native @Cast("BOOL") int enabled(); public native fc2LUTData enabled(int enabled); - /** The number of LUT banks available (Always 1 for PGR LUT). */ - public native @Cast("unsigned int") int numBanks(); public native fc2LUTData numBanks(int numBanks); - /** The number of LUT channels per bank available. */ - public native @Cast("unsigned int") int numChannels(); public native fc2LUTData numChannels(int numChannels); - /** The input bit depth of the LUT. */ - public native @Cast("unsigned int") int inputBitDepth(); public native fc2LUTData inputBitDepth(int inputBitDepth); - /** The output bit depth of the LUT. */ - public native @Cast("unsigned int") int outputBitDepth(); public native fc2LUTData outputBitDepth(int outputBitDepth); - /** The number of entries in the LUT. */ - public native @Cast("unsigned int") int numEntries(); public native fc2LUTData numEntries(int numEntries); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2LUTData reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Camera diagnostic information. */ - public static class fc2CameraStats extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2CameraStats() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2CameraStats(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2CameraStats(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2CameraStats position(long position) { - return (fc2CameraStats)super.position(position); - } - - /* Number of dropped images in DROP_IMAGE mode */ - public native @Cast("unsigned int") int imageDropped(); public native fc2CameraStats imageDropped(int imageDropped); - /* Number of corrupt images, such as missing packet, zero packet */ - public native @Cast("unsigned int") int imageCorrupt(); public native fc2CameraStats imageCorrupt(int imageCorrupt); - /* Number of transmissions failed of camera */ - public native @Cast("unsigned int") int imageXmitFailed(); public native fc2CameraStats imageXmitFailed(int imageXmitFailed); - /* Number of images dropped in driver */ - public native @Cast("unsigned int") int imageDriverDropped(); public native fc2CameraStats imageDriverDropped(int imageDriverDropped); - /* Errors of register reading */ - public native @Cast("unsigned int") int regReadFailed(); public native fc2CameraStats regReadFailed(int regReadFailed); - /* Errors of register writing */ - public native @Cast("unsigned int") int regWriteFailed(); public native fc2CameraStats regWriteFailed(int regWriteFailed); - /* Port errors */ - public native @Cast("unsigned int") int portErrors(); public native fc2CameraStats portErrors(int portErrors); - - /* The value of the camera power register. - * false: Camera is powered down. - * true: Camera is powered up. - */ - public native @Cast("BOOL") int cameraPowerUp(); public native fc2CameraStats cameraPowerUp(int cameraPowerUp); - - /* The voltage values of the various voltage registers - * supported by the camera. - */ - public native float cameraVoltages(int i); public native fc2CameraStats cameraVoltages(int i, float cameraVoltages); - @MemberGetter public native FloatPointer cameraVoltages(); - - /** The number of voltage registers available. - * 0: the values in cameraVoltages[] are invalid. - */ - public native @Cast("unsigned int") int numVoltages(); public native fc2CameraStats numVoltages(int numVoltages); - - /* The current values of the various current registers - * supported by the camera. - */ - public native float cameraCurrents(int i); public native fc2CameraStats cameraCurrents(int i, float cameraCurrents); - @MemberGetter public native FloatPointer cameraCurrents(); - - /** The number of current registers available. - * 0: the values in cameraCurrents[] are invalid. - */ - public native @Cast("unsigned int") int numCurrents(); public native fc2CameraStats numCurrents(int numCurrents); - - /* The temperature of the camera board-level components. The value is - * in kelvins (0�C = 273.15K) and are in one-tenths (0.1) of a kelvin. - */ - public native @Cast("unsigned int") int temperature(); public native fc2CameraStats temperature(int temperature); - - /* Time in seconds since the camera was initialized. */ - public native @Cast("unsigned int") int timeSinceInitialization(); public native fc2CameraStats timeSinceInitialization(int timeSinceInitialization); - /* Time in seconds since the camera detected a bus reset. */ - public native @Cast("unsigned int") int timeSinceBusReset(); public native fc2CameraStats timeSinceBusReset(int timeSinceBusReset); - /* Time stamp */ - public native @ByRef fc2TimeStamp timeStamp(); public native fc2CameraStats timeStamp(fc2TimeStamp timeStamp); - /* Number of packets requested for resend */ - public native @Cast("unsigned int") int numResendPacketsRequested(); public native fc2CameraStats numResendPacketsRequested(int numResendPacketsRequested); - /* Number of packet-resend packets received */ - public native @Cast("unsigned int") int numResendPacketsReceived(); public native fc2CameraStats numResendPacketsReceived(int numResendPacketsReceived); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2CameraStats reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** - * \defgroup CImageSaveStructures Image saving structures. - * - * These structures define various parameters used for saving images. - */ - - /*@{*/ - - /** Options for saving PNG images. */ - public static class fc2PNGOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2PNGOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2PNGOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2PNGOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2PNGOption position(long position) { - return (fc2PNGOption)super.position(position); - } - - /** Whether to save the PNG as interlaced. */ - public native @Cast("BOOL") int interlaced(); public native fc2PNGOption interlaced(int interlaced); - /** Compression level (0-9). 0 is no compression, 9 is best compression. */ - public native @Cast("unsigned int") int compressionLevel(); public native fc2PNGOption compressionLevel(int compressionLevel); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2PNGOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Options for saving PPM images. */ - public static class fc2PPMOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2PPMOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2PPMOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2PPMOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2PPMOption position(long position) { - return (fc2PPMOption)super.position(position); - } - - /** Whether to save the PPM as a binary file. */ - public native @Cast("BOOL") int binaryFile(); public native fc2PPMOption binaryFile(int binaryFile); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2PPMOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Options for saving PGM images. */ - public static class fc2PGMOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2PGMOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2PGMOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2PGMOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2PGMOption position(long position) { - return (fc2PGMOption)super.position(position); - } - - /** Whether to save the PPM as a binary file. */ - public native @Cast("BOOL") int binaryFile(); public native fc2PGMOption binaryFile(int binaryFile); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2PGMOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** enum _fc2TIFFCompressionMethod */ - public static final int - /** Save without any compression. */ - FC2_TIFF_NONE = 1, - /** Save using PACKBITS compression. */ - FC2_TIFF_PACKBITS = 2, - /** Save using DEFLATE compression (ZLIB compression). */ - FC2_TIFF_DEFLATE = 3, - /** Save using ADOBE DEFLATE compression */ - FC2_TIFF_ADOBE_DEFLATE = 4, - /** - * Save using CCITT Group 3 fax encoding. This is only valid for - * 1-bit images only. Default to LZW for other bit depths. - */ - FC2_TIFF_CCITTFAX3 = 5, - /** - * Save using CCITT Group 4 fax encoding. This is only valid for - * 1-bit images only. Default to LZW for other bit depths. - */ - FC2_TIFF_CCITTFAX4 = 6, - /** Save using LZW compression. */ - FC2_TIFF_LZW = 7, - /** - * Save using JPEG compression. This is only valid for 8-bit - * greyscale and 24-bit only. Default to LZW for other bit depths. - */ - FC2_TIFF_JPEG = 8; - - /** Options for saving TIFF images. */ - public static class fc2TIFFOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2TIFFOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2TIFFOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2TIFFOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2TIFFOption position(long position) { - return (fc2TIFFOption)super.position(position); - } - - /** Compression method to use for encoding TIFF images. */ - public native @Cast("fc2TIFFCompressionMethod") int compression(); public native fc2TIFFOption compression(int compression); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2TIFFOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Options for saving JPEG image. */ - public static class fc2JPEGOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2JPEGOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2JPEGOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2JPEGOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2JPEGOption position(long position) { - return (fc2JPEGOption)super.position(position); - } - - /** Whether to save as a progressive JPEG file. */ - public native @Cast("BOOL") int progressive(); public native fc2JPEGOption progressive(int progressive); - /** - * JPEG image quality in range (0-100). - * - 100 - Superb quality. - * - 75 - Good quality. - * - 50 - Normal quality. - * - 10 - Poor quality. - */ - public native @Cast("unsigned int") int quality(); public native fc2JPEGOption quality(int quality); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2JPEGOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Options for saving JPEG2000 image. */ - public static class fc2JPG2Option extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2JPG2Option() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2JPG2Option(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2JPG2Option(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2JPG2Option position(long position) { - return (fc2JPG2Option)super.position(position); - } - - /** JPEG saving quality in range (1-512). */ - public native @Cast("unsigned int") int quality(); public native fc2JPG2Option quality(int quality); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2JPG2Option reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /** Options for saving Bitmap image. */ - public static class fc2BMPOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2BMPOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2BMPOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2BMPOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2BMPOption position(long position) { - return (fc2BMPOption)super.position(position); - } - - public native @Cast("BOOL") int indexedColor_8bit(); public native fc2BMPOption indexedColor_8bit(int indexedColor_8bit); - /** Reserved for future use. */ - public native @Cast("unsigned int") int reserved(int i); public native fc2BMPOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - /** Options for saving MJPG files. */ - public static class fc2MJPGOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2MJPGOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2MJPGOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2MJPGOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2MJPGOption position(long position) { - return (fc2MJPGOption)super.position(position); - } - - /** Frame rate of the stream */ - public native float frameRate(); public native fc2MJPGOption frameRate(float frameRate); - /** Image quality (1-100) */ - public native @Cast("unsigned int") int quality(); public native fc2MJPGOption quality(int quality); - public native @Cast("unsigned int") int reserved(int i); public native fc2MJPGOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Options for saving H264 files. */ - public static class fc2H264Option extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2H264Option() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2H264Option(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2H264Option(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2H264Option position(long position) { - return (fc2H264Option)super.position(position); - } - - /** Frame rate of the stream */ - public native float frameRate(); public native fc2H264Option frameRate(float frameRate); - /** Width of source image */ - public native @Cast("unsigned int") int width(); public native fc2H264Option width(int width); - /** Height of source image */ - public native @Cast("unsigned int") int height(); public native fc2H264Option height(int height); - /** Bitrate to encode at */ - public native @Cast("unsigned int") int bitrate(); public native fc2H264Option bitrate(int bitrate); - /** Reserved for future use */ - public native @Cast("unsigned int") int reserved(int i); public native fc2H264Option reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - - } - - /** Options for saving AVI files. */ - public static class fc2AVIOption extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2AVIOption() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2AVIOption(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2AVIOption(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2AVIOption position(long position) { - return (fc2AVIOption)super.position(position); - } - - /** Frame rate of the stream */ - public native float frameRate(); public native fc2AVIOption frameRate(float frameRate); - /** Reserved for future use */ - public native @Cast("unsigned int") int reserved(int i); public native fc2AVIOption reserved(int i, int reserved); - @MemberGetter public native @Cast("unsigned int*") IntPointer reserved(); - } - - //============================================================================= - // Callbacks - //============================================================================= - - @Namespace @Name("void") @Opaque public static class fc2CallbackHandle extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public fc2CallbackHandle() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2CallbackHandle(Pointer p) { super(p); } - } - public static class fc2BusEventCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2BusEventCallback(Pointer p) { super(p); } - protected fc2BusEventCallback() { allocate(); } - private native void allocate(); - public native void call( Pointer pParameter, @Cast("unsigned int") int serialNumber ); - } - public static class fc2ImageEventCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2ImageEventCallback(Pointer p) { super(p); } - protected fc2ImageEventCallback() { allocate(); } - private native void allocate(); - public native void call( fc2Image image, Pointer pCallbackData ); - } - public static class fc2AsyncCommandCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2AsyncCommandCallback(Pointer p) { super(p); } - protected fc2AsyncCommandCallback() { allocate(); } - private native void allocate(); - public native void call( @Cast("fc2Error") int retError, Pointer pUserData ); - } - public static class fc2CameraEventCallback extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2CameraEventCallback(Pointer p) { super(p); } - protected fc2CameraEventCallback() { allocate(); } - private native void allocate(); - public native void call( Pointer pCallbackData ); - } - - /******************************************************************************* - * Camera event data types - ******************************************************************************/ - /** Options for enabling device event registration. */ - public static class fc2EventOptions extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2EventOptions() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2EventOptions(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2EventOptions(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2EventOptions position(long position) { - return (fc2EventOptions)super.position(position); - } - - /** Callback function pointer */ - public native fc2CameraEventCallback EventCallbackFcn(); public native fc2EventOptions EventCallbackFcn(fc2CameraEventCallback EventCallbackFcn); - - /** Event name to register */ - @MemberGetter public native @Cast("const char*") BytePointer EventName(); - - /** Pointer to callback data to be passed to the callback function */ - @MemberGetter public native @Const Pointer EventUserData(); - - /** Size of the underlying struct passed as eventCallbackData for sanity checks */ - public native @Cast("size_t") long EventUserDataSize(); public native fc2EventOptions EventUserDataSize(long EventUserDataSize); - } - - - /* Callback data passed to the callback function provided when using - * RegisterEvent() or RegisterAllEvents(). - */ - public static class fc2EventCallbackData extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public fc2EventCallbackData() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public fc2EventCallbackData(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public fc2EventCallbackData(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public fc2EventCallbackData position(long position) { - return (fc2EventCallbackData)super.position(position); - } - - /** Pointer to the user-supplied data struct */ - public native Pointer EventUserData(); public native fc2EventCallbackData EventUserData(Pointer EventUserData); - - /** Size of the user data supplied to the RegisterEvent() - * function. - */ - public native @Cast("size_t") long EventUserDataSize(); public native fc2EventCallbackData EventUserDataSize(long EventUserDataSize); - - /** The event name used to register the event. Provided so the user - * knows which event triggered the callback. - */ - @MemberGetter public native @Cast("const char*") BytePointer EventName(); - - /** The device register which EventName maps to. Provides an alternate - * means of indexing into different event types. - */ - public native @Cast("unsigned long long") long EventID(); public native fc2EventCallbackData EventID(long EventID); - - /** Timestamp indicated the time (as reported by the camera) at which - * the camera exposure operation completed. This can be compared with - * image timestamps if there is a need to map event timestamps to - * specific images, if applicable. - */ - public native @Cast("unsigned long long") long EventTimestamp(); public native fc2EventCallbackData EventTimestamp(long EventTimestamp); - - /** A pointer to additional data pertaining to the event which just - * trigger the callback function. The data may be of difference sizes - * or may not even be allocated, depending on the type of event which - * triggered the callback. - */ - public native Pointer EventData(); public native fc2EventCallbackData EventData(Pointer EventData); - - /** The size of the structure pointed to by EventData. This value should - * be checked, especially if there are events which can trigger variable- - * length event data to be returned to the user when the callback function - * is issued. - */ - public native @Cast("size_t") long EventDataSize(); public native fc2EventCallbackData EventDataSize(long EventDataSize); - } - - /*@}*/ - - /*@}*/ - -// #ifdef __cplusplus -// #endif - -// #endif // PGR_FC2_FLYCAPTURE2DEFS_C_H - -// Parsed from - -//============================================================================= -// 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 +// #ifndef FLIR_FLYCAPTURE2_C_H +// #define FLIR_FLYCAPTURE2_C_H //============================================================================= // Global C header file for FlyCapture2. @@ -2410,3424 +2319,3314 @@ public static class fc2EventCallbackData extends Pointer { // #ifdef __cplusplus // #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. - */ - public static native @Cast("fc2Error") int fc2CreateContext( - @Cast("fc2Context*") @ByPtrPtr 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. - */ - public static native @Cast("fc2Error") int fc2CreateGigEContext( - @Cast("fc2Context*") @ByPtrPtr 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int fc2GetNumOfCameras( - fc2Context context, - @Cast("unsigned int*") IntPointer pNumCameras ); - public static native @Cast("fc2Error") int fc2GetNumOfCameras( - fc2Context context, - @Cast("unsigned int*") IntBuffer pNumCameras ); - public static native @Cast("fc2Error") int fc2GetNumOfCameras( - fc2Context context, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2GetCameraFromIPAddress( - fc2Context context, - @ByVal 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. - */ - public static native @Cast("fc2Error") int fc2GetCameraFromIndex( - fc2Context context, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2GetCameraFromSerialNumber( - fc2Context context, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2GetCameraSerialNumberFromIndex( - fc2Context context, - @Cast("unsigned int") int index, - @Cast("unsigned int*") IntPointer pSerialNumber ); - public static native @Cast("fc2Error") int fc2GetCameraSerialNumberFromIndex( - fc2Context context, - @Cast("unsigned int") int index, - @Cast("unsigned int*") IntBuffer pSerialNumber ); - public static native @Cast("fc2Error") int fc2GetCameraSerialNumberFromIndex( - fc2Context context, - @Cast("unsigned int") int index, - @Cast("unsigned int*") 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 - */ - public static native @Cast("fc2Error") int fc2GetInterfaceTypeFromGuid( - fc2Context context, - fc2PGRGuid pGuid, - @Cast("fc2InterfaceType*") IntPointer pInterfaceType ); - public static native @Cast("fc2Error") int fc2GetInterfaceTypeFromGuid( - fc2Context context, - fc2PGRGuid pGuid, - @Cast("fc2InterfaceType*") IntBuffer pInterfaceType ); - public static native @Cast("fc2Error") int fc2GetInterfaceTypeFromGuid( - fc2Context context, - fc2PGRGuid pGuid, - @Cast("fc2InterfaceType*") int[] 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. - */ - public static native @Cast("fc2Error") int fc2GetNumOfDevices( - fc2Context context, - @Cast("unsigned int*") IntPointer pNumDevices ); - public static native @Cast("fc2Error") int fc2GetNumOfDevices( - fc2Context context, - @Cast("unsigned int*") IntBuffer pNumDevices ); - public static native @Cast("fc2Error") int fc2GetNumOfDevices( - fc2Context context, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2GetDeviceFromIndex( - fc2Context context, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2ReadPhyRegister( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pValue ); - public static native @Cast("fc2Error") int fc2ReadPhyRegister( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pValue ); - public static native @Cast("fc2Error") int fc2ReadPhyRegister( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2WritePhyRegister( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int") int page, - @Cast("unsigned int") int port, - @Cast("unsigned int") int address, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2GetUsbLinkInfo( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int*") IntPointer pValue ); - public static native @Cast("fc2Error") int fc2GetUsbLinkInfo( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int*") IntBuffer pValue ); - public static native @Cast("fc2Error") int fc2GetUsbLinkInfo( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2GetUsbPortStatus( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int*") IntPointer pValue ); - public static native @Cast("fc2Error") int fc2GetUsbPortStatus( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int*") IntBuffer pValue ); - public static native @Cast("fc2Error") int fc2GetUsbPortStatus( - fc2Context context, - @ByVal fc2PGRGuid guid, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2GetTopology( - fc2Context context, - @ByPtrPtr 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. - */ - public static native @Cast("fc2Error") int fc2RegisterCallback( - fc2Context context, - fc2BusEventCallback enumCallback, - @Cast("fc2BusCallbackType") int callbackType, - Pointer pParameter, - @ByPtrPtr 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int fc2ForceIPAddressToCamera( - fc2Context context, - @ByVal fc2MACAddress macAddress, - @ByVal fc2IPAddress ipAddress, - @ByVal fc2IPAddress subnetMask, - @ByVal 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int fc2ForceIPAddressAutomatically(@Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2DiscoverGigECameras( - fc2Context context, - fc2CameraInfo gigECameras, - @Cast("unsigned int*") IntPointer arraySize ); - public static native @Cast("fc2Error") int fc2DiscoverGigECameras( - fc2Context context, - fc2CameraInfo gigECameras, - @Cast("unsigned int*") IntBuffer arraySize ); - public static native @Cast("fc2Error") int fc2DiscoverGigECameras( - fc2Context context, - fc2CameraInfo gigECameras, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2IsCameraControlable( - fc2Context context, - fc2PGRGuid pGuid, - @Cast("BOOL*") IntPointer pControlable); - public static native @Cast("fc2Error") int fc2IsCameraControlable( - fc2Context context, - fc2PGRGuid pGuid, - @Cast("BOOL*") IntBuffer pControlable); - public static native @Cast("fc2Error") int fc2IsCameraControlable( - fc2Context context, - fc2PGRGuid pGuid, - @Cast("BOOL*") int[] 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("BOOL") int 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. - */ - public static native @Cast("fc2Error") int fc2SetCallback( - fc2Context context, - fc2ImageEventCallback pCallbackFn, - Pointer 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int fc2StartCaptureCallback( - fc2Context context, - fc2ImageEventCallback pCallbackFn, - Pointer 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. - */ - public static native @Cast("fc2Error") int fc2StartSyncCapture( - @Cast("unsigned int") int numCameras, - @Cast("fc2Context*") @ByPtrPtr 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. - */ - public static native @Cast("fc2Error") int fc2StartSyncCaptureCallback( - @Cast("unsigned int") int numCameras, - @Cast("fc2Context*") @ByPtrPtr fc2Context pContexts, - @Cast("fc2ImageEventCallback*") @ByPtrPtr fc2ImageEventCallback pCallbackFns, - @Cast("void**") PointerPointer pCallbackDataArray); - public static native @Cast("fc2Error") int fc2StartSyncCaptureCallback( - @Cast("unsigned int") int numCameras, - @Cast("fc2Context*") @ByPtrPtr fc2Context pContexts, - @Cast("fc2ImageEventCallback*") @ByPtrPtr fc2ImageEventCallback pCallbackFns, - @Cast("void**") @ByPtrPtr Pointer 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int fc2WaitForBufferEvent( - fc2Context context, - fc2Image pImage, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2SetUserBuffers( - fc2Context context, - @Cast("unsigned char*const") BytePointer ppMemBuffers, - int size, - int nNumBuffers ); - public static native @Cast("fc2Error") int fc2SetUserBuffers( - fc2Context context, - @Cast("unsigned char*const") ByteBuffer ppMemBuffers, - int size, - int nNumBuffers ); - public static native @Cast("fc2Error") int fc2SetUserBuffers( - fc2Context context, - @Cast("unsigned char*const") byte[] 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int fc2GetGPIOPinDirection( - fc2Context context, - @Cast("unsigned int") int pin, - @Cast("unsigned int*") IntPointer pDirection ); - public static native @Cast("fc2Error") int fc2GetGPIOPinDirection( - fc2Context context, - @Cast("unsigned int") int pin, - @Cast("unsigned int*") IntBuffer pDirection ); - public static native @Cast("fc2Error") int fc2GetGPIOPinDirection( - fc2Context context, - @Cast("unsigned int") int pin, - @Cast("unsigned int*") 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. - */ - public static native @Cast("fc2Error") int fc2SetGPIOPinDirection( - fc2Context context, - @Cast("unsigned int") int pin, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int fc2SetGPIOPinDirectionBroadcast( - fc2Context context, - @Cast("unsigned int") int pin, - @Cast("unsigned int") 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - */ - public static native @Cast("fc2Error") int 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. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetTriggerDelayInfo( - fc2Context context, - @Cast("fc2TriggerDelayInfo*") fc2PropertyInfo triggerDelayInfo ); - - /** - * Retrieve current trigger delay settings from the camera. - * - * @see fc2GetTriggerModeInfo() - * @see fc2GetTriggerMode() - * @see fc2SetTriggerMode() - * @see fc2GetTriggerDelayInfo() - * @see fc2SetTriggerDelay() - * @see fc2SetTriggerDelayBroadcast() - * - * @param context The fc2Context to be used. - * @param triggerDelay Structure to receive trigger delay settings. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetTriggerDelay( - fc2Context context, - @Cast("fc2TriggerDelay*") fc2Property triggerDelay ); - - /** - * Set the specified trigger delay settings to the camera. - * - * @see fc2GetTriggerModeInfo() - * @see fc2GetTriggerMode() - * @see fc2SetTriggerMode() - * @see fc2GetTriggerDelayInfo() - * @see fc2GetTriggerDelay() - * @see fc2SetTriggerDelayBroadcast() - * - * @param context The fc2Context to be used. - * @param triggerDelay Structure providing trigger delay settings. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetTriggerDelay( - fc2Context context, - @Cast("fc2TriggerDelay*") fc2Property triggerDelay ); - - /** - * Set the specified trigger delay settings to the camera. - * - * @see fc2GetTriggerModeInfo() - * @see fc2GetTriggerMode() - * @see fc2SetTriggerMode() - * @see fc2GetTriggerDelayInfo() - * @see fc2GetTriggerDelay() - * @see fc2SetTriggerDelay() - * - * @param context The fc2Context to be used. - * @param triggerDelay Structure providing trigger delay settings. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetTriggerDelayBroadcast( - fc2Context context, - @Cast("fc2TriggerDelay*") fc2Property triggerDelay ); - /*@}*/ - - /** - * \defgroup CStrobe Strobe - * - * \brief These functions deal with strobe control on the camera. - */ - /*@{*/ - - /** - * Retrieve strobe information from the camera. - * - * @see fc2GetStrobe() - * @see fc2SetStrobe() - * @see fc2SetStrobeBroadcast() - * - * @param context The fc2Context to be used. - * @param strobeInfo Structure to receive strobe information. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetStrobeInfo( - fc2Context context, - fc2StrobeInfo strobeInfo ); - - /** - * Retrieve current strobe settings from the camera. The strobe pin - * must be specified in the structure before being passed in to - * the function. - * - * @see fc2GetStrobeInfo() - * @see fc2SetStrobe() - * @see fc2SetStrobeBroadcast() - * - * @param context The fc2Context to be used. - * @param strobeControl Structure to receive strobe settings. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetStrobe( - fc2Context context, - fc2StrobeControl strobeControl ); - - /** - * Set current strobe settings to the camera. The strobe pin - * must be specified in the structure before being passed in to - * the function. - * - * @see fc2GetStrobeInfo() - * @see fc2GetStrobe() - * @see fc2SetStrobeBroadcast() - * - * @param context The fc2Context to be used. - * @param strobeControl Structure providing strobe settings. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetStrobe( - fc2Context context, - fc2StrobeControl strobeControl ); - - /** - * Set current strobe settings to the camera. The strobe pin - * must be specified in the structure before being passed in to - * the function. - * - * @see fc2GetStrobeInfo() - * @see fc2GetStrobe() - * @see fc2SetStrobe() - * - * @param context The fc2Context to be used. - * @param strobeControl Structure providing strobe settings. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetStrobeBroadcast( - fc2Context context, - fc2StrobeControl strobeControl ); - /*@}*/ - - /** - * \defgroup CLookUp Look Up Table - * - * \brief These functions deal with Look Up Table control on the camera. - */ - /*@{*/ - - /** - * Query if LUT support is available on the camera. Note that some cameras - * may report support for the LUT and return an inputBitDepth of 0. In these - * cases use log2(numEntries) for the inputBitDepth. - * - * @see fc2EnableLUT() - * @see fc2GetLUTChannel() - * @see fc2SetLUTChannel() - * - * @param context The fc2Context to be used. - * @param pData The LUT structure to be filled. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetLUTInfo( - fc2Context context, - fc2LUTData pData ); - - /** - * Query the read/write status of a single LUT bank. - * - * @param context The fc2Context to be used. - * @param bank The bank to query. - * @param pReadSupported Whether reading from the bank is supported. - * @param pWriteSupported Whether writing to the bank is supported. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetLUTBankInfo( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("BOOL*") IntPointer pReadSupported, - @Cast("BOOL*") IntPointer pWriteSupported ); - public static native @Cast("fc2Error") int fc2GetLUTBankInfo( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("BOOL*") IntBuffer pReadSupported, - @Cast("BOOL*") IntBuffer pWriteSupported ); - public static native @Cast("fc2Error") int fc2GetLUTBankInfo( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("BOOL*") int[] pReadSupported, - @Cast("BOOL*") int[] pWriteSupported ); - - /** - * Get the LUT bank that is currently being used. For cameras with - * PGR LUT, the active bank is always 0. - * - * @param context The fc2Context to be used. - * @param pActiveBank The currently active bank. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetActiveLUTBank( - fc2Context context, - @Cast("unsigned int*") IntPointer pActiveBank ); - public static native @Cast("fc2Error") int fc2GetActiveLUTBank( - fc2Context context, - @Cast("unsigned int*") IntBuffer pActiveBank ); - public static native @Cast("fc2Error") int fc2GetActiveLUTBank( - fc2Context context, - @Cast("unsigned int*") int[] pActiveBank ); - - /** - * Set the LUT bank that will be used. - * - * @param context The fc2Context to be used. - * @param activeBank The bank to be set as active. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetActiveLUTBank( - fc2Context context, - @Cast("unsigned int") int activeBank ); - - /** - * Enable or disable LUT functionality on the camera. - * - * @see fc2GetLUTInfo() - * @see fc2GetLUTChannel() - * @see fc2SetLUTChannel() - * - * @param context The fc2Context to be used. - * @param on Whether to enable or disable LUT. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2EnableLUT( - fc2Context context, - @Cast("BOOL") int on ); - - /** - * Get the LUT channel settings from the camera. - * - * @see fc2GetLUTInfo() - * @see fc2EnableLUT() - * @see fc2SetLUTChannel() - * - * @param context The fc2Context to be used. - * @param bank Bank to retrieve. - * @param channel Channel to retrieve. - * @param sizeEntries Number of entries in LUT table to read. - * @param pEntries Array to store LUT entries. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetLUTChannel( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntPointer pEntries ); - public static native @Cast("fc2Error") int fc2GetLUTChannel( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntBuffer pEntries ); - public static native @Cast("fc2Error") int fc2GetLUTChannel( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") int[] pEntries ); - - /** - * Set the LUT channel settings to the camera. - * - * @see fc2GetLUTInfo() - * @see fc2EnableLUT() - * @see fc2GetLUTChannel() - * - * @param context The fc2Context to be used. - * @param bank Bank to set. - * @param channel Channel to set. - * @param sizeEntries Number of entries in LUT table to write. This must be the - * same size as numEntries returned by GetLutInfo(). - * @param pEntries Array containing LUT entries to write. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetLUTChannel( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntPointer pEntries ); - public static native @Cast("fc2Error") int fc2SetLUTChannel( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") IntBuffer pEntries ); - public static native @Cast("fc2Error") int fc2SetLUTChannel( - fc2Context context, - @Cast("unsigned int") int bank, - @Cast("unsigned int") int channel, - @Cast("unsigned int") int sizeEntries, - @Cast("unsigned int*") int[] pEntries ); - /*@}*/ - - /** - * \defgroup CMemoryChannel Memory Channels - * - * \brief These functions deal with memory channel control on the camera. - */ - /*@{*/ - - /** - * Retrieve the current memory channel from the camera. - * - * @see fc2SaveToMemoryChannel() - * @see fc2RestoreFromMemoryChannel() - * @see fc2GetMemoryChannelInfo() - * - * @param context The fc2Context to be used. - * @param pCurrentChannel Current memory channel. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetMemoryChannel( - fc2Context context, - @Cast("unsigned int*") IntPointer pCurrentChannel ); - public static native @Cast("fc2Error") int fc2GetMemoryChannel( - fc2Context context, - @Cast("unsigned int*") IntBuffer pCurrentChannel ); - public static native @Cast("fc2Error") int fc2GetMemoryChannel( - fc2Context context, - @Cast("unsigned int*") int[] pCurrentChannel ); - - /** - * Save the current settings to the specified current memory channel. - * - * @see fc2GetMemoryChannel() - * @see fc2RestoreFromMemoryChannel() - * @see fc2GetMemoryChannelInfo() - * - * @param context The fc2Context to be used. - * @param channel Memory channel to save to. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SaveToMemoryChannel( - fc2Context context, - @Cast("unsigned int") int channel ); - - /** - * Restore the specified current memory channel. - * - * @see fc2GetMemoryChannel() - * @see fc2SaveToMemoryChannel() - * @see fc2GetMemoryChannelInfo() - * - * @param context The fc2Context to be used. - * @param channel Memory channel to restore from. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2RestoreFromMemoryChannel( - fc2Context context, - @Cast("unsigned int") int channel ); - - /** - * Query the camera for memory channel support. If the number of - * channels are 0, then memory channel support is not available. - * - * @see fc2GetMemoryChannel() - * @see fc2SaveToMemoryChannel() - * @see fc2RestoreFromMemoryChannel() - * - * @param context The fc2Context to be used. - * @param pNumChannels Number of memory channels supported. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetMemoryChannelInfo( - fc2Context context, - @Cast("unsigned int*") IntPointer pNumChannels ); - public static native @Cast("fc2Error") int fc2GetMemoryChannelInfo( - fc2Context context, - @Cast("unsigned int*") IntBuffer pNumChannels ); - public static native @Cast("fc2Error") int fc2GetMemoryChannelInfo( - fc2Context context, - @Cast("unsigned int*") int[] pNumChannels ); - - /** - * Get the current status of the embedded image information register, - * as well as the availability of each embedded property. - * - * @see fc2SetEmbeddedImageInfo() - * - * @param context The fc2Context to be used. - * @param pInfo Structure to be filled. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetEmbeddedImageInfo( - fc2Context context, - fc2EmbeddedImageInfo pInfo ); - - /** - * Sets the on/off values of the embedded image information structure - * to the camera. - * - * @see fc2GetEmbeddedImageInfo() - * - * @param context The fc2Context to be used. - * @param pInfo Structure to be used. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetEmbeddedImageInfo( - fc2Context context, - fc2EmbeddedImageInfo pInfo ); - /*@}*/ - - /** - * \defgroup CRegister Register Operation - * - * \brief These functions deal with register operation on the camera. - */ - /*@{*/ - - /** - * Write to the specified register on the camera. - * - * @see fc2ReadRegister() - * - * @param context The fc2Context to be used. - * @param address DCAM address to be written to. - * @param value The value to be written. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int") int value); - - /** - * Read the specified register from the camera. - * - * @see fc2WriteRegister() - * - * @param context The fc2Context to be used. - * @param address DCAM address to be read from. - * @param pValue The value that is read. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ReadRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pValue ); - public static native @Cast("fc2Error") int fc2ReadRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pValue ); - public static native @Cast("fc2Error") int fc2ReadRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") int[] pValue ); - - /** - * Write to the specified register on the camera with broadcast. - * - * @see fc2ReadRegisterBlock() - * - * @param context The fc2Context to be used. - * @param address DCAM address to be written to. - * @param value The value to be written. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteRegisterBroadcast( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int") int value); - - /** - * Write to the specified register block on the camera. - * - * @see fc2ReadRegisterBlock() - * - * @param context The fc2Context to be used. - * @param addressHigh Top 16 bits of the 48-bit absolute address to write to. - * @param addressLow Bottom 32 bits of the 48 bits absolute address to write to. - * @param pBuffer Array containing data to be written. - * @param length Size of array, in quadlets. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteRegisterBlock( - fc2Context context, - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2WriteRegisterBlock( - fc2Context context, - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2WriteRegisterBlock( - fc2Context context, - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("const unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Write to the specified register block on the camera. - * - * @see fc2WriteRegisterBlock() - * - * @param context The fc2Context to be used. - * @param addressHigh Top 16 bits of the 48-bit absolute address to read from. - * @param addressLow Bottom 32 bits of the 48 bits absolute address to read from. - * @param pBuffer Array to store read data. - * @param length Size of array, in quadlets. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ReadRegisterBlock( - fc2Context context, - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2ReadRegisterBlock( - fc2Context context, - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2ReadRegisterBlock( - fc2Context context, - @Cast("unsigned short") short addressHigh, - @Cast("unsigned int") int addressLow, - @Cast("unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Returns a text representation of the register value. - * - * @param registerVal The register value to query. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("const char*") BytePointer fc2GetRegisterString( - @Cast("unsigned int") int registerVal); - /*@}*/ - - /** - * Get cycle time from camera - * - * @param context The fc2Context to be used. - * @param Timestamp struct. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetCycleTime( fc2Context context, fc2TimeStamp pTimeStamp ); - - /** - * Returns the camera diagnostic information. - * - * @param context The fc2Context to be used. - * @param pCameraStats Pointer to the fc2CameraStats structure. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetStats( fc2Context context, fc2CameraStats pCameraStats ); - - /* - * Reset the camera diagnostic information. - * - * @return An Error indicating the success or failure of the function. - */ - - - /** - * Register the camera to issue a custom callback function call for a - * specific device event. - * - * @param context The fc2Context to be used. - * @param pOpts Pointer to the EventOptions structure which defines the - * callback function to use, the event for which to register - * the device, and a pointer to user data (optional) to be - * passed to the callback function. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2RegisterEvent( - fc2Context context, - fc2EventOptions pOpts ); - - /** - *De-register an event previously registered with the camera. - * - * @param context The fc2Context to be used. - * @param pOpts Pointer to the EventOptions structure which defines the - * callback function to use, the event for which to register - * the device, and a pointer to user data (optional) to be - * passed to the callback function. The callback function and - * user data elements of the EventOptions structure are ignored - * in this call, and just the event name within the structure is - * used with this function call. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DeregisterEvent( - fc2Context context, - fc2EventOptions pOpts ); - - /** - * Register the camera to issue a custom callback function call for a - * specific device event. - * - * @param context The fc2Context to be used. - * @param pOpts Pointer to the EventOptions structure which defines the - * callback function to use, the event for which to register - * the device, and a pointer to user data (optional) to be - * passed to the callback function. The event name element of - * the structure is ignored with this function call. If a single - * event has already been registered via RegisterEvent(), this - * call will fail, as the user could accidentally change the - * the internal callback function pointer for a queued event. - * The user will need to de-register all registered events, - * then call this function again. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2RegisterAllEvents( - fc2Context context, - fc2EventOptions pOpts ); - - /* - * De-register all events registered with the camera. - * - * @param context The fc2Context to be used. - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DeregisterAllEvents( - fc2Context context); - - /** - * \defgroup CDCAMFormats DCAM Formats - * - * \brief These functions deal with DCAM video mode and frame rate - * on the camera. - */ - /*@{*/ - - /** - * Query the camera to determine if the specified video mode and - * frame rate is supported. - * - * @param context The fc2Context to be used. - * @param videoMode Video mode to check. - * @param frameRate Frame rate to check. - * @param pSupported Whether the video mode and frame rate is supported. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRateInfo( - fc2Context context, - @Cast("fc2VideoMode") int videoMode, - @Cast("fc2FrameRate") int frameRate, - @Cast("BOOL*") IntPointer pSupported); - public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRateInfo( - fc2Context context, - @Cast("fc2VideoMode") int videoMode, - @Cast("fc2FrameRate") int frameRate, - @Cast("BOOL*") IntBuffer pSupported); - public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRateInfo( - fc2Context context, - @Cast("fc2VideoMode") int videoMode, - @Cast("fc2FrameRate") int frameRate, - @Cast("BOOL*") int[] pSupported); - - /** - * Get the current video mode and frame rate from the camera. If - * the camera is in Format7, the video mode will be VIDEOMODE_FORMAT7 - * and the frame rate will be FRAMERATE_FORMAT7. - * - * @param context The fc2Context to be used. - * @param videoMode Current video mode. - * @param frameRate Current frame rate. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRate( - fc2Context context, - @Cast("fc2VideoMode*") IntPointer videoMode, - @Cast("fc2FrameRate*") IntPointer frameRate ); - public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRate( - fc2Context context, - @Cast("fc2VideoMode*") IntBuffer videoMode, - @Cast("fc2FrameRate*") IntBuffer frameRate ); - public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRate( - fc2Context context, - @Cast("fc2VideoMode*") int[] videoMode, - @Cast("fc2FrameRate*") int[] frameRate ); - - /** - * Set the specified video mode and frame rate to the camera. It is - * not possible to set the camera to VIDEOMODE_FORMAT7 or - * FRAMERATE_FORMAT7. Use the Format7 functions to set the camera - * into Format7. - * - * @param context The fc2Context to be used. - * @param videoMode Video mode to set to camera. - * @param frameRate Frame rate to set to camera. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetVideoModeAndFrameRate( - fc2Context context, - @Cast("fc2VideoMode") int videoMode, - @Cast("fc2FrameRate") int frameRate ); - /*@}*/ - - /** - * \defgroup CFormat7 Format7 - * - * \brief These functions deal with Format7 custom image control on the camera. - */ - /*@{*/ - - /** - * Retrieve the availability of Format7 custom image mode and the - * camera capabilities for the specified Format7 mode. The mode must - * be specified in the Format7Info structure in order for the - * function to succeed. - * - * @param context The fc2Context to be used. - * @param info Structure to be filled with the capabilities of the specified - * mode and the current state in the specified mode. - * @param pSupported Whether the specified mode is supported. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetFormat7Info( - fc2Context context, - fc2Format7Info info, - @Cast("BOOL*") IntPointer pSupported ); - public static native @Cast("fc2Error") int fc2GetFormat7Info( - fc2Context context, - fc2Format7Info info, - @Cast("BOOL*") IntBuffer pSupported ); - public static native @Cast("fc2Error") int fc2GetFormat7Info( - fc2Context context, - fc2Format7Info info, - @Cast("BOOL*") int[] pSupported ); - - /** - * Validates Format7ImageSettings structure and returns valid packet - * size information if the image settings are valid. The current - * image settings are cached while validation is taking place. The - * cached settings are restored when validation is complete. - * - * @param context The fc2Context to be used. - * @param imageSettings Structure containing the image settings. - * @param settingsAreValid Whether the settings are valid. - * @param packetInfo Packet size information that can be used to - * determine a valid packet size. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ValidateFormat7Settings( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("BOOL*") IntPointer settingsAreValid, - fc2Format7PacketInfo packetInfo ); - public static native @Cast("fc2Error") int fc2ValidateFormat7Settings( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("BOOL*") IntBuffer settingsAreValid, - fc2Format7PacketInfo packetInfo ); - public static native @Cast("fc2Error") int fc2ValidateFormat7Settings( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("BOOL*") int[] settingsAreValid, - fc2Format7PacketInfo packetInfo ); - - /** - * Get the current Format7 configuration from the camera. This call - * will only succeed if the camera is already in Format7. - * - * @param context The fc2Context to be used. - * @param imageSettings Current image settings. - * @param packetSize Current packet size. - * @param percentage Current packet size as a percentage. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetFormat7Configuration( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("unsigned int*") IntPointer packetSize, - FloatPointer percentage ); - public static native @Cast("fc2Error") int fc2GetFormat7Configuration( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("unsigned int*") IntBuffer packetSize, - FloatBuffer percentage ); - public static native @Cast("fc2Error") int fc2GetFormat7Configuration( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("unsigned int*") int[] packetSize, - float[] percentage ); - - /** - * Set the current Format7 configuration to the camera. - * - * @param context The fc2Context to be used. - * @param imageSettings Image settings to be written to the camera. - * @param packetSize Packet size to be written to the camera. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetFormat7ConfigurationPacket( - fc2Context context, - fc2Format7ImageSettings imageSettings, - @Cast("unsigned int") int packetSize ); - - /** - * Set the current Format7 configuration to the camera. - * - * @param context The fc2Context to be used. - * @param imageSettings Image settings to be written to the camera. - * @param percentSpeed Packet size as a percentage to be written to the camera. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetFormat7Configuration( - fc2Context context, - fc2Format7ImageSettings imageSettings, - float percentSpeed ); - /*@}*/ - - /** - * \defgroup CGVCPRegister GVCP Register Operation - * - * \brief These functions deal with GVCP register operation on the camera. - */ - /*@{*/ - - /** - * Write a GVCP register. - * - * @param context The fc2Context to be used. - * @param address GVCP address to be written to. - * @param value The value to be written. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteGVCPRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int") int value); - - /** - * Write a GVCP register with broadcast - * - * @param context The fc2Context to be used. - * @param address GVCP address to be written to. - * @param value The value to be written. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBroadcast( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int") int value); - - /** - * Read a GVCP register. - * - * @param context The fc2Context to be used. - * @param address GVCP address to be read from. - * @param pValue The value that is read. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ReadGVCPRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pValue ); - public static native @Cast("fc2Error") int fc2ReadGVCPRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pValue ); - public static native @Cast("fc2Error") int fc2ReadGVCPRegister( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") int[] pValue ); - - /** - * Write a GVCP register block. - * - * @param context The fc2Context to be used. - * @param address GVCP address to be write to. - * @param pBuffer Array containing data to be written. - * @param length Size of array, in quadlets. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBlock( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("const unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBlock( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("const unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBlock( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("const unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Read a GVCP register block. - * - * @param context The fc2Context to be used. - * @param address GVCP address to be read from. - * @param pBuffer Array containing data to be written. - * @param length Size of array, in quadlets. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ReadGVCPRegisterBlock( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntPointer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2ReadGVCPRegisterBlock( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") IntBuffer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2ReadGVCPRegisterBlock( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned int*") int[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Write a GVCP memory block. - * - * @param context The fc2Context to be used. - * @param address GVCP address to be write to. - * @param pBuffer Array containing data to be written. - * @param length Size of array, in quadlets. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2WriteGVCPMemory( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("const unsigned char*") BytePointer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2WriteGVCPMemory( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("const unsigned char*") ByteBuffer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2WriteGVCPMemory( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("const unsigned char*") byte[] pBuffer, - @Cast("unsigned int") int length ); - - /** - * Read a GVCP memory block. - * - * @param context The fc2Context to be used. - * @param address GVCP address to be read from. - * @param pBuffer Array containing data to be written. - * @param length Size of array, in quadlets. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ReadGVCPMemory( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned char*") BytePointer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2ReadGVCPMemory( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned char*") ByteBuffer pBuffer, - @Cast("unsigned int") int length ); - public static native @Cast("fc2Error") int fc2ReadGVCPMemory( - fc2Context context, - @Cast("unsigned int") int address, - @Cast("unsigned char*") byte[] pBuffer, - @Cast("unsigned int") int length ); - /*@}*/ - - - /** - * \defgroup CGEVProperty GigE property manipulation - * - * \brief These functions deal with GigE properties. - */ - /*@{*/ - - /** - * Get the specified GigEProperty. The GigEPropertyType field must - * be set in order for this function to succeed. - * - * @param context The fc2Context to be used. - * @param pGigEProp The GigE property to get. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEProperty( - fc2Context context, - fc2GigEProperty pGigEProp ); - - /** - * Set the specified GigEProperty. The GigEPropertyType field must - * be set in order for this function to succeed. - * - * @param context The fc2Context to be used. - * @param pGigEProp The GigE property to set. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetGigEProperty( - fc2Context context, - @Const fc2GigEProperty pGigEProp ); - - /** - * Discover the largest packet size that works for the network link - * between the PC and the camera. This is useful in cases where - * there may be multiple links between the PC and the camera and - * there is a possibility of a component not supporting the - * recommended jumbo frame packet size of 9000. - * - * @param context The fc2Context to be used. - * @param packetSize The maximum packet size supported by the link. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DiscoverGigEPacketSize( - fc2Context context, - @Cast("unsigned int*") IntPointer packetSize ); - public static native @Cast("fc2Error") int fc2DiscoverGigEPacketSize( - fc2Context context, - @Cast("unsigned int*") IntBuffer packetSize ); - public static native @Cast("fc2Error") int fc2DiscoverGigEPacketSize( - fc2Context context, - @Cast("unsigned int*") int[] packetSize ); - /*@}*/ - - /** - * \defgroup CGEVImageSettings GigE image settings - * - * \brief These functions deal with GigE image setting. - */ - /*@{*/ - - /** - * Check if the particular imaging mode is supported by the camera. - * - * @param context The fc2Context to be used. - * @param mode The mode to check. - * @param isSupported Whether the mode is supported. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2QueryGigEImagingMode( - fc2Context context, - @Cast("fc2Mode") int mode, - @Cast("BOOL*") IntPointer isSupported ); - public static native @Cast("fc2Error") int fc2QueryGigEImagingMode( - fc2Context context, - @Cast("fc2Mode") int mode, - @Cast("BOOL*") IntBuffer isSupported ); - public static native @Cast("fc2Error") int fc2QueryGigEImagingMode( - fc2Context context, - @Cast("fc2Mode") int mode, - @Cast("BOOL*") int[] isSupported ); - - /** - * Get the current imaging mode on the camera. - * - * @param context The fc2Context to be used. - * @param mode Current imaging mode on the camera. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEImagingMode( - fc2Context context, - @Cast("fc2Mode*") IntPointer mode ); - public static native @Cast("fc2Error") int fc2GetGigEImagingMode( - fc2Context context, - @Cast("fc2Mode*") IntBuffer mode ); - public static native @Cast("fc2Error") int fc2GetGigEImagingMode( - fc2Context context, - @Cast("fc2Mode*") int[] mode ); - - /** - * Set the current imaging mode to the camera. This should only be - * done when the camera is not streaming images. - * - * @param context The fc2Context to be used. - * @param mode Imaging mode to set to the camera. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetGigEImagingMode( - fc2Context context, - @Cast("fc2Mode") int mode ); - - /** - * Get information about the image settings possible on the camera. - * - * @param context The fc2Context to be used. - * @param pInfo Image settings information. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEImageSettingsInfo( - fc2Context context, - fc2GigEImageSettingsInfo pInfo ); - - /** - * Get the current image settings on the camera. - * - * @param context The fc2Context to be used. - * @param pImageSettings Current image settings on camera. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEImageSettings( - fc2Context context, - fc2GigEImageSettings pImageSettings ); - - /** - * Set the image settings specified to the camera. - * - * @param context The fc2Context to be used. - * @param pImageSettings Image settings to set to camera. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetGigEImageSettings( - fc2Context context, - @Const fc2GigEImageSettings pImageSettings ); - /*@}*/ - - /** - * \defgroup CGEVImageBinningSettings GigE image binning settings - * - * \brief These functions deal with GigE image binning settings. - */ - /*@{*/ - - /** - * Get the current binning settings on the camera. - * - * @param context The fc2Context to be used. - * @param horzBinnningValue Current horizontal binning value. - * @param vertBinnningValue Current vertical binning value. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEImageBinningSettings( - fc2Context context, - @Cast("unsigned int*") IntPointer horzBinnningValue, - @Cast("unsigned int*") IntPointer vertBinnningValue ); - public static native @Cast("fc2Error") int fc2GetGigEImageBinningSettings( - fc2Context context, - @Cast("unsigned int*") IntBuffer horzBinnningValue, - @Cast("unsigned int*") IntBuffer vertBinnningValue ); - public static native @Cast("fc2Error") int fc2GetGigEImageBinningSettings( - fc2Context context, - @Cast("unsigned int*") int[] horzBinnningValue, - @Cast("unsigned int*") int[] vertBinnningValue ); - - /** - * Set the specified binning values to the camera. It is recommended - * that GetGigEImageSettingsInfo() be called after this function - * succeeds to retrieve the new image settings information for - * the new binning mode. - * - * @param context The fc2Context to be used. - * @param horzBinnningValue Horizontal binning value. - * @param vertBinnningValue Vertical binning value. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetGigEImageBinningSettings( - fc2Context context, - @Cast("unsigned int") int horzBinnningValue, - @Cast("unsigned int") int vertBinnningValue ); - /*@}*/ - - /** - * \defgroup CGEVImageStreamConfig GigE image stream configuration - * - * \brief These functions deal with GigE image stream configuration. - */ - /*@{*/ - - /** - * Get the number of stream channels present on the camera. - * - * @param context The fc2Context to be used. - * @param numChannels Number of stream channels present. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetNumStreamChannels( - fc2Context context, - @Cast("unsigned int*") IntPointer numChannels ); - public static native @Cast("fc2Error") int fc2GetNumStreamChannels( - fc2Context context, - @Cast("unsigned int*") IntBuffer numChannels ); - public static native @Cast("fc2Error") int fc2GetNumStreamChannels( - fc2Context context, - @Cast("unsigned int*") int[] numChannels ); - - /** - * Get the stream channel information for the specified channel. - * - * @param context The fc2Context to be used. - * @param channel Channel number to use. - * @param pChannel Stream channel information for the specified channel. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEStreamChannelInfo( - fc2Context context, - @Cast("unsigned int") int channel, - fc2GigEStreamChannel pChannel ); - - /** - * Set the stream channel information for the specified channel. - * - * Note that the source UDP port of the stream channel is read-only. - * - * @param context The fc2Context to be used. - * @param channel Channel number to use. - * @param pChannel Stream channel information to use for the specified channel. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetGigEStreamChannelInfo( - fc2Context context, - @Cast("unsigned int") int channel, - fc2GigEStreamChannel pChannel ); - - /** - * Get the current gige config on the camera. - * - * @param context The fc2Context to be used. - * @param pGigEConfig Current configuration on camera. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetGigEConfig( - fc2Context context, - fc2GigEConfig pConfig ); - - /** - * Set the gige config specified to the camera. - * - * @param context The fc2Context to be used. - * @param pGigEConfig configuration to set to camera. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetGigEConfig( - fc2Context context, - @Const fc2GigEConfig pConfig ); - /*@}*/ - - /** - * \defgroup CImage Image Operation - * - * \brief The Image operations are used to retrieve images from a camera, - * convert between multiple pixel formats and save images to disk. - * Operations on images are not guaranteed to be thread safe. It is - * recommended that operations on images be protected by thread - * synchronization constructs such as mutexes. - */ - /*@{*/ - - /** - * Set the default color processing algorithm. This method will be - * used for any image with the DEFAULT algorithm set. The method used - * is determined at the time of the Convert() call, therefore the most - * recent execution of this function will take precedence. The default - * setting is shared within the current process. - * - * @param defaultMethod The color processing algorithm to set. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetDefaultColorProcessing( - @Cast("fc2ColorProcessingAlgorithm") int defaultMethod ); - - /** - * Get the default color processing algorithm. - * - * @param pDefaultMethod The default color processing algorithm. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetDefaultColorProcessing( - @Cast("fc2ColorProcessingAlgorithm*") IntPointer pDefaultMethod ); - public static native @Cast("fc2Error") int fc2GetDefaultColorProcessing( - @Cast("fc2ColorProcessingAlgorithm*") IntBuffer pDefaultMethod ); - public static native @Cast("fc2Error") int fc2GetDefaultColorProcessing( - @Cast("fc2ColorProcessingAlgorithm*") int[] pDefaultMethod ); - - /** - * Set the default output pixel format. This format will be used for any - * call to Convert() that does not specify an output format. The format - * used will be determined at the time of the Convert() call, therefore - * the most recent execution of this function will take precedence. - * The default is shared within the current process. - * - * @param format The output pixel format to set. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetDefaultOutputFormat( - @Cast("fc2PixelFormat") int format ); - - /** - * Get the default output pixel format. - * - * @param pFormat The default pixel format. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetDefaultOutputFormat( - @Cast("fc2PixelFormat*") IntPointer pFormat ); - public static native @Cast("fc2Error") int fc2GetDefaultOutputFormat( - @Cast("fc2PixelFormat*") IntBuffer pFormat ); - public static native @Cast("fc2Error") int fc2GetDefaultOutputFormat( - @Cast("fc2PixelFormat*") int[] pFormat ); - - /** - * Calculate the bits per pixel for the specified pixel format. - * - * @param format The pixel format. - * @param pBitsPerPixel The bits per pixel. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DetermineBitsPerPixel( - @Cast("fc2PixelFormat") int format, - @Cast("unsigned int*") IntPointer pBitsPerPixel ); - public static native @Cast("fc2Error") int fc2DetermineBitsPerPixel( - @Cast("fc2PixelFormat") int format, - @Cast("unsigned int*") IntBuffer pBitsPerPixel ); - public static native @Cast("fc2Error") int fc2DetermineBitsPerPixel( - @Cast("fc2PixelFormat") int format, - @Cast("unsigned int*") int[] pBitsPerPixel ); - - /** - * Create a fc2Image. If externally allocated memory is to be used for the - * converted image, simply assigning the pData member of the fc2Image structure - * is insufficient. fc2SetImageData() should be called in order to populate - * the fc2Image structure correctly. - * - * @see fc2SetImageData() - * - * @param pImage Pointer to image to be created. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2CreateImage( - fc2Image pImage ); - - /** - * Destroy the fc2Image. - * - * @param image Pointer to image to be destroyed. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DestroyImage( - fc2Image image ); - - /** - * Sets the dimensions of the image object. - * - * @param pImage The fc2Image to be used. - * @param rows Number of rows to set. - * @param cols Number of cols to set. - * @param stride Stride to set. - * @param pixelFormat Pixel format to set. - * @param bayerFormat Bayer tile format to set. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetImageDimensions( - fc2Image pImage, - @Cast("unsigned int") int rows, - @Cast("unsigned int") int cols, - @Cast("unsigned int") int stride, - @Cast("fc2PixelFormat") int pixelFormat, - @Cast("fc2BayerTileFormat") int bayerFormat); - - /** - * Get the image dimensions associated with the image object. - * - * @param pImage The fc2Image to be used. - * @param pRows Number of rows. - * @param pCols Number of columns. - * @param pStride The stride. - * @param pPixelFormat Pixel format. - * @param pBayerFormat Bayer tile format. - */ - public static native @Cast("fc2Error") int fc2GetImageDimensions( - fc2Image pImage, - @Cast("unsigned int*") IntPointer pRows, - @Cast("unsigned int*") IntPointer pCols, - @Cast("unsigned int*") IntPointer pStride, - @Cast("fc2PixelFormat*") IntPointer pPixelFormat, - @Cast("fc2BayerTileFormat*") IntPointer pBayerFormat); - public static native @Cast("fc2Error") int fc2GetImageDimensions( - fc2Image pImage, - @Cast("unsigned int*") IntBuffer pRows, - @Cast("unsigned int*") IntBuffer pCols, - @Cast("unsigned int*") IntBuffer pStride, - @Cast("fc2PixelFormat*") IntBuffer pPixelFormat, - @Cast("fc2BayerTileFormat*") IntBuffer pBayerFormat); - public static native @Cast("fc2Error") int fc2GetImageDimensions( - fc2Image pImage, - @Cast("unsigned int*") int[] pRows, - @Cast("unsigned int*") int[] pCols, - @Cast("unsigned int*") int[] pStride, - @Cast("fc2PixelFormat*") int[] pPixelFormat, - @Cast("fc2BayerTileFormat*") int[] pBayerFormat); - - /** - * Set the color processing algorithm. This should be set on the - * input image object. - * - * @param pImage The fc2Image to be used. - * @param colorProc The color processing algorithm to use. - * - * @see fc2GetColorProcessing() - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetImageColorProcessing( - fc2Image pImage, - @Cast("fc2ColorProcessingAlgorithm") int colorProc); - - /** - * Get the current color processing algorithm. - * - * @param pImage The fc2Image to be used. - * - * @see fc2SetColorProcessing() - * - * @return The current color processing algorithm. - */ - public static native @Cast("fc2Error") int fc2GetImageColorProcessing( - fc2Image pImage, - @Cast("fc2ColorProcessingAlgorithm*") IntPointer pColorProc); - public static native @Cast("fc2Error") int fc2GetImageColorProcessing( - fc2Image pImage, - @Cast("fc2ColorProcessingAlgorithm*") IntBuffer pColorProc); - public static native @Cast("fc2Error") int fc2GetImageColorProcessing( - fc2Image pImage, - @Cast("fc2ColorProcessingAlgorithm*") int[] pColorProc); - - /** - * Set the data of the Image object. - * Ownership of the image buffer is not transferred to the Image object. - * It is the user's responsibility to delete the buffer when it is - * no longer in use. - * - * @param pImage The fc2Image to be used. - * @param pData Pointer to the image buffer. - * @param dataSize Size of the image buffer. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetImageData( - fc2Image pImage, - @Cast("const unsigned char*") BytePointer pData, - @Cast("unsigned int") int dataSize); - public static native @Cast("fc2Error") int fc2SetImageData( - fc2Image pImage, - @Cast("const unsigned char*") ByteBuffer pData, - @Cast("unsigned int") int dataSize); - public static native @Cast("fc2Error") int fc2SetImageData( - fc2Image pImage, - @Cast("const unsigned char*") byte[] pData, - @Cast("unsigned int") int dataSize); - - /** - * Get a pointer to the data associated with the image. This function - * is considered unsafe. The pointer returned could be invalidated if - * the buffer is resized or released. The pointer may also be - * invalidated if the Image object is passed to fc2RetrieveBuffer(). - * - * @param pImage The fc2Image to be used. - * @param ppData A pointer to the image data. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetImageData( - fc2Image pImage, - @Cast("unsigned char**") PointerPointer ppData); - public static native @Cast("fc2Error") int fc2GetImageData( - fc2Image pImage, - @Cast("unsigned char**") @ByPtrPtr BytePointer ppData); - public static native @Cast("fc2Error") int fc2GetImageData( - fc2Image pImage, - @Cast("unsigned char**") @ByPtrPtr ByteBuffer ppData); - public static native @Cast("fc2Error") int fc2GetImageData( - fc2Image pImage, - @Cast("unsigned char**") @ByPtrPtr byte[] ppData); - - /** - * Get the metadata associated with the image. This includes - * embedded image information. - * - * @param pImage The fc2Image to be used. - * - * @return Metadata associated with the image. - */ - public static native @Cast("fc2Error") int fc2GetImageMetadata( - fc2Image pImage, - fc2ImageMetadata pImageMetaData); - - /** - * Get the timestamp data associated with the image. - * - * @param pImage The fc2Image to be used. - * - * @return Timestamp data associated with the image. - */ - public static native @ByVal fc2TimeStamp fc2GetImageTimeStamp( - fc2Image pImage); - - /** - * Save the image to the specified file name with the file format - * specified. - * - * @param pImage The fc2Image to be used. - * @param pFilename Filename to save image with. - * @param format File format to save in. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SaveImage( - fc2Image pImage, - @Cast("const char*") BytePointer pFilename, - @Cast("fc2ImageFileFormat") int format ); - public static native @Cast("fc2Error") int fc2SaveImage( - fc2Image pImage, - String pFilename, - @Cast("fc2ImageFileFormat") int format ); - - /** - * Save the image to the specified file name with the file format - * specified. - * - * @param pImage The fc2Image to be used. - * @param pFilename Filename to save image with. - * @param format File format to save in. - * @param pOption Options for saving image. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SaveImageWithOption( - fc2Image pImage, - @Cast("const char*") BytePointer pFilename, - @Cast("fc2ImageFileFormat") int format, - Pointer pOption ); - public static native @Cast("fc2Error") int fc2SaveImageWithOption( - fc2Image pImage, - String pFilename, - @Cast("fc2ImageFileFormat") int format, - Pointer pOption ); - - /** - * - * - * @param pImageIn - * @param pImageOut - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ConvertImage( - fc2Image pImageIn, - fc2Image pImageOut ); - - /** - * Converts the current image buffer to the specified output format and - * stores the result in the specified image. The destination image - * does not need to be configured in any way before the call is made. - * - * @param format Output format of the converted image. - * @param pImageIn Input image. - * @param pImageOut Output image. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ConvertImageTo( - @Cast("fc2PixelFormat") int format, - fc2Image pImageIn, - fc2Image pImageOut ); - - /** - * Calculate statistics associated with the image. In order to collect - * statistics for a particular channel, the enabled flag for the - * channel must be set to true. Statistics can only be collected for - * images in Mono8, Mono16, RGB, RGBU, BGR and BGRU. - * - * @param pImage The fc2Image to be used. - * @param pImageStatisticsContext The fc2ImageStatisticsContext to hold the - * statistics. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2CalculateImageStatistics( - fc2Image pImage, - @ByPtrPtr fc2ImageStatisticsContext pImageStatisticsContext ); - /*@}*/ - - /** - * \defgroup CImageStatistics Image Statistics Operation - * - * \brief The Image Statistics operation provides the functionality for the user to collect - * image channel statistics. - */ - /*@{*/ - - /** - * Create a statistics context. - * - * @param pImageStatisticsContext A statistics context. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2CreateImageStatistics( - @ByPtrPtr fc2ImageStatisticsContext pImageStatisticsContext ); - - /** - * Destroy a statistics context. - * - * @param imageStatisticsContext A statistics context. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DestroyImageStatistics( - fc2ImageStatisticsContext imageStatisticsContext ); - - - /** - * Enable all channels. - * - * @param imageStatisticsContext A statistics context. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ImageStatisticsEnableAll( - fc2ImageStatisticsContext imageStatisticsContext ); - - /** - * Disable all channels. - * - * @param imageStatisticsContext A statistics context. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ImageStatisticsDisableAll( - fc2ImageStatisticsContext imageStatisticsContext ); - - /** - * Enable only the grey channel. - * - * @param imageStatisticsContext A statistics context. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ImageStatisticsEnableGreyOnly( - fc2ImageStatisticsContext imageStatisticsContext ); - - /** - * Enable only the RGB channels. - * - * @param imageStatisticsContext A statistics context. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ImageStatisticsEnableRGBOnly( - fc2ImageStatisticsContext imageStatisticsContext ); - - /** - * Enable only the HSL channels. - * - * @param imageStatisticsContext A statistics context. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2ImageStatisticsEnableHSLOnly( - fc2ImageStatisticsContext imageStatisticsContext ); - - /** - * Get the status of a statistics channel. - * - * @see fc2SetChannelStatus() - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param pEnabled Whether the channel is enabled. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetChannelStatus( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("BOOL*") IntPointer pEnabled ); - public static native @Cast("fc2Error") int fc2GetChannelStatus( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("BOOL*") IntBuffer pEnabled ); - public static native @Cast("fc2Error") int fc2GetChannelStatus( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("BOOL*") int[] pEnabled ); - - /** - * Set the status of a statistics channel. - * - * @see fc2GetChannelStatus() - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param enabled Whether the channel should be enabled. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2SetChannelStatus( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("BOOL") int enabled ); - - /** - * Get the range of a statistics channel. The values returned - * are the maximum possible values for any given pixel in the image. - * This is generally 0-255 for 8 bit images, and 0-65535 for - * 16 bit images. - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param pMin The minimum possible value. - * @param pMax The maximum possible value. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetChannelRange( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntPointer pMin, - @Cast("unsigned int*") IntPointer pMax ); - public static native @Cast("fc2Error") int fc2GetChannelRange( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntBuffer pMin, - @Cast("unsigned int*") IntBuffer pMax ); - public static native @Cast("fc2Error") int fc2GetChannelRange( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") int[] pMin, - @Cast("unsigned int*") int[] pMax ); - - /** - * Get the range of a statistics channel. The values returned - * are the maximum values recorded for all pixels in the image. - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param pPixelValueMin The minimum pixel value. - * @param pPixelValueMax The maximum pixel value. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetChannelPixelValueRange( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntPointer pPixelValueMin, - @Cast("unsigned int*") IntPointer pPixelValueMax ); - public static native @Cast("fc2Error") int fc2GetChannelPixelValueRange( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntBuffer pPixelValueMin, - @Cast("unsigned int*") IntBuffer pPixelValueMax ); - public static native @Cast("fc2Error") int fc2GetChannelPixelValueRange( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") int[] pPixelValueMin, - @Cast("unsigned int*") int[] pPixelValueMax ); - - /** - * Get the number of unique pixel values in the image. - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param pNumPixelValues The number of unique pixel values. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetChannelNumPixelValues( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntPointer pNumPixelValues ); - public static native @Cast("fc2Error") int fc2GetChannelNumPixelValues( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntBuffer pNumPixelValues ); - public static native @Cast("fc2Error") int fc2GetChannelNumPixelValues( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") int[] pNumPixelValues ); - - /** - * Get the mean of the image. - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param pPixelValueMean The mean of the image. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetChannelMean( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - FloatPointer pPixelValueMean ); - public static native @Cast("fc2Error") int fc2GetChannelMean( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - FloatBuffer pPixelValueMean ); - public static native @Cast("fc2Error") int fc2GetChannelMean( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - float[] pPixelValueMean ); - - /** - * Get the histogram for the image. - * - * @param imageStatisticsContext A statistics context. - * @param channel The statistics channel. - * @param ppHistogram Pointer to an array containing the histogram. - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetChannelHistogram( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("int**") PointerPointer ppHistogram ); - public static native @Cast("fc2Error") int fc2GetChannelHistogram( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @ByPtrPtr IntPointer ppHistogram ); - public static native @Cast("fc2Error") int fc2GetChannelHistogram( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @ByPtrPtr IntBuffer ppHistogram ); - public static native @Cast("fc2Error") int fc2GetChannelHistogram( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @ByPtrPtr int[] ppHistogram ); - - /** - * Get all statistics for the image. - * - * @param imageStatisticsContext The statistics context. - * @param channel The statistics channel. - * @param pRangeMin The minimum possible value. - * @param pRangeMax The maximum possible value. - * @param pPixelValueMin The minimum pixel value. - * @param pPixelValueMax The maximum pixel value. - * @param pNumPixelValues The number of unique pixel values. - * @param pPixelValueMean The mean of the image. - * @param ppHistogram Pointer to an array containing the histogram. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetImageStatistics( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntPointer pRangeMin, - @Cast("unsigned int*") IntPointer pRangeMax, - @Cast("unsigned int*") IntPointer pPixelValueMin, - @Cast("unsigned int*") IntPointer pPixelValueMax, - @Cast("unsigned int*") IntPointer pNumPixelValues, - FloatPointer pPixelValueMean, - @Cast("int**") PointerPointer ppHistogram ); - public static native @Cast("fc2Error") int fc2GetImageStatistics( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntPointer pRangeMin, - @Cast("unsigned int*") IntPointer pRangeMax, - @Cast("unsigned int*") IntPointer pPixelValueMin, - @Cast("unsigned int*") IntPointer pPixelValueMax, - @Cast("unsigned int*") IntPointer pNumPixelValues, - FloatPointer pPixelValueMean, - @ByPtrPtr IntPointer ppHistogram ); - public static native @Cast("fc2Error") int fc2GetImageStatistics( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") IntBuffer pRangeMin, - @Cast("unsigned int*") IntBuffer pRangeMax, - @Cast("unsigned int*") IntBuffer pPixelValueMin, - @Cast("unsigned int*") IntBuffer pPixelValueMax, - @Cast("unsigned int*") IntBuffer pNumPixelValues, - FloatBuffer pPixelValueMean, - @ByPtrPtr IntBuffer ppHistogram ); - public static native @Cast("fc2Error") int fc2GetImageStatistics( - fc2ImageStatisticsContext imageStatisticsContext, - @Cast("fc2StatisticsChannel") int channel, - @Cast("unsigned int*") int[] pRangeMin, - @Cast("unsigned int*") int[] pRangeMax, - @Cast("unsigned int*") int[] pPixelValueMin, - @Cast("unsigned int*") int[] pPixelValueMax, - @Cast("unsigned int*") int[] pNumPixelValues, - float[] pPixelValueMean, - @ByPtrPtr int[] ppHistogram ); - - /*@}*/ - - /** - * \defgroup CAVIRecorder AVI Recording Operation - * - * \brief The AVI recording operation provides the functionality for the user to record - * images to an AVI file. - */ - /*@{*/ - - /** - * Create a AVI context. - * - * @param pAVIContext A AVI context. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2CreateAVI( - @ByPtrPtr fc2AVIContext pAVIContext ); - - /** - * Open an AVI file in preparation for writing Images to disk. - * The size of AVI files is limited to 2GB. The filenames are - * automatically generated using the filename specified. - * - * @param AVIContext The AVI context to use. - * @param pFileName The filename of the AVI file. - * @param pOption Options to apply to the AVI file. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2AVIOpen( - fc2AVIContext AVIContext, - @Cast("const char*") BytePointer pFileName, - fc2AVIOption pOption ); - public static native @Cast("fc2Error") int fc2AVIOpen( - fc2AVIContext AVIContext, - String pFileName, - fc2AVIOption pOption ); - - /** - * Open an MJPEG file in preparation for writing Images to disk. - * The size of AVI files is limited to 2GB. The filenames are - * automatically generated using the filename specified. - * - * @param AVIContext The AVI context to use. - * @param pFileName The filename of the AVI file. - * @param pOption Options to apply to the AVI file. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2MJPGOpen( - fc2AVIContext AVIContext, - @Cast("const char*") BytePointer pFileName, - fc2MJPGOption pOption ); - public static native @Cast("fc2Error") int fc2MJPGOpen( - fc2AVIContext AVIContext, - String pFileName, - fc2MJPGOption pOption ); - - /** - * Open an H.264 file in preparation for writing Images to disk. - * The size of AVI files is limited to 2GB. The filenames are - * automatically generated using the filename specified. - * - * @param AVIContext The AVI context to use. - * @param pFileName The filename of the AVI file. - * @param pOption Options to apply to the AVI file. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2H264Open( - fc2AVIContext AVIContext, - @Cast("const char*") BytePointer pFileName, - fc2H264Option pOption ); - public static native @Cast("fc2Error") int fc2H264Open( - fc2AVIContext AVIContext, - String pFileName, - fc2H264Option pOption ); - - /** - * Append an image to the AVI file. - * - * @param AVIContext The AVI context to use. - * @param pImage The image to append. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2AVIAppend( - fc2AVIContext AVIContext, - fc2Image pImage ); - - /** - * Close the AVI file. - * - * @param AVIContext The AVI context to use. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2AVIClose( - fc2AVIContext AVIContext ); - - /** - * Destroy a AVI context. - * - * @param AVIContext A AVI context. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DestroyAVI( - fc2AVIContext AVIContext ); - - /*@}*/ - - /** - * \defgroup CTopologyNode TopologyNode Operation - * - * \brief The TopologyNode operation provides the functionality for the user to - * generate a tree structure of all cameras and devices connected to a computer. - */ - /*@{*/ - - /** - * Create a TopologyNode context. - * - * @param pTopologyNodeContext A Topology Node context. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2CreateTopologyNode( - @ByPtrPtr fc2TopologyNodeContext pTopologyNodeContext ); - - /** - * Get the PGRGuid associated with the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param pGuid The unique identifier associated with the node. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetGuid( - fc2TopologyNodeContext TopologyNodeContext, - fc2PGRGuid pGuid); - - /** - * Get the device ID associated with the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param pID Device ID of the node. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetDeviceId( - fc2TopologyNodeContext TopologyNodeContext, - IntPointer pID); - public static native @Cast("fc2Error") int fc2TopologyNodeGetDeviceId( - fc2TopologyNodeContext TopologyNodeContext, - IntBuffer pID); - public static native @Cast("fc2Error") int fc2TopologyNodeGetDeviceId( - fc2TopologyNodeContext TopologyNodeContext, - int[] pID); - - /** - * Get the node type associated with the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param pNodeType Node type of the node. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetNodeType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2NodeType*") IntPointer pNodeType); - public static native @Cast("fc2Error") int fc2TopologyNodeGetNodeType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2NodeType*") IntBuffer pNodeType); - public static native @Cast("fc2Error") int fc2TopologyNodeGetNodeType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2NodeType*") int[] pNodeType); - - /** - * Get the interface type associated with the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param pInterfaceType Interface type of the node. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetInterfaceType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2InterfaceType*") IntPointer pInterfaceType); - public static native @Cast("fc2Error") int fc2TopologyNodeGetInterfaceType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2InterfaceType*") IntBuffer pInterfaceType); - public static native @Cast("fc2Error") int fc2TopologyNodeGetInterfaceType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2InterfaceType*") int[] pInterfaceType); - - /** - * Get the number of child nodes. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param pNumChildNodes Number of child nodes. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetNumChildren( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int*") IntPointer pNumChildNodes); - public static native @Cast("fc2Error") int fc2TopologyNodeGetNumChildren( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int*") IntBuffer pNumChildNodes); - public static native @Cast("fc2Error") int fc2TopologyNodeGetNumChildren( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int*") int[] pNumChildNodes); - - /** - * Get child node located at the specified position. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param position Position of the child node. - * @param pChildTopologyNodeContext The Topology Node context the contains - * information on the child topology - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetChild( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int") int position, - @ByPtrPtr fc2TopologyNodeContext pChildTopologyNodeContext); - - /** - * Add the specified TopologyNode as a child of the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param TopologyNodeChildContext The TopologyNode child context to add. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeAddChild( - fc2TopologyNodeContext TopologyNodeContext, - fc2TopologyNodeContext TopologyNodeChildContext); - - /** - * Get the number of ports. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param pNumPorts Number of ports. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetNumPorts( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int*") IntPointer pNumPorts); - public static native @Cast("fc2Error") int fc2TopologyNodeGetNumPorts( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int*") IntBuffer pNumPorts); - public static native @Cast("fc2Error") int fc2TopologyNodeGetNumPorts( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int*") int[] pNumPorts); - - /** - * Get type of port located at the specified position. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param position Position of the port. - * @param pPortType PortType at the specified position. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeGetPortType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int") int position, - @Cast("fc2PortType*") IntPointer pPortType); - public static native @Cast("fc2Error") int fc2TopologyNodeGetPortType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int") int position, - @Cast("fc2PortType*") IntBuffer pPortType); - public static native @Cast("fc2Error") int fc2TopologyNodeGetPortType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("unsigned int") int position, - @Cast("fc2PortType*") int[] pPortType); - - /** - * Add the specified PortType as a port of the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param portType childPort The port to add. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2TopologyNodeAddPortType( - fc2TopologyNodeContext TopologyNodeContext, - @Cast("fc2PortType") int portType); - - /** - * Assign a PGRGuid and device ID to the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param guid PGRGuid to be assigned. - * @param deviceId Device ID to be assigned. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("BOOL") int fc2TopologyNodeAssignGuidToNode( - fc2TopologyNodeContext TopologyNodeContext, - @ByVal fc2PGRGuid guid, - int deviceId); - - /** - * Assign a PGRGuid, device ID and nodeType to the node. - * - * @param TopologyNodeContext The Topology Node context to use. - * @param guid PGRGuid to be assigned. - * @param deviceId Device ID to be assigned. - * @param nodeType NodeType to be assigned - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("BOOL") int fc2TopologyNodeAssignGuidToNodeEx( - fc2TopologyNodeContext TopologyNodeContext, - @ByVal fc2PGRGuid guid, - int deviceId, - @Cast("fc2NodeType") int nodeType); - - /** - * Destroy a TopologyNode context. - * - * @param TopologyNodeContext A Topology Node context. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2DestroyTopologyNode( - fc2TopologyNodeContext TopologyNodeContext ); - - /*@}*/ - - /** - * \defgroup CUtilities Utilities - * - * \brief The utility operations are used to query for general system - * information such as operating system, available memory etc. - * It can also be used to launch browsers, CHM viewers or terminal commands. - */ - /*@{*/ - - /** - * Check for driver compatibility for the given camera guid. - * - * @param pGuid The PGRGuid of the device to check. - * - * @return FC2_ERROR_OK if the library is compatible with the currently - * loaded driver, otherwise an error indicating the type of failure. - */ - public static native @Cast("fc2Error") int fc2CheckDriver( @Const fc2PGRGuid pGuid); - - /** - * Get the driver's name for a device - * - * @param pGuid The PGRGuid of the device to check. - * @param pDeviceName The device name will be returned in this string - * @param pDeviceNameLength The length of the device name string returned - * - * @return An Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetDriverDeviceName( - @Const fc2PGRGuid pGuid, - @Cast("char*") BytePointer pDeviceName, - @Cast("size_t*") SizeTPointer deviceNameLength); - public static native @Cast("fc2Error") int fc2GetDriverDeviceName( - @Const fc2PGRGuid pGuid, - @Cast("char*") ByteBuffer pDeviceName, - @Cast("size_t*") SizeTPointer deviceNameLength); - public static native @Cast("fc2Error") int fc2GetDriverDeviceName( - @Const fc2PGRGuid pGuid, - @Cast("char*") byte[] pDeviceName, - @Cast("size_t*") SizeTPointer deviceNameLength); - - /** - * Get system information. - * - * @param pSystemInfo Structure to receive system information. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetSystemInfo( fc2SystemInfo pSystemInfo); - - /** - * Get library version. - * - * @param pVersion Structure to receive the library version. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2GetLibraryVersion( fc2Version pVersion); - - /** - * Launch a URL in the system default browser. - * - * @param pAddress URL to open in browser. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2LaunchBrowser( @Cast("const char*") BytePointer pAddress); - public static native @Cast("fc2Error") int fc2LaunchBrowser( String pAddress); - - /** - * Open a CHM file in the system default CHM viewer. - * - * @param pFileName Filename of CHM file to open. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2LaunchHelp( @Cast("const char*") BytePointer pFileName); - public static native @Cast("fc2Error") int fc2LaunchHelp( String pFileName); - - /** - * Execute a command in the terminal. This is a blocking call that - * will return when the command completes. - * - * @param pCommand Command to execute. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2LaunchCommand( @Cast("const char*") BytePointer pCommand); - public static native @Cast("fc2Error") int fc2LaunchCommand( String pCommand); - - /** - * Execute a command in the terminal. This is a non-blocking call that - * will return immediately. The return value of the command can be - * retrieved in the callback. - * - * @param pCommand Command to execute. - * @param pCallback Callback to fire when command is complete. - * @param pUserData Data pointer to pass to callback. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("fc2Error") int fc2LaunchCommandAsync( - @Cast("const char*") BytePointer pCommand, - fc2AsyncCommandCallback pCallback, - Pointer pUserData ); - public static native @Cast("fc2Error") int fc2LaunchCommandAsync( - String pCommand, - fc2AsyncCommandCallback pCallback, - Pointer pUserData ); - - /** - * Get a string representation of an error. - * - * @param error Error to be parsed. - * - * @return A fc2Error indicating the success or failure of the function. - */ - public static native @Cast("const char*") BytePointer fc2ErrorToDescription( - @Cast("fc2Error") int error); - - /*@}*/ + /** + * 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. + */ + public static native @Cast("fc2Error") int fc2CreateContext( + @Cast("fc2Context*") @ByPtrPtr 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. + */ + public static native @Cast("fc2Error") int fc2CreateGigEContext( + @Cast("fc2Context*") @ByPtrPtr 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int fc2GetNumOfCameras( + fc2Context context, + @Cast("unsigned int*") IntPointer pNumCameras ); + public static native @Cast("fc2Error") int fc2GetNumOfCameras( + fc2Context context, + @Cast("unsigned int*") IntBuffer pNumCameras ); + public static native @Cast("fc2Error") int fc2GetNumOfCameras( + fc2Context context, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2GetCameraFromIPAddress( + fc2Context context, + @ByVal 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. + */ + public static native @Cast("fc2Error") int fc2GetCameraFromIndex( + fc2Context context, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2GetCameraFromSerialNumber( + fc2Context context, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2GetCameraSerialNumberFromIndex( + fc2Context context, + @Cast("unsigned int") int index, + @Cast("unsigned int*") IntPointer pSerialNumber ); + public static native @Cast("fc2Error") int fc2GetCameraSerialNumberFromIndex( + fc2Context context, + @Cast("unsigned int") int index, + @Cast("unsigned int*") IntBuffer pSerialNumber ); + public static native @Cast("fc2Error") int fc2GetCameraSerialNumberFromIndex( + fc2Context context, + @Cast("unsigned int") int index, + @Cast("unsigned int*") 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 + */ + public static native @Cast("fc2Error") int fc2GetInterfaceTypeFromGuid( + fc2Context context, + fc2PGRGuid pGuid, + @Cast("fc2InterfaceType*") IntPointer pInterfaceType ); + public static native @Cast("fc2Error") int fc2GetInterfaceTypeFromGuid( + fc2Context context, + fc2PGRGuid pGuid, + @Cast("fc2InterfaceType*") IntBuffer pInterfaceType ); + public static native @Cast("fc2Error") int fc2GetInterfaceTypeFromGuid( + fc2Context context, + fc2PGRGuid pGuid, + @Cast("fc2InterfaceType*") int[] 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. + */ + public static native @Cast("fc2Error") int fc2GetNumOfDevices( + fc2Context context, + @Cast("unsigned int*") IntPointer pNumDevices ); + public static native @Cast("fc2Error") int fc2GetNumOfDevices( + fc2Context context, + @Cast("unsigned int*") IntBuffer pNumDevices ); + public static native @Cast("fc2Error") int fc2GetNumOfDevices( + fc2Context context, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2GetDeviceFromIndex( + fc2Context context, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2ReadPhyRegister( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pValue ); + public static native @Cast("fc2Error") int fc2ReadPhyRegister( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pValue ); + public static native @Cast("fc2Error") int fc2ReadPhyRegister( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2WritePhyRegister( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int") int page, + @Cast("unsigned int") int port, + @Cast("unsigned int") int address, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2GetUsbLinkInfo( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int*") IntPointer pValue ); + public static native @Cast("fc2Error") int fc2GetUsbLinkInfo( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int*") IntBuffer pValue ); + public static native @Cast("fc2Error") int fc2GetUsbLinkInfo( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2GetUsbPortStatus( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int*") IntPointer pValue ); + public static native @Cast("fc2Error") int fc2GetUsbPortStatus( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int*") IntBuffer pValue ); + public static native @Cast("fc2Error") int fc2GetUsbPortStatus( + fc2Context context, + @ByVal fc2PGRGuid guid, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2GetTopology( + fc2Context context, + @ByPtrPtr 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. + */ + public static native @Cast("fc2Error") int fc2RegisterCallback( + fc2Context context, + fc2BusEventCallback enumCallback, + @Cast("fc2BusCallbackType") int callbackType, + Pointer pParameter, + @ByPtrPtr 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. + */ + public static native @Cast("fc2Error") int fc2UnregisterCallback( + fc2Context context, + fc2CallbackHandle callbackHandle ); + + /** + * Force a rescan of the buses. This does not trigger a bus reset. + * The camera objects will be invalidated only if the camera network + * topology is changed (ie. a camera is disconnected or added) + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int fc2ForceIPAddressToCamera( + fc2Context context, + @ByVal fc2MACAddress macAddress, + @ByVal fc2IPAddress ipAddress, + @ByVal fc2IPAddress subnetMask, + @ByVal 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int fc2ForceIPAddressAutomatically(@Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2DiscoverGigECameras( + fc2Context context, + fc2CameraInfo gigECameras, + @Cast("unsigned int*") IntPointer arraySize ); + public static native @Cast("fc2Error") int fc2DiscoverGigECameras( + fc2Context context, + fc2CameraInfo gigECameras, + @Cast("unsigned int*") IntBuffer arraySize ); + public static native @Cast("fc2Error") int fc2DiscoverGigECameras( + fc2Context context, + fc2CameraInfo gigECameras, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2IsCameraControlable( + fc2Context context, + fc2PGRGuid pGuid, + @Cast("BOOL*") IntPointer pControlable); + public static native @Cast("fc2Error") int fc2IsCameraControlable( + fc2Context context, + fc2PGRGuid pGuid, + @Cast("BOOL*") IntBuffer pControlable); + public static native @Cast("fc2Error") int fc2IsCameraControlable( + fc2Context context, + fc2PGRGuid pGuid, + @Cast("BOOL*") int[] 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("BOOL") int 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. + */ + public static native @Cast("fc2Error") int fc2SetCallback( + fc2Context context, + fc2ImageEventCallback pCallbackFn, + Pointer 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int fc2StartCaptureCallback( + fc2Context context, + fc2ImageEventCallback pCallbackFn, + Pointer pCallbackData); + + /** + * Starts synchronized isochronous image capture on multiple cameras. + * This function is only used for firewire 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. + */ + public static native @Cast("fc2Error") int fc2StartSyncCapture( + @Cast("unsigned int") int numCameras, + @Cast("fc2Context*") @ByPtrPtr fc2Context pContexts ); + + /** + * Starts synchronized isochronous image capture on multiple cameras. + * This function is only used for firewire 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. + */ + public static native @Cast("fc2Error") int fc2StartSyncCaptureCallback( + @Cast("unsigned int") int numCameras, + @Cast("fc2Context*") @ByPtrPtr fc2Context pContexts, + @Cast("fc2ImageEventCallback*") @ByPtrPtr fc2ImageEventCallback pCallbackFns, + @Cast("void**") PointerPointer pCallbackDataArray); + public static native @Cast("fc2Error") int fc2StartSyncCaptureCallback( + @Cast("unsigned int") int numCameras, + @Cast("fc2Context*") @ByPtrPtr fc2Context pContexts, + @Cast("fc2ImageEventCallback*") @ByPtrPtr fc2ImageEventCallback pCallbackFns, + @Cast("void**") @ByPtrPtr Pointer 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int fc2WaitForBufferEvent( + fc2Context context, + fc2Image pImage, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2SetUserBuffers( + fc2Context context, + @Cast("unsigned char*const") BytePointer ppMemBuffers, + int size, + int nNumBuffers ); + public static native @Cast("fc2Error") int fc2SetUserBuffers( + fc2Context context, + @Cast("unsigned char*const") ByteBuffer ppMemBuffers, + int size, + int nNumBuffers ); + public static native @Cast("fc2Error") int fc2SetUserBuffers( + fc2Context context, + @Cast("unsigned char*const") byte[] 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int fc2GetGPIOPinDirection( + fc2Context context, + @Cast("unsigned int") int pin, + @Cast("unsigned int*") IntPointer pDirection ); + public static native @Cast("fc2Error") int fc2GetGPIOPinDirection( + fc2Context context, + @Cast("unsigned int") int pin, + @Cast("unsigned int*") IntBuffer pDirection ); + public static native @Cast("fc2Error") int fc2GetGPIOPinDirection( + fc2Context context, + @Cast("unsigned int") int pin, + @Cast("unsigned int*") 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. + */ + public static native @Cast("fc2Error") int fc2SetGPIOPinDirection( + fc2Context context, + @Cast("unsigned int") int pin, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int fc2SetGPIOPinDirectionBroadcast( + fc2Context context, + @Cast("unsigned int") int pin, + @Cast("unsigned int") 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + */ + public static native @Cast("fc2Error") int 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. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetTriggerDelayInfo( + fc2Context context, + @Cast("fc2TriggerDelayInfo*") fc2PropertyInfo triggerDelayInfo ); + + /** + * Retrieve current trigger delay settings from the camera. + * + * @see fc2GetTriggerModeInfo() + * @see fc2GetTriggerMode() + * @see fc2SetTriggerMode() + * @see fc2GetTriggerDelayInfo() + * @see fc2SetTriggerDelay() + * @see fc2SetTriggerDelayBroadcast() + * + * @param context The fc2Context to be used. + * @param triggerDelay Structure to receive trigger delay settings. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetTriggerDelay( + fc2Context context, + @Cast("fc2TriggerDelay*") fc2Property triggerDelay ); + + /** + * Set the specified trigger delay settings to the camera. + * + * @see fc2GetTriggerModeInfo() + * @see fc2GetTriggerMode() + * @see fc2SetTriggerMode() + * @see fc2GetTriggerDelayInfo() + * @see fc2GetTriggerDelay() + * @see fc2SetTriggerDelayBroadcast() + * + * @param context The fc2Context to be used. + * @param triggerDelay Structure providing trigger delay settings. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetTriggerDelay( + fc2Context context, + @Cast("fc2TriggerDelay*") fc2Property triggerDelay ); + + /** + * Set the specified trigger delay settings to the camera. + * + * @see fc2GetTriggerModeInfo() + * @see fc2GetTriggerMode() + * @see fc2SetTriggerMode() + * @see fc2GetTriggerDelayInfo() + * @see fc2GetTriggerDelay() + * @see fc2SetTriggerDelay() + * + * @param context The fc2Context to be used. + * @param triggerDelay Structure providing trigger delay settings. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetTriggerDelayBroadcast( + fc2Context context, + @Cast("fc2TriggerDelay*") fc2Property triggerDelay ); + /*@}*/ + + /** + * \defgroup CStrobe Strobe + * + * \brief These functions deal with strobe control on the camera. + */ + /*@{*/ + + /** + * Retrieve strobe information from the camera. + * + * @see fc2GetStrobe() + * @see fc2SetStrobe() + * @see fc2SetStrobeBroadcast() + * + * @param context The fc2Context to be used. + * @param strobeInfo Structure to receive strobe information. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetStrobeInfo( + fc2Context context, + fc2StrobeInfo strobeInfo ); + + /** + * Retrieve current strobe settings from the camera. The strobe pin + * must be specified in the structure before being passed in to + * the function. + * + * @see fc2GetStrobeInfo() + * @see fc2SetStrobe() + * @see fc2SetStrobeBroadcast() + * + * @param context The fc2Context to be used. + * @param strobeControl Structure to receive strobe settings. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetStrobe( + fc2Context context, + fc2StrobeControl strobeControl ); + + /** + * Set current strobe settings to the camera. The strobe pin + * must be specified in the structure before being passed in to + * the function. + * + * @see fc2GetStrobeInfo() + * @see fc2GetStrobe() + * @see fc2SetStrobeBroadcast() + * + * @param context The fc2Context to be used. + * @param strobeControl Structure providing strobe settings. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetStrobe( + fc2Context context, + fc2StrobeControl strobeControl ); + + /** + * Set current strobe settings to the camera. The strobe pin + * must be specified in the structure before being passed in to + * the function. + * + * @see fc2GetStrobeInfo() + * @see fc2GetStrobe() + * @see fc2SetStrobe() + * + * @param context The fc2Context to be used. + * @param strobeControl Structure providing strobe settings. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetStrobeBroadcast( + fc2Context context, + fc2StrobeControl strobeControl ); + /*@}*/ + + /** + * \defgroup CLookUp Look Up Table + * + * \brief These functions deal with Look Up Table control on the camera. + */ + /*@{*/ + + /** + * Query if LUT support is available on the camera. Note that some cameras + * may report support for the LUT and return an inputBitDepth of 0. In these + * cases use log2(numEntries) for the inputBitDepth. + * + * @see fc2EnableLUT() + * @see fc2GetLUTChannel() + * @see fc2SetLUTChannel() + * + * @param context The fc2Context to be used. + * @param pData The LUT structure to be filled. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetLUTInfo( + fc2Context context, + fc2LUTData pData ); + + /** + * Query the read/write status of a single LUT bank. + * + * @param context The fc2Context to be used. + * @param bank The bank to query. + * @param pReadSupported Whether reading from the bank is supported. + * @param pWriteSupported Whether writing to the bank is supported. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetLUTBankInfo( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("BOOL*") IntPointer pReadSupported, + @Cast("BOOL*") IntPointer pWriteSupported ); + public static native @Cast("fc2Error") int fc2GetLUTBankInfo( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("BOOL*") IntBuffer pReadSupported, + @Cast("BOOL*") IntBuffer pWriteSupported ); + public static native @Cast("fc2Error") int fc2GetLUTBankInfo( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("BOOL*") int[] pReadSupported, + @Cast("BOOL*") int[] pWriteSupported ); + + /** + * Get the LUT bank that is currently being used. For cameras with + * PGR LUT, the active bank is always 0. + * + * @param context The fc2Context to be used. + * @param pActiveBank The currently active bank. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetActiveLUTBank( + fc2Context context, + @Cast("unsigned int*") IntPointer pActiveBank ); + public static native @Cast("fc2Error") int fc2GetActiveLUTBank( + fc2Context context, + @Cast("unsigned int*") IntBuffer pActiveBank ); + public static native @Cast("fc2Error") int fc2GetActiveLUTBank( + fc2Context context, + @Cast("unsigned int*") int[] pActiveBank ); + + /** + * Set the LUT bank that will be used. + * + * @param context The fc2Context to be used. + * @param activeBank The bank to be set as active. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetActiveLUTBank( + fc2Context context, + @Cast("unsigned int") int activeBank ); + + /** + * Enable or disable LUT functionality on the camera. + * + * @see fc2GetLUTInfo() + * @see fc2GetLUTChannel() + * @see fc2SetLUTChannel() + * + * @param context The fc2Context to be used. + * @param on Whether to enable or disable LUT. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2EnableLUT( + fc2Context context, + @Cast("BOOL") int on ); + + /** + * Get the LUT channel settings from the camera. + * + * @see fc2GetLUTInfo() + * @see fc2EnableLUT() + * @see fc2SetLUTChannel() + * + * @param context The fc2Context to be used. + * @param bank Bank to retrieve. + * @param channel Channel to retrieve. + * @param sizeEntries Number of entries in LUT table to read. + * @param pEntries Array to store LUT entries. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetLUTChannel( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntPointer pEntries ); + public static native @Cast("fc2Error") int fc2GetLUTChannel( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntBuffer pEntries ); + public static native @Cast("fc2Error") int fc2GetLUTChannel( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") int[] pEntries ); + + /** + * Set the LUT channel settings to the camera. + * + * @see fc2GetLUTInfo() + * @see fc2EnableLUT() + * @see fc2GetLUTChannel() + * + * @param context The fc2Context to be used. + * @param bank Bank to set. + * @param channel Channel to set. + * @param sizeEntries Number of entries in LUT table to write. This must be the + * same size as numEntries returned by GetLutInfo(). + * @param pEntries Array containing LUT entries to write. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetLUTChannel( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntPointer pEntries ); + public static native @Cast("fc2Error") int fc2SetLUTChannel( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") IntBuffer pEntries ); + public static native @Cast("fc2Error") int fc2SetLUTChannel( + fc2Context context, + @Cast("unsigned int") int bank, + @Cast("unsigned int") int channel, + @Cast("unsigned int") int sizeEntries, + @Cast("unsigned int*") int[] pEntries ); + /*@}*/ + + /** + * \defgroup CMemoryChannel Memory Channels + * + * \brief These functions deal with memory channel control on the camera. + */ + /*@{*/ + + /** + * Retrieve the current memory channel from the camera. + * + * @see fc2SaveToMemoryChannel() + * @see fc2RestoreFromMemoryChannel() + * @see fc2GetMemoryChannelInfo() + * + * @param context The fc2Context to be used. + * @param pCurrentChannel Current memory channel. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetMemoryChannel( + fc2Context context, + @Cast("unsigned int*") IntPointer pCurrentChannel ); + public static native @Cast("fc2Error") int fc2GetMemoryChannel( + fc2Context context, + @Cast("unsigned int*") IntBuffer pCurrentChannel ); + public static native @Cast("fc2Error") int fc2GetMemoryChannel( + fc2Context context, + @Cast("unsigned int*") int[] pCurrentChannel ); + + /** + * Save the current settings to the specified current memory channel. + * + * @see fc2GetMemoryChannel() + * @see fc2RestoreFromMemoryChannel() + * @see fc2GetMemoryChannelInfo() + * + * @param context The fc2Context to be used. + * @param channel Memory channel to save to. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SaveToMemoryChannel( + fc2Context context, + @Cast("unsigned int") int channel ); + + /** + * Restore the specified current memory channel. + * + * @see fc2GetMemoryChannel() + * @see fc2SaveToMemoryChannel() + * @see fc2GetMemoryChannelInfo() + * + * @param context The fc2Context to be used. + * @param channel Memory channel to restore from. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2RestoreFromMemoryChannel( + fc2Context context, + @Cast("unsigned int") int channel ); + + /** + * Query the camera for memory channel support. If the number of + * channels are 0, then memory channel support is not available. + * + * @see fc2GetMemoryChannel() + * @see fc2SaveToMemoryChannel() + * @see fc2RestoreFromMemoryChannel() + * + * @param context The fc2Context to be used. + * @param pNumChannels Number of memory channels supported. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetMemoryChannelInfo( + fc2Context context, + @Cast("unsigned int*") IntPointer pNumChannels ); + public static native @Cast("fc2Error") int fc2GetMemoryChannelInfo( + fc2Context context, + @Cast("unsigned int*") IntBuffer pNumChannels ); + public static native @Cast("fc2Error") int fc2GetMemoryChannelInfo( + fc2Context context, + @Cast("unsigned int*") int[] pNumChannels ); + + /** + * Get the current status of the embedded image information register, + * as well as the availability of each embedded property. + * + * @see fc2SetEmbeddedImageInfo() + * + * @param context The fc2Context to be used. + * @param pInfo Structure to be filled. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetEmbeddedImageInfo( + fc2Context context, + fc2EmbeddedImageInfo pInfo ); + + /** + * Sets the on/off values of the embedded image information structure + * to the camera. + * + * @see fc2GetEmbeddedImageInfo() + * + * @param context The fc2Context to be used. + * @param pInfo Structure to be used. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetEmbeddedImageInfo( + fc2Context context, + fc2EmbeddedImageInfo pInfo ); + /*@}*/ + + /** + * \defgroup CRegister Register Operation + * + * \brief These functions deal with register operation on the camera. + */ + /*@{*/ + + /** + * Write to the specified register on the camera. + * + * @see fc2ReadRegister() + * + * @param context The fc2Context to be used. + * @param address DCAM address to be written to. + * @param value The value to be written. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int") int value); + + /** + * Read the specified register from the camera. + * + * @see fc2WriteRegister() + * + * @param context The fc2Context to be used. + * @param address DCAM address to be read from. + * @param pValue The value that is read. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ReadRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pValue ); + public static native @Cast("fc2Error") int fc2ReadRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pValue ); + public static native @Cast("fc2Error") int fc2ReadRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") int[] pValue ); + + /** + * Write to the specified register on the camera with broadcast. + * + * @see fc2ReadRegisterBlock() + * + * @param context The fc2Context to be used. + * @param address DCAM address to be written to. + * @param value The value to be written. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteRegisterBroadcast( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int") int value); + + /** + * Write to the specified register block on the camera. + * + * @see fc2ReadRegisterBlock() + * + * @param context The fc2Context to be used. + * @param addressHigh Top 16 bits of the 48-bit absolute address to write to. + * @param addressLow Bottom 32 bits of the 48 bits absolute address to write to. + * @param pBuffer Array containing data to be written. + * @param length Size of array, in quadlets. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteRegisterBlock( + fc2Context context, + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2WriteRegisterBlock( + fc2Context context, + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2WriteRegisterBlock( + fc2Context context, + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("const unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Write to the specified register block on the camera. + * + * @see fc2WriteRegisterBlock() + * + * @param context The fc2Context to be used. + * @param addressHigh Top 16 bits of the 48-bit absolute address to read from. + * @param addressLow Bottom 32 bits of the 48 bits absolute address to read from. + * @param pBuffer Array to store read data. + * @param length Size of array, in quadlets. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ReadRegisterBlock( + fc2Context context, + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2ReadRegisterBlock( + fc2Context context, + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2ReadRegisterBlock( + fc2Context context, + @Cast("unsigned short") short addressHigh, + @Cast("unsigned int") int addressLow, + @Cast("unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Returns a text representation of the register value. + * + * @param registerVal The register value to query. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("const char*") BytePointer fc2GetRegisterString( + @Cast("unsigned int") int registerVal); + /*@}*/ + + /** + * Get cycle time from camera + * + * @param context The fc2Context to be used. + * @param Timestamp struct. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetCycleTime( fc2Context context, fc2TimeStamp pTimeStamp ); + + /** + * Returns the camera diagnostic information. + * + * @param context The fc2Context to be used. + * @param pCameraStats Pointer to the fc2CameraStats structure. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetStats( fc2Context context, fc2CameraStats pCameraStats ); + + /* + * Reset the camera diagnostic information. + * + * @return An Error indicating the success or failure of the function. + */ + + + /** + * Register the camera to issue a custom callback function call for a + * specific device event. + * + * @param context The fc2Context to be used. + * @param pOpts Pointer to the EventOptions structure which defines the + * callback function to use, the event for which to register + * the device, and a pointer to user data (optional) to be + * passed to the callback function. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2RegisterEvent( + fc2Context context, + fc2EventOptions pOpts ); + + /** + *De-register an event previously registered with the camera. + * + * @param context The fc2Context to be used. + * @param pOpts Pointer to the EventOptions structure which defines the + * callback function to use, the event for which to register + * the device, and a pointer to user data (optional) to be + * passed to the callback function. The callback function and + * user data elements of the EventOptions structure are ignored + * in this call, and just the event name within the structure is + * used with this function call. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DeregisterEvent( + fc2Context context, + fc2EventOptions pOpts ); + + /** + * Register the camera to issue a custom callback function call for a + * specific device event. + * + * @param context The fc2Context to be used. + * @param pOpts Pointer to the EventOptions structure which defines the + * callback function to use, the event for which to register + * the device, and a pointer to user data (optional) to be + * passed to the callback function. The event name element of + * the structure is ignored with this function call. If a single + * event has already been registered via RegisterEvent(), this + * call will fail, as the user could accidentally change the + * the internal callback function pointer for a queued event. + * The user will need to de-register all registered events, + * then call this function again. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2RegisterAllEvents( + fc2Context context, + fc2EventOptions pOpts ); + + /* + * De-register all events registered with the camera. + * + * @param context The fc2Context to be used. + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DeregisterAllEvents( + fc2Context context); + + /** + * \defgroup CDCAMFormats DCAM Formats + * + * \brief These functions deal with DCAM video mode and frame rate + * on the camera. This is only used for firewire and usb2 cameras. + */ + /*@{*/ + + /** + * Query the camera to determine if the specified video mode and + * frame rate is supported. + * + * @param context The fc2Context to be used. + * @param videoMode Video mode to check. + * @param frameRate Frame rate to check. + * @param pSupported Whether the video mode and frame rate is supported. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRateInfo( + fc2Context context, + @Cast("fc2VideoMode") int videoMode, + @Cast("fc2FrameRate") int frameRate, + @Cast("BOOL*") IntPointer pSupported); + public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRateInfo( + fc2Context context, + @Cast("fc2VideoMode") int videoMode, + @Cast("fc2FrameRate") int frameRate, + @Cast("BOOL*") IntBuffer pSupported); + public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRateInfo( + fc2Context context, + @Cast("fc2VideoMode") int videoMode, + @Cast("fc2FrameRate") int frameRate, + @Cast("BOOL*") int[] pSupported); + + /** + * Get the current video mode and frame rate from the camera. If + * the camera is in Format7, the video mode will be VIDEOMODE_FORMAT7 + * and the frame rate will be FRAMERATE_FORMAT7. + * + * @param context The fc2Context to be used. + * @param videoMode Current video mode. + * @param frameRate Current frame rate. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRate( + fc2Context context, + @Cast("fc2VideoMode*") IntPointer videoMode, + @Cast("fc2FrameRate*") IntPointer frameRate ); + public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRate( + fc2Context context, + @Cast("fc2VideoMode*") IntBuffer videoMode, + @Cast("fc2FrameRate*") IntBuffer frameRate ); + public static native @Cast("fc2Error") int fc2GetVideoModeAndFrameRate( + fc2Context context, + @Cast("fc2VideoMode*") int[] videoMode, + @Cast("fc2FrameRate*") int[] frameRate ); + + /** + * Set the specified video mode and frame rate to the camera. It is + * not possible to set the camera to VIDEOMODE_FORMAT7 or + * FRAMERATE_FORMAT7. Use the Format7 functions to set the camera + * into Format7. + * + * @param context The fc2Context to be used. + * @param videoMode Video mode to set to camera. + * @param frameRate Frame rate to set to camera. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetVideoModeAndFrameRate( + fc2Context context, + @Cast("fc2VideoMode") int videoMode, + @Cast("fc2FrameRate") int frameRate ); + /*@}*/ + + /** + * \defgroup CFormat7 Format7 + * + * \brief These functions deal with Format7 custom image control on the camera. + */ + /*@{*/ + + /** + * Retrieve the availability of Format7 custom image mode and the + * camera capabilities for the specified Format7 mode. The mode must + * be specified in the Format7Info structure in order for the + * function to succeed. + * + * @param context The fc2Context to be used. + * @param info Structure to be filled with the capabilities of the specified + * mode and the current state in the specified mode. + * @param pSupported Whether the specified mode is supported. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetFormat7Info( + fc2Context context, + fc2Format7Info info, + @Cast("BOOL*") IntPointer pSupported ); + public static native @Cast("fc2Error") int fc2GetFormat7Info( + fc2Context context, + fc2Format7Info info, + @Cast("BOOL*") IntBuffer pSupported ); + public static native @Cast("fc2Error") int fc2GetFormat7Info( + fc2Context context, + fc2Format7Info info, + @Cast("BOOL*") int[] pSupported ); + + /** + * Validates Format7ImageSettings structure and returns valid packet + * size information if the image settings are valid. The current + * image settings are cached while validation is taking place. The + * cached settings are restored when validation is complete. + * + * @param context The fc2Context to be used. + * @param imageSettings Structure containing the image settings. + * @param settingsAreValid Whether the settings are valid. + * @param packetInfo Packet size information that can be used to + * determine a valid packet size. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ValidateFormat7Settings( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("BOOL*") IntPointer settingsAreValid, + fc2Format7PacketInfo packetInfo ); + public static native @Cast("fc2Error") int fc2ValidateFormat7Settings( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("BOOL*") IntBuffer settingsAreValid, + fc2Format7PacketInfo packetInfo ); + public static native @Cast("fc2Error") int fc2ValidateFormat7Settings( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("BOOL*") int[] settingsAreValid, + fc2Format7PacketInfo packetInfo ); + + /** + * Get the current Format7 configuration from the camera. This call + * will only succeed if the camera is already in Format7. + * + * @param context The fc2Context to be used. + * @param imageSettings Current image settings. + * @param packetSize Current packet size. + * @param percentage Current packet size as a percentage. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetFormat7Configuration( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("unsigned int*") IntPointer packetSize, + FloatPointer percentage ); + public static native @Cast("fc2Error") int fc2GetFormat7Configuration( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("unsigned int*") IntBuffer packetSize, + FloatBuffer percentage ); + public static native @Cast("fc2Error") int fc2GetFormat7Configuration( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("unsigned int*") int[] packetSize, + float[] percentage ); + + /** + * Set the current Format7 configuration to the camera. + * + * @param context The fc2Context to be used. + * @param imageSettings Image settings to be written to the camera. + * @param packetSize Packet size to be written to the camera. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetFormat7ConfigurationPacket( + fc2Context context, + fc2Format7ImageSettings imageSettings, + @Cast("unsigned int") int packetSize ); + + /** + * Set the current Format7 configuration to the camera. + * + * @param context The fc2Context to be used. + * @param imageSettings Image settings to be written to the camera. + * @param percentSpeed Packet size as a percentage to be written to the camera. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetFormat7Configuration( + fc2Context context, + fc2Format7ImageSettings imageSettings, + float percentSpeed ); + /*@}*/ + + /** + * \defgroup CGVCPRegister GVCP Register Operation + * + * \brief These functions deal with GVCP register operation on the camera. + */ + /*@{*/ + + /** + * Write a GVCP register. + * + * @param context The fc2Context to be used. + * @param address GVCP address to be written to. + * @param value The value to be written. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteGVCPRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int") int value); + + /** + * Write a GVCP register with broadcast + * + * @param context The fc2Context to be used. + * @param address GVCP address to be written to. + * @param value The value to be written. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBroadcast( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int") int value); + + /** + * Read a GVCP register. + * + * @param context The fc2Context to be used. + * @param address GVCP address to be read from. + * @param pValue The value that is read. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ReadGVCPRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pValue ); + public static native @Cast("fc2Error") int fc2ReadGVCPRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pValue ); + public static native @Cast("fc2Error") int fc2ReadGVCPRegister( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") int[] pValue ); + + /** + * Write a GVCP register block. + * + * @param context The fc2Context to be used. + * @param address GVCP address to be write to. + * @param pBuffer Array containing data to be written. + * @param length Size of array, in quadlets. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBlock( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("const unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBlock( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("const unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2WriteGVCPRegisterBlock( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("const unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Read a GVCP register block. + * + * @param context The fc2Context to be used. + * @param address GVCP address to be read from. + * @param pBuffer Array containing data to be written. + * @param length Size of array, in quadlets. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ReadGVCPRegisterBlock( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntPointer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2ReadGVCPRegisterBlock( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") IntBuffer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2ReadGVCPRegisterBlock( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned int*") int[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Write a GVCP memory block. + * + * @param context The fc2Context to be used. + * @param address GVCP address to be write to. + * @param pBuffer Array containing data to be written. + * @param length Size of array, in quadlets. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2WriteGVCPMemory( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("const unsigned char*") BytePointer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2WriteGVCPMemory( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("const unsigned char*") ByteBuffer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2WriteGVCPMemory( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("const unsigned char*") byte[] pBuffer, + @Cast("unsigned int") int length ); + + /** + * Read a GVCP memory block. + * + * @param context The fc2Context to be used. + * @param address GVCP address to be read from. + * @param pBuffer Array containing data to be written. + * @param length Size of array, in quadlets. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ReadGVCPMemory( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned char*") BytePointer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2ReadGVCPMemory( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned char*") ByteBuffer pBuffer, + @Cast("unsigned int") int length ); + public static native @Cast("fc2Error") int fc2ReadGVCPMemory( + fc2Context context, + @Cast("unsigned int") int address, + @Cast("unsigned char*") byte[] pBuffer, + @Cast("unsigned int") int length ); + /*@}*/ + + + /** + * \defgroup CGEVProperty GigE property manipulation + * + * \brief These functions deal with GigE properties. + */ + /*@{*/ + + /** + * Get the specified GigEProperty. The GigEPropertyType field must + * be set in order for this function to succeed. + * + * @param context The fc2Context to be used. + * @param pGigEProp The GigE property to get. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEProperty( + fc2Context context, + fc2GigEProperty pGigEProp ); + + /** + * Set the specified GigEProperty. The GigEPropertyType field must + * be set in order for this function to succeed. + * + * @param context The fc2Context to be used. + * @param pGigEProp The GigE property to set. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetGigEProperty( + fc2Context context, + @Const fc2GigEProperty pGigEProp ); + + /** + * Discover the largest packet size that works for the network link + * between the PC and the camera. This is useful in cases where + * there may be multiple links between the PC and the camera and + * there is a possibility of a component not supporting the + * recommended jumbo frame packet size of 9000. + * + * @param context The fc2Context to be used. + * @param packetSize The maximum packet size supported by the link. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DiscoverGigEPacketSize( + fc2Context context, + @Cast("unsigned int*") IntPointer packetSize ); + public static native @Cast("fc2Error") int fc2DiscoverGigEPacketSize( + fc2Context context, + @Cast("unsigned int*") IntBuffer packetSize ); + public static native @Cast("fc2Error") int fc2DiscoverGigEPacketSize( + fc2Context context, + @Cast("unsigned int*") int[] packetSize ); + /*@}*/ + + /** + * \defgroup CGEVImageSettings GigE image settings + * + * \brief These functions deal with GigE image setting. + */ + /*@{*/ + + /** + * Check if the particular imaging mode is supported by the camera. + * + * @param context The fc2Context to be used. + * @param mode The mode to check. + * @param isSupported Whether the mode is supported. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2QueryGigEImagingMode( + fc2Context context, + @Cast("fc2Mode") int mode, + @Cast("BOOL*") IntPointer isSupported ); + public static native @Cast("fc2Error") int fc2QueryGigEImagingMode( + fc2Context context, + @Cast("fc2Mode") int mode, + @Cast("BOOL*") IntBuffer isSupported ); + public static native @Cast("fc2Error") int fc2QueryGigEImagingMode( + fc2Context context, + @Cast("fc2Mode") int mode, + @Cast("BOOL*") int[] isSupported ); + + /** + * Get the current imaging mode on the camera. + * + * @param context The fc2Context to be used. + * @param mode Current imaging mode on the camera. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEImagingMode( + fc2Context context, + @Cast("fc2Mode*") IntPointer mode ); + public static native @Cast("fc2Error") int fc2GetGigEImagingMode( + fc2Context context, + @Cast("fc2Mode*") IntBuffer mode ); + public static native @Cast("fc2Error") int fc2GetGigEImagingMode( + fc2Context context, + @Cast("fc2Mode*") int[] mode ); + + /** + * Set the current imaging mode to the camera. This should only be + * done when the camera is not streaming images. + * + * @param context The fc2Context to be used. + * @param mode Imaging mode to set to the camera. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetGigEImagingMode( + fc2Context context, + @Cast("fc2Mode") int mode ); + + /** + * Get information about the image settings possible on the camera. + * + * @param context The fc2Context to be used. + * @param pInfo Image settings information. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEImageSettingsInfo( + fc2Context context, + fc2GigEImageSettingsInfo pInfo ); + + /** + * Get the current image settings on the camera. + * + * @param context The fc2Context to be used. + * @param pImageSettings Current image settings on camera. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEImageSettings( + fc2Context context, + fc2GigEImageSettings pImageSettings ); + + /** + * Set the image settings specified to the camera. + * + * @param context The fc2Context to be used. + * @param pImageSettings Image settings to set to camera. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetGigEImageSettings( + fc2Context context, + @Const fc2GigEImageSettings pImageSettings ); + /*@}*/ + + /** + * \defgroup CGEVImageBinningSettings GigE image binning settings + * + * \brief These functions deal with GigE image binning settings. + */ + /*@{*/ + + /** + * Get the current binning settings on the camera. + * + * @param context The fc2Context to be used. + * @param horzBinnningValue Current horizontal binning value. + * @param vertBinnningValue Current vertical binning value. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEImageBinningSettings( + fc2Context context, + @Cast("unsigned int*") IntPointer horzBinnningValue, + @Cast("unsigned int*") IntPointer vertBinnningValue ); + public static native @Cast("fc2Error") int fc2GetGigEImageBinningSettings( + fc2Context context, + @Cast("unsigned int*") IntBuffer horzBinnningValue, + @Cast("unsigned int*") IntBuffer vertBinnningValue ); + public static native @Cast("fc2Error") int fc2GetGigEImageBinningSettings( + fc2Context context, + @Cast("unsigned int*") int[] horzBinnningValue, + @Cast("unsigned int*") int[] vertBinnningValue ); + + /** + * Set the specified binning values to the camera. It is recommended + * that GetGigEImageSettingsInfo() be called after this function + * succeeds to retrieve the new image settings information for + * the new binning mode. + * + * @param context The fc2Context to be used. + * @param horzBinnningValue Horizontal binning value. + * @param vertBinnningValue Vertical binning value. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetGigEImageBinningSettings( + fc2Context context, + @Cast("unsigned int") int horzBinnningValue, + @Cast("unsigned int") int vertBinnningValue ); + /*@}*/ + + /** + * \defgroup CGEVImageStreamConfig GigE image stream configuration + * + * \brief These functions deal with GigE image stream configuration. + */ + /*@{*/ + + /** + * Get the number of stream channels present on the camera. + * + * @param context The fc2Context to be used. + * @param numChannels Number of stream channels present. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetNumStreamChannels( + fc2Context context, + @Cast("unsigned int*") IntPointer numChannels ); + public static native @Cast("fc2Error") int fc2GetNumStreamChannels( + fc2Context context, + @Cast("unsigned int*") IntBuffer numChannels ); + public static native @Cast("fc2Error") int fc2GetNumStreamChannels( + fc2Context context, + @Cast("unsigned int*") int[] numChannels ); + + /** + * Get the stream channel information for the specified channel. + * + * @param context The fc2Context to be used. + * @param channel Channel number to use. + * @param pChannel Stream channel information for the specified channel. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEStreamChannelInfo( + fc2Context context, + @Cast("unsigned int") int channel, + fc2GigEStreamChannel pChannel ); + + /** + * Set the stream channel information for the specified channel. + * + * Note that the source UDP port of the stream channel is read-only. + * + * @param context The fc2Context to be used. + * @param channel Channel number to use. + * @param pChannel Stream channel information to use for the specified channel. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetGigEStreamChannelInfo( + fc2Context context, + @Cast("unsigned int") int channel, + fc2GigEStreamChannel pChannel ); + + /** + * Get the current gige config on the camera. + * + * @param context The fc2Context to be used. + * @param pGigEConfig Current configuration on camera. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetGigEConfig( + fc2Context context, + fc2GigEConfig pConfig ); + + /** + * Set the gige config specified to the camera. + * + * @param context The fc2Context to be used. + * @param pGigEConfig configuration to set to camera. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetGigEConfig( + fc2Context context, + @Const fc2GigEConfig pConfig ); + /*@}*/ + + /** + * \defgroup CImage Image Operation + * + * \brief The Image operations are used to retrieve images from a camera, + * convert between multiple pixel formats and save images to disk. + * Operations on images are not guaranteed to be thread safe. It is + * recommended that operations on images be protected by thread + * synchronization constructs such as mutexes. + */ + /*@{*/ + + /** + * Set the default color processing algorithm. This method will be + * used for any image with the DEFAULT algorithm set. The method used + * is determined at the time of the Convert() call, therefore the most + * recent execution of this function will take precedence. The default + * setting is shared within the current process. + * + * @param defaultMethod The color processing algorithm to set. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetDefaultColorProcessing( + @Cast("fc2ColorProcessingAlgorithm") int defaultMethod ); + + /** + * Get the default color processing algorithm. + * + * @param pDefaultMethod The default color processing algorithm. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetDefaultColorProcessing( + @Cast("fc2ColorProcessingAlgorithm*") IntPointer pDefaultMethod ); + public static native @Cast("fc2Error") int fc2GetDefaultColorProcessing( + @Cast("fc2ColorProcessingAlgorithm*") IntBuffer pDefaultMethod ); + public static native @Cast("fc2Error") int fc2GetDefaultColorProcessing( + @Cast("fc2ColorProcessingAlgorithm*") int[] pDefaultMethod ); + + /** + * Set the default output pixel format. This format will be used for any + * call to Convert() that does not specify an output format. The format + * used will be determined at the time of the Convert() call, therefore + * the most recent execution of this function will take precedence. + * The default is shared within the current process. + * + * @param format The output pixel format to set. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetDefaultOutputFormat( + @Cast("fc2PixelFormat") int format ); + + /** + * Get the default output pixel format. + * + * @param pFormat The default pixel format. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetDefaultOutputFormat( + @Cast("fc2PixelFormat*") IntPointer pFormat ); + public static native @Cast("fc2Error") int fc2GetDefaultOutputFormat( + @Cast("fc2PixelFormat*") IntBuffer pFormat ); + public static native @Cast("fc2Error") int fc2GetDefaultOutputFormat( + @Cast("fc2PixelFormat*") int[] pFormat ); + + /** + * Calculate the bits per pixel for the specified pixel format. + * + * @param format The pixel format. + * @param pBitsPerPixel The bits per pixel. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DetermineBitsPerPixel( + @Cast("fc2PixelFormat") int format, + @Cast("unsigned int*") IntPointer pBitsPerPixel ); + public static native @Cast("fc2Error") int fc2DetermineBitsPerPixel( + @Cast("fc2PixelFormat") int format, + @Cast("unsigned int*") IntBuffer pBitsPerPixel ); + public static native @Cast("fc2Error") int fc2DetermineBitsPerPixel( + @Cast("fc2PixelFormat") int format, + @Cast("unsigned int*") int[] pBitsPerPixel ); + + /** + * Create a fc2Image. If externally allocated memory is to be used for the + * converted image, simply assigning the pData member of the fc2Image structure + * is insufficient. fc2SetImageData() should be called in order to populate + * the fc2Image structure correctly. + * + * @see fc2SetImageData() + * + * @param pImage Pointer to image to be created. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2CreateImage( + fc2Image pImage ); + + /** + * Destroy the fc2Image. + * + * @param image Pointer to image to be destroyed. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DestroyImage( + fc2Image image ); + + /** + * Sets the dimensions of the image object. + * + * @param pImage The fc2Image to be used. + * @param rows Number of rows to set. + * @param cols Number of cols to set. + * @param stride Stride to set. + * @param pixelFormat Pixel format to set. + * @param bayerFormat Bayer tile format to set. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetImageDimensions( + fc2Image pImage, + @Cast("unsigned int") int rows, + @Cast("unsigned int") int cols, + @Cast("unsigned int") int stride, + @Cast("fc2PixelFormat") int pixelFormat, + @Cast("fc2BayerTileFormat") int bayerFormat); + + /** + * Get the image dimensions associated with the image object. + * + * @param pImage The fc2Image to be used. + * @param pRows Number of rows. + * @param pCols Number of columns. + * @param pStride The stride. + * @param pPixelFormat Pixel format. + * @param pBayerFormat Bayer tile format. + */ + public static native @Cast("fc2Error") int fc2GetImageDimensions( + fc2Image pImage, + @Cast("unsigned int*") IntPointer pRows, + @Cast("unsigned int*") IntPointer pCols, + @Cast("unsigned int*") IntPointer pStride, + @Cast("fc2PixelFormat*") IntPointer pPixelFormat, + @Cast("fc2BayerTileFormat*") IntPointer pBayerFormat); + public static native @Cast("fc2Error") int fc2GetImageDimensions( + fc2Image pImage, + @Cast("unsigned int*") IntBuffer pRows, + @Cast("unsigned int*") IntBuffer pCols, + @Cast("unsigned int*") IntBuffer pStride, + @Cast("fc2PixelFormat*") IntBuffer pPixelFormat, + @Cast("fc2BayerTileFormat*") IntBuffer pBayerFormat); + public static native @Cast("fc2Error") int fc2GetImageDimensions( + fc2Image pImage, + @Cast("unsigned int*") int[] pRows, + @Cast("unsigned int*") int[] pCols, + @Cast("unsigned int*") int[] pStride, + @Cast("fc2PixelFormat*") int[] pPixelFormat, + @Cast("fc2BayerTileFormat*") int[] pBayerFormat); + + /** + * Set the color processing algorithm. This should be set on the + * input image object. + * + * @param pImage The fc2Image to be used. + * @param colorProc The color processing algorithm to use. + * + * @see fc2GetColorProcessing() + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetImageColorProcessing( + fc2Image pImage, + @Cast("fc2ColorProcessingAlgorithm") int colorProc); + + /** + * Get the current color processing algorithm. + * + * @param pImage The fc2Image to be used. + * + * @see fc2SetColorProcessing() + * + * @return The current color processing algorithm. + */ + public static native @Cast("fc2Error") int fc2GetImageColorProcessing( + fc2Image pImage, + @Cast("fc2ColorProcessingAlgorithm*") IntPointer pColorProc); + public static native @Cast("fc2Error") int fc2GetImageColorProcessing( + fc2Image pImage, + @Cast("fc2ColorProcessingAlgorithm*") IntBuffer pColorProc); + public static native @Cast("fc2Error") int fc2GetImageColorProcessing( + fc2Image pImage, + @Cast("fc2ColorProcessingAlgorithm*") int[] pColorProc); + + /** + * Set the data of the Image object. + * Ownership of the image buffer is not transferred to the Image object. + * It is the user's responsibility to delete the buffer when it is + * no longer in use. + * + * @param pImage The fc2Image to be used. + * @param pData Pointer to the image buffer. + * @param dataSize Size of the image buffer. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetImageData( + fc2Image pImage, + @Cast("const unsigned char*") BytePointer pData, + @Cast("unsigned int") int dataSize); + public static native @Cast("fc2Error") int fc2SetImageData( + fc2Image pImage, + @Cast("const unsigned char*") ByteBuffer pData, + @Cast("unsigned int") int dataSize); + public static native @Cast("fc2Error") int fc2SetImageData( + fc2Image pImage, + @Cast("const unsigned char*") byte[] pData, + @Cast("unsigned int") int dataSize); + + /** + * Get a pointer to the data associated with the image. This function + * is considered unsafe. The pointer returned could be invalidated if + * the buffer is resized or released. The pointer may also be + * invalidated if the Image object is passed to fc2RetrieveBuffer(). + * + * @param pImage The fc2Image to be used. + * @param ppData A pointer to the image data. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetImageData( + fc2Image pImage, + @Cast("unsigned char**") PointerPointer ppData); + public static native @Cast("fc2Error") int fc2GetImageData( + fc2Image pImage, + @Cast("unsigned char**") @ByPtrPtr BytePointer ppData); + public static native @Cast("fc2Error") int fc2GetImageData( + fc2Image pImage, + @Cast("unsigned char**") @ByPtrPtr ByteBuffer ppData); + public static native @Cast("fc2Error") int fc2GetImageData( + fc2Image pImage, + @Cast("unsigned char**") @ByPtrPtr byte[] ppData); + + /** + * Get the metadata associated with the image. This includes + * embedded image information. + * + * @param pImage The fc2Image to be used. + * + * @return Metadata associated with the image. + */ + public static native @Cast("fc2Error") int fc2GetImageMetadata( + fc2Image pImage, + fc2ImageMetadata pImageMetaData); + + /** + * Get the timestamp data associated with the image. + * + * @param pImage The fc2Image to be used. + * + * @return Timestamp data associated with the image. + */ + public static native @ByVal fc2TimeStamp fc2GetImageTimeStamp( + fc2Image pImage); + + /** + * Save the image to the specified file name with the file format + * specified. + * + * @param pImage The fc2Image to be used. + * @param pFilename Filename to save image with. + * @param format File format to save in. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SaveImage( + fc2Image pImage, + @Cast("const char*") BytePointer pFilename, + @Cast("fc2ImageFileFormat") int format ); + public static native @Cast("fc2Error") int fc2SaveImage( + fc2Image pImage, + String pFilename, + @Cast("fc2ImageFileFormat") int format ); + + /** + * Save the image to the specified file name with the file format + * specified. + * + * @param pImage The fc2Image to be used. + * @param pFilename Filename to save image with. + * @param format File format to save in. + * @param pOption Options for saving image. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SaveImageWithOption( + fc2Image pImage, + @Cast("const char*") BytePointer pFilename, + @Cast("fc2ImageFileFormat") int format, + Pointer pOption ); + public static native @Cast("fc2Error") int fc2SaveImageWithOption( + fc2Image pImage, + String pFilename, + @Cast("fc2ImageFileFormat") int format, + Pointer pOption ); + + /** + * + * + * @param pImageIn + * @param pImageOut + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ConvertImage( + fc2Image pImageIn, + fc2Image pImageOut ); + + /** + * Converts the current image buffer to the specified output format and + * stores the result in the specified image. The destination image + * does not need to be configured in any way before the call is made. + * + * @param format Output format of the converted image. + * @param pImageIn Input image. + * @param pImageOut Output image. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ConvertImageTo( + @Cast("fc2PixelFormat") int format, + fc2Image pImageIn, + fc2Image pImageOut ); + + /** + * Calculate statistics associated with the image. In order to collect + * statistics for a particular channel, the enabled flag for the + * channel must be set to true. Statistics can only be collected for + * images in Mono8, Mono16, RGB, RGBU, BGR and BGRU. + * + * @param pImage The fc2Image to be used. + * @param pImageStatisticsContext The fc2ImageStatisticsContext to hold the + * statistics. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2CalculateImageStatistics( + fc2Image pImage, + @ByPtrPtr fc2ImageStatisticsContext pImageStatisticsContext ); + /*@}*/ + + /** + * \defgroup CImageStatistics Image Statistics Operation + * + * \brief The Image Statistics operation provides the functionality for the user to collect + * image channel statistics. + */ + /*@{*/ + + /** + * Create a statistics context. + * + * @param pImageStatisticsContext A statistics context. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2CreateImageStatistics( + @ByPtrPtr fc2ImageStatisticsContext pImageStatisticsContext ); + + /** + * Destroy a statistics context. + * + * @param imageStatisticsContext A statistics context. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DestroyImageStatistics( + fc2ImageStatisticsContext imageStatisticsContext ); + + + /** + * Enable all channels. + * + * @param imageStatisticsContext A statistics context. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ImageStatisticsEnableAll( + fc2ImageStatisticsContext imageStatisticsContext ); + + /** + * Disable all channels. + * + * @param imageStatisticsContext A statistics context. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ImageStatisticsDisableAll( + fc2ImageStatisticsContext imageStatisticsContext ); + + /** + * Enable only the grey channel. + * + * @param imageStatisticsContext A statistics context. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ImageStatisticsEnableGreyOnly( + fc2ImageStatisticsContext imageStatisticsContext ); + + /** + * Enable only the RGB channels. + * + * @param imageStatisticsContext A statistics context. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ImageStatisticsEnableRGBOnly( + fc2ImageStatisticsContext imageStatisticsContext ); + + /** + * Enable only the HSL channels. + * + * @param imageStatisticsContext A statistics context. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2ImageStatisticsEnableHSLOnly( + fc2ImageStatisticsContext imageStatisticsContext ); + + /** + * Get the status of a statistics channel. + * + * @see fc2SetChannelStatus() + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param pEnabled Whether the channel is enabled. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetChannelStatus( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("BOOL*") IntPointer pEnabled ); + public static native @Cast("fc2Error") int fc2GetChannelStatus( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("BOOL*") IntBuffer pEnabled ); + public static native @Cast("fc2Error") int fc2GetChannelStatus( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("BOOL*") int[] pEnabled ); + + /** + * Set the status of a statistics channel. + * + * @see fc2GetChannelStatus() + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param enabled Whether the channel should be enabled. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2SetChannelStatus( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("BOOL") int enabled ); + + /** + * Get the range of a statistics channel. The values returned + * are the maximum possible values for any given pixel in the image. + * This is generally 0-255 for 8 bit images, and 0-65535 for + * 16 bit images. + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param pMin The minimum possible value. + * @param pMax The maximum possible value. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetChannelRange( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntPointer pMin, + @Cast("unsigned int*") IntPointer pMax ); + public static native @Cast("fc2Error") int fc2GetChannelRange( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntBuffer pMin, + @Cast("unsigned int*") IntBuffer pMax ); + public static native @Cast("fc2Error") int fc2GetChannelRange( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") int[] pMin, + @Cast("unsigned int*") int[] pMax ); + + /** + * Get the range of a statistics channel. The values returned + * are the maximum values recorded for all pixels in the image. + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param pPixelValueMin The minimum pixel value. + * @param pPixelValueMax The maximum pixel value. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetChannelPixelValueRange( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntPointer pPixelValueMin, + @Cast("unsigned int*") IntPointer pPixelValueMax ); + public static native @Cast("fc2Error") int fc2GetChannelPixelValueRange( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntBuffer pPixelValueMin, + @Cast("unsigned int*") IntBuffer pPixelValueMax ); + public static native @Cast("fc2Error") int fc2GetChannelPixelValueRange( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") int[] pPixelValueMin, + @Cast("unsigned int*") int[] pPixelValueMax ); + + /** + * Get the number of unique pixel values in the image. + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param pNumPixelValues The number of unique pixel values. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetChannelNumPixelValues( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntPointer pNumPixelValues ); + public static native @Cast("fc2Error") int fc2GetChannelNumPixelValues( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntBuffer pNumPixelValues ); + public static native @Cast("fc2Error") int fc2GetChannelNumPixelValues( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") int[] pNumPixelValues ); + + /** + * Get the mean of the image. + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param pPixelValueMean The mean of the image. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetChannelMean( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + FloatPointer pPixelValueMean ); + public static native @Cast("fc2Error") int fc2GetChannelMean( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + FloatBuffer pPixelValueMean ); + public static native @Cast("fc2Error") int fc2GetChannelMean( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + float[] pPixelValueMean ); + + /** + * Get the histogram for the image. + * + * @param imageStatisticsContext A statistics context. + * @param channel The statistics channel. + * @param ppHistogram Pointer to an array containing the histogram. + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetChannelHistogram( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("int**") PointerPointer ppHistogram ); + public static native @Cast("fc2Error") int fc2GetChannelHistogram( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @ByPtrPtr IntPointer ppHistogram ); + public static native @Cast("fc2Error") int fc2GetChannelHistogram( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @ByPtrPtr IntBuffer ppHistogram ); + public static native @Cast("fc2Error") int fc2GetChannelHistogram( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @ByPtrPtr int[] ppHistogram ); + + /** + * Get all statistics for the image. + * + * @param imageStatisticsContext The statistics context. + * @param channel The statistics channel. + * @param pRangeMin The minimum possible value. + * @param pRangeMax The maximum possible value. + * @param pPixelValueMin The minimum pixel value. + * @param pPixelValueMax The maximum pixel value. + * @param pNumPixelValues The number of unique pixel values. + * @param pPixelValueMean The mean of the image. + * @param ppHistogram Pointer to an array containing the histogram. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetImageStatistics( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntPointer pRangeMin, + @Cast("unsigned int*") IntPointer pRangeMax, + @Cast("unsigned int*") IntPointer pPixelValueMin, + @Cast("unsigned int*") IntPointer pPixelValueMax, + @Cast("unsigned int*") IntPointer pNumPixelValues, + FloatPointer pPixelValueMean, + @Cast("int**") PointerPointer ppHistogram ); + public static native @Cast("fc2Error") int fc2GetImageStatistics( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntPointer pRangeMin, + @Cast("unsigned int*") IntPointer pRangeMax, + @Cast("unsigned int*") IntPointer pPixelValueMin, + @Cast("unsigned int*") IntPointer pPixelValueMax, + @Cast("unsigned int*") IntPointer pNumPixelValues, + FloatPointer pPixelValueMean, + @ByPtrPtr IntPointer ppHistogram ); + public static native @Cast("fc2Error") int fc2GetImageStatistics( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") IntBuffer pRangeMin, + @Cast("unsigned int*") IntBuffer pRangeMax, + @Cast("unsigned int*") IntBuffer pPixelValueMin, + @Cast("unsigned int*") IntBuffer pPixelValueMax, + @Cast("unsigned int*") IntBuffer pNumPixelValues, + FloatBuffer pPixelValueMean, + @ByPtrPtr IntBuffer ppHistogram ); + public static native @Cast("fc2Error") int fc2GetImageStatistics( + fc2ImageStatisticsContext imageStatisticsContext, + @Cast("fc2StatisticsChannel") int channel, + @Cast("unsigned int*") int[] pRangeMin, + @Cast("unsigned int*") int[] pRangeMax, + @Cast("unsigned int*") int[] pPixelValueMin, + @Cast("unsigned int*") int[] pPixelValueMax, + @Cast("unsigned int*") int[] pNumPixelValues, + float[] pPixelValueMean, + @ByPtrPtr int[] ppHistogram ); + + /*@}*/ + + /** + * \defgroup CTopologyNode TopologyNode Operation + * + * \brief The TopologyNode operation provides the functionality for the user to + * generate a tree structure of all cameras and devices connected to a computer. + */ + /*@{*/ + + /** + * Create a TopologyNode context. + * + * @param pTopologyNodeContext A Topology Node context. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2CreateTopologyNode( + @ByPtrPtr fc2TopologyNodeContext pTopologyNodeContext ); + + /** + * Get the PGRGuid associated with the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param pGuid The unique identifier associated with the node. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetGuid( + fc2TopologyNodeContext TopologyNodeContext, + fc2PGRGuid pGuid); + + /** + * Get the device ID associated with the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param pID Device ID of the node. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetDeviceId( + fc2TopologyNodeContext TopologyNodeContext, + IntPointer pID); + public static native @Cast("fc2Error") int fc2TopologyNodeGetDeviceId( + fc2TopologyNodeContext TopologyNodeContext, + IntBuffer pID); + public static native @Cast("fc2Error") int fc2TopologyNodeGetDeviceId( + fc2TopologyNodeContext TopologyNodeContext, + int[] pID); + + /** + * Get the node type associated with the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param pNodeType Node type of the node. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetNodeType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2NodeType*") IntPointer pNodeType); + public static native @Cast("fc2Error") int fc2TopologyNodeGetNodeType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2NodeType*") IntBuffer pNodeType); + public static native @Cast("fc2Error") int fc2TopologyNodeGetNodeType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2NodeType*") int[] pNodeType); + + /** + * Get the interface type associated with the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param pInterfaceType Interface type of the node. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetInterfaceType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2InterfaceType*") IntPointer pInterfaceType); + public static native @Cast("fc2Error") int fc2TopologyNodeGetInterfaceType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2InterfaceType*") IntBuffer pInterfaceType); + public static native @Cast("fc2Error") int fc2TopologyNodeGetInterfaceType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2InterfaceType*") int[] pInterfaceType); + + /** + * Get the number of child nodes. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param pNumChildNodes Number of child nodes. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetNumChildren( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int*") IntPointer pNumChildNodes); + public static native @Cast("fc2Error") int fc2TopologyNodeGetNumChildren( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int*") IntBuffer pNumChildNodes); + public static native @Cast("fc2Error") int fc2TopologyNodeGetNumChildren( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int*") int[] pNumChildNodes); + + /** + * Get child node located at the specified position. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param position Position of the child node. + * @param pChildTopologyNodeContext The Topology Node context the contains + * information on the child topology + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetChild( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int") int position, + @ByPtrPtr fc2TopologyNodeContext pChildTopologyNodeContext); + + /** + * Add the specified TopologyNode as a child of the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param TopologyNodeChildContext The TopologyNode child context to add. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeAddChild( + fc2TopologyNodeContext TopologyNodeContext, + fc2TopologyNodeContext TopologyNodeChildContext); + + /** + * Get the number of ports. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param pNumPorts Number of ports. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetNumPorts( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int*") IntPointer pNumPorts); + public static native @Cast("fc2Error") int fc2TopologyNodeGetNumPorts( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int*") IntBuffer pNumPorts); + public static native @Cast("fc2Error") int fc2TopologyNodeGetNumPorts( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int*") int[] pNumPorts); + + /** + * Get type of port located at the specified position. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param position Position of the port. + * @param pPortType PortType at the specified position. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeGetPortType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int") int position, + @Cast("fc2PortType*") IntPointer pPortType); + public static native @Cast("fc2Error") int fc2TopologyNodeGetPortType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int") int position, + @Cast("fc2PortType*") IntBuffer pPortType); + public static native @Cast("fc2Error") int fc2TopologyNodeGetPortType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("unsigned int") int position, + @Cast("fc2PortType*") int[] pPortType); + + /** + * Add the specified PortType as a port of the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param portType childPort The port to add. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2TopologyNodeAddPortType( + fc2TopologyNodeContext TopologyNodeContext, + @Cast("fc2PortType") int portType); + + /** + * Assign a PGRGuid and device ID to the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param guid PGRGuid to be assigned. + * @param deviceId Device ID to be assigned. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("BOOL") int fc2TopologyNodeAssignGuidToNode( + fc2TopologyNodeContext TopologyNodeContext, + @ByVal fc2PGRGuid guid, + int deviceId); + + /** + * Assign a PGRGuid, device ID and nodeType to the node. + * + * @param TopologyNodeContext The Topology Node context to use. + * @param guid PGRGuid to be assigned. + * @param deviceId Device ID to be assigned. + * @param nodeType NodeType to be assigned + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("BOOL") int fc2TopologyNodeAssignGuidToNodeEx( + fc2TopologyNodeContext TopologyNodeContext, + @ByVal fc2PGRGuid guid, + int deviceId, + @Cast("fc2NodeType") int nodeType); + + /** + * Destroy a TopologyNode context. + * + * @param TopologyNodeContext A Topology Node context. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2DestroyTopologyNode( + fc2TopologyNodeContext TopologyNodeContext ); + + /*@}*/ + + /** + * \defgroup CUtilities Utilities + * + * \brief The utility operations are used to query for general system + * information such as operating system, available memory etc. + * It can also be used to launch browsers, CHM viewers or terminal commands. + */ + /*@{*/ + + /** + * Check for driver compatibility for the given camera guid. + * + * @param pGuid The PGRGuid of the device to check. + * + * @return FC2_ERROR_OK if the library is compatible with the currently + * loaded driver, otherwise an error indicating the type of failure. + */ + public static native @Cast("fc2Error") int fc2CheckDriver( @Const fc2PGRGuid pGuid); + + /** + * Get the driver's name for a device + * + * @param pGuid The PGRGuid of the device to check. + * @param pDeviceName The device name will be returned in this string + * @param pDeviceNameLength The length of the device name string returned + * + * @return An Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetDriverDeviceName( + @Const fc2PGRGuid pGuid, + @Cast("char*") BytePointer pDeviceName, + @Cast("size_t*") SizeTPointer deviceNameLength); + public static native @Cast("fc2Error") int fc2GetDriverDeviceName( + @Const fc2PGRGuid pGuid, + @Cast("char*") ByteBuffer pDeviceName, + @Cast("size_t*") SizeTPointer deviceNameLength); + public static native @Cast("fc2Error") int fc2GetDriverDeviceName( + @Const fc2PGRGuid pGuid, + @Cast("char*") byte[] pDeviceName, + @Cast("size_t*") SizeTPointer deviceNameLength); + + /** + * Get system information. + * + * @param pSystemInfo Structure to receive system information. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetSystemInfo( fc2SystemInfo pSystemInfo); + + /** + * Get library version. + * + * @param pVersion Structure to receive the library version. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2GetLibraryVersion( fc2Version pVersion); + + /** + * Launch a URL in the system default browser. + * + * @param pAddress URL to open in browser. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2LaunchBrowser( @Cast("const char*") BytePointer pAddress); + public static native @Cast("fc2Error") int fc2LaunchBrowser( String pAddress); + + /** + * Open a CHM file in the system default CHM viewer. + * + * @param pFileName Filename of CHM file to open. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2LaunchHelp( @Cast("const char*") BytePointer pFileName); + public static native @Cast("fc2Error") int fc2LaunchHelp( String pFileName); + + /** + * Execute a command in the terminal. This is a blocking call that + * will return when the command completes. + * + * @param pCommand Command to execute. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2LaunchCommand( @Cast("const char*") BytePointer pCommand); + public static native @Cast("fc2Error") int fc2LaunchCommand( String pCommand); + + /** + * Execute a command in the terminal. This is a non-blocking call that + * will return immediately. The return value of the command can be + * retrieved in the callback. + * + * @param pCommand Command to execute. + * @param pCallback Callback to fire when command is complete. + * @param pUserData Data pointer to pass to callback. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("fc2Error") int fc2LaunchCommandAsync( + @Cast("const char*") BytePointer pCommand, + fc2AsyncCommandCallback pCallback, + Pointer pUserData ); + public static native @Cast("fc2Error") int fc2LaunchCommandAsync( + String pCommand, + fc2AsyncCommandCallback pCallback, + Pointer pUserData ); + + /** + * Get a string representation of an error. + * + * @param error Error to be parsed. + * + * @return A fc2Error indicating the success or failure of the function. + */ + public static native @Cast("const char*") BytePointer fc2ErrorToDescription( + @Cast("fc2Error") int error); + + /*@}*/ // #ifdef __cplusplus // #endif -// #endif // PGR_FC2_FLYCAPTURE2_C_H +// #endif // FLIR_FLYCAPTURE2_C_H // Parsed from MultiSyncLibraryDefs_C.h diff --git a/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2.java b/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2.java index 469c1560606..b1e9e8fc641 100644 --- a/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2.java +++ b/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2.java @@ -41,16 +41,24 @@ * @author Jarek Sacha */ @Properties(target = "org.bytedeco.javacpp.FlyCapture2", value = { - @Platform(value = {"linux-x86", "linux-arm", "windows"}, include = {"", "", + @Platform(value = {"linux-x86", "linux-arm", "windows"}, + include = {"", "", "", "", "", "", "", "", - "", "", "", "", + "", "", "", + "", "", "", "", ""}, - link = {"flycapture@.2", "multisync@.2"}, includepath = "/usr/include/flycapture/"), - @Platform(value = "linux-arm", include = {"", "", + link = {"flycapture@.2", "multisync@.2", "flycapturevideo@.2"}, + includepath = "/usr/include/flycapture/"), + @Platform(value = "linux-arm", + include = {"", "", "", "", "", "", "", "", - "", "", "", ""}, link = "flycapture@.2"), - @Platform(value = "windows", link = {"FlyCapture2", "MultiSyncLibrary"}, - includepath = "C:/Program Files/Point Grey Research/FlyCapture2/include/"), + "", "", "", + "", ""}, + link = {"flycapture@.2", "flycapturevideo-c@.2"}), + @Platform(value = "windows", + link = {"FlyCapture2_v100", "MultiSyncLibrary_v100", "FlyCapture2Video_v100"}, + includepath = {"C:/Program Files/Point Grey Research/FlyCapture2/include/", + "C:/Program Files (x86)/Point Grey Research/FlyCapture2/include/"}), @Platform(value = "windows-x86", linkpath = {"C:/Program Files/Point Grey Research/FlyCapture2/lib/", "C:/Program Files (x86)/Point Grey Research/FlyCapture2/lib/"}, diff --git a/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2_C.java b/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2_C.java index 3edb0cc16c2..3bec914690c 100644 --- a/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2_C.java +++ b/flycapture/src/main/java/org/bytedeco/javacpp/presets/FlyCapture2_C.java @@ -44,11 +44,16 @@ @Platform(value = {"linux-x86", "linux-arm", "windows"}, include = {"", "", "MultiSyncLibraryDefs_C.h", "MultiSyncLibrary_C.h"}, - link = {"flycapture-c@.2", "multisync-c@.2"}, includepath = "/usr/include/flycapture/C/"), - @Platform(value = "linux-arm", include = {"", ""}, link = "flycapture-c@.2"), - @Platform(value = "windows", link = {"FlyCapture2_C", "MultiSyncLibrary_C"}, + link = {"flycapture-c@.2", "multisync-c@.2", "flycapturevideo-c@.2"}, + includepath = "/usr/include/flycapture/C/"), + @Platform(value = "linux-arm", + include = {"", ""}, + link = {"flycapture-c@.2", "flycapturevideo-c@.2"}), + @Platform(value = "windows", + link = {"FlyCapture2_C_v100", "MultiSyncLibrary_C_v100", "FlyCapture2Video_C_v100"}, preload = {"libiomp5md", "FlyCapture2"}, - includepath = "C:/Program Files/Point Grey Research/FlyCapture2/include/C/"), + includepath = {"C:/Program Files/Point Grey Research/FlyCapture2/include/C/", + "C:/Program Files (x86)/Point Grey Research/FlyCapture2/include/C/"}), @Platform(value = "windows-x86", linkpath = {"C:/Program Files/Point Grey Research/FlyCapture2/lib/C/", "C:/Program Files (x86)/Point Grey Research/FlyCapture2/lib/C/"}, diff --git a/platform/pom.xml b/platform/pom.xml index 430f8441ef0..85f35bf2795 100644 --- a/platform/pom.xml +++ b/platform/pom.xml @@ -72,7 +72,7 @@ org.bytedeco.javacpp-presets flycapture-platform - 2.11.3.121-${project.version} + 2.13.3.31-${project.version} org.bytedeco.javacpp-presets