====================================== ADAravis ====================================== :author: Mark Rivers, University of Chicago .. contents:: Contents .. _GenICam: https://www.emva.org/standards-technology/genicam .. _aravis: https://github.com/AravisProject/aravis .. _ADGenICam: https://github.com/areaDetector/ADGenICam .. _ADAravis: https://github.com/areaDetector/ADAravis .. _aravisGigE: https://github.com/areaDetector/aravisGigE .. _ADSpinnaker: https://github.com/areaDetector/ADSpinnaker .. _ADVimba: https://github.com/areaDetector/ADVimba .. _ADSupport: https://github.com/areaDetector/ADSupport .. _ADAravis class: ../areaDetectorDoxygenHTML/class_a_d_aravis.html Overview -------- This is an :doc:`../index` driver for GenICam_ cameras using the aravis_ library. GenICam_ is a Generic Interface for Cameras from the European Machine Vision Association (EMVA). ADAravis is derived from the base class ADGenICam_, which handles many of the details of mapping GenICam_ features to EPICS records. `ADAravis class`_ describes this class in detail. ADAravis_ is based heavily on the older aravisGigE_ driver which has been part of areaDetector for many years. ADAravis_ differs from aravisGigE_ by using the ADGenICam_ base class to significantly reduce the amount of code. Many of the ideas in ADGenICam_ were borrowed from aravisGigE_. As it name implies, ADAravis_ uses the aravis_ library. It runs on most Linux systems, and can control any GenICam_ camera. It cannot be used on Windows because aravis_ because aravis does not support it. The aravis_ package must be built before building ADAravis. Instructions for doing this can be found in the :ref:`ADGenICam installing aravis ` documentation. Prior to using ADAravis with a specific camera model, the XML file must be read from the camera using the arv-tool utility, and the EPICS database file and OPI screens must be generated by running the Python programs in :ref:`ADGenICam Python scripts `. ADAravis driver --------------- ADGenICam inherits from :doc:`../ADGenICam/ADGenICam`. It adds the following parameters and EPICS records that are specific to ADAravis. .. cssclass:: table-bordered table-striped table-hover .. list-table:: :header-rows: 1 :widths: auto * - EPICS record names - Record types - drvInfo string - Description * - ARFramesCompleted - ai - ARAVIS_COMPLETED - Number of frames successfully read * - ARFramesFailures - ai - ARAVIS_FAILURES - Number failures reading frames * - ARFrameUnderruns - ai - ARAVIS_UNDERRUNS - Number of frames underruns, which are frames that are too small * - ARMissingPackets - longin - ARAVIS_MISSING_PKTS - Number of missing packets * - ARResentPackets - longin - ARAVIS_RESENT_PKTS - Number of resent packets * - ARPacketResendEnable - mbbo - ARAVIS_PKT_RESENT - Enable resending packets. Choices are [0:"Never", 1:"Always"] * - ARPacketTimeout - longout - ARAVIS_PKT_TIMEOUT - Delay in us before packet resend request * - ARFrameRetention - longout - ARAVIS_FRAME_RETENTION - Frame timeout in us after last packet * - ARResetCamera - longout - ARAVIS_RESET - Resets the camera * - ARConnectCamera - longout - ARAVIS_CONNECTION - Connects to the camera * - ARCheckConnection - calcout - N.A. - Connects to the camera when available * - ARConvertPixelFormat, ARConvertPixelFormat_RBV - mbbo/mbbi - ARAVIS_CONVERT_PIXEL_FORMAT - Controls how Mono12Packed and Mono12p pixel formats are decompressed. Choices are [0:"Mono16Low", 1:Mono16High"]. Mono16Low means that the data is not left-shifted by 4 bits, so bits 12-15 are 0. Mono16High means that the data is left-shifted by 4 bits, so bits 0-3 are 0. * - ARShiftDir, ARShiftDir_RBV - mbbo/mbbi - ARAVIS_SHIFT_DIR - Controls how UInt16 data are shifted. Choices are [0:"None", 1:"Left", 2:"Right"]. The number of bits to shift is controlled by the ARShiftBits record. * - ARShiftBits, ARShiftBits_RBV - mbbo/mbbi - ARAVIS_SHIFT_BITS - Controls how many bits UInt16 data are shifted left or right. Choices are 1-8. The direction to shift is controlled by the ARShiftDir record. IOC startup script ------------------ The command to configure an ADAravis camera in the startup script is:: aravisConfig(const char *portName, const char *cameraName, size_t maxMemory, int priority, int stackSize) ``portName`` is the name for the ADAravis port driver ``cameraName`` is the identifier for the camera. It can be the complete camera name returned by arv-tool, for example ``"Point Grey Research-Blackfly S BFS-PGE-50S5C-18585624"``, or it can be an IP address for GigE and 10 GigE cameras, for example ``"164.54.160.117"``. ``maxMemory`` is the maximum amount of memory the NDArrayPool is allowed to allocate. 0 means unlimited. ``priority`` is the priority of the port thread. 0 means medium priority. ``stackSize`` is the stack size. 0 means medium size. MEDM screens ------------ The following is the MEDM screen ADAravis.adl when controlling a FLIR Oryx 51S5M 10 Gbit Ethernet camera. ADAravis.adl is very similar to ADGenICam.adl, with a few additional widgets for the PVs that are specific to ADAravis. Note that each frame is 4.8 MB, and it is collecting 162 frames/s, which is 775 MB/s. .. figure:: ADAravis.png :align: center The following is the MEDM screen FLIR_ORX_10g_51S5M-features1.adl when controlling a FLIR Oryx 51S5M 10 Gbit Ethernet camera. This screen was autogenerated by the Python script in :doc:`../ADGenICam/ADGenICam`, and is specific to this camera model. It is loaded from the "Camera-specific features" related display widget in the above screen. .. figure:: ADAravis_features1.png :align: center The following is the second feature screen generated by the Python program described above. .. figure:: ADAravis_features2.png :align: center