Into

Modules

Documentation

classPiiMultiCamDriver

#include <PiiMultiCamDriver.h>

An implementation of the PiiCameraDriver interface for EureSys grabber boards.

Inherits PiiCameraDriver

Description

Uses the MultiCam camera driver.

Changing the properties of the camera driver does not affect the camera itself. The configuration to the camera must be set with camera-specific tools such as a CameraLink terminal program. The configuration of the camera must match the values set to the driver.

Properties

int

The index of the selected board.

int

The number of bytes to reserve for a frame buffer.

MultiCam configuration name for the selected camera.

The camera link mode.

Camera model name.

The name of the acquisition channel.

Defines the serial protocol.

double

Triggering rate.

The source of trigger signals.

Public types

enum
{ Base1T8 = 1, Base1T10, Base1T12, Base1T14, Base1T16, Base1T24, Base2T8, Base2T10, Base2T12, Base3T8, Base1T30B2, Base1T36B2, Base1T42B2, Base1T48B2, Base2T14B2, Base2T16B2, Base2T24B2, Base3T10B2, Base3T12B2, Base3T14B2, Base3T16B2, Base4T8B2, Base4T10B2, Base4T12B2, Base1T24B3, Base1T30B3, Base1T36B3, Base1T42B3, Base1T48B3, Medium1T30, Medium1T36, Medium1T42, Medium1T48, Medium2T14, Medium2T16, Medium2T24, Medium3T10, Medium3T12, Medium3T14, Medium3T16, Medium4T8, Medium4T10, Medium4T12, Medium8T8B2, Full8T8 }

Valid Camera Link operation modes.

enum
{ NoTrigger, InternalClockTrigger, ExternalTrigger, EncoderTrigger }

The source of trigger signals.

Constructors and destructor

Construct a new PiiMultiCamDriver.

Destroy the PiiMultiCamDriver.

Public member functions

int
( )
int
virtual bool
( )

Closes an initialized driver.

(
  • const char *
)

Implements the corresponding function of the base class.

virtual void *
(
  • int frameIndex = 0
)

Returns a pointer to the beginning of a frame buffer.

void
(
  • int firstFrameIndex
  • int cnt
  • void ** scanLines
)
virtual QSize

Returns frame size.

void
virtual bool

Returns true if frames are currently being captured and false otherwise.

virtual bool
( )

Returns true if the driver is open and false otherwise.

bool
( )

Select the camera unit.

void
(
  • int board
)
void
(
  • int bufferMemory
)
void
( )
void
void
( )
void
( )
bool
(
  • const char * name
  • const QVariant & value
)

Implements the corresponding function of the base class.

void
( )
void
(
  • int signalInterval
)
void
(
  • double triggerRate
)
void
( )
int
virtual bool
(
  • int frames
)

Starts capturing frames.

virtual bool

Stops capturing frames.

double

Property details

  • int board

    [read, write]

    The index of the selected board.

    The board index varies from 0 to N-1, where N is the number of frame grabber boards in the system.

  • int bufferMemory

    [read, write]

    The number of bytes to reserve for a frame buffer.

    Independent of this setting the driver will reserve space for at least signalInterval frames. The default size is 1MB.

  • QString cameraConfig

    [read, write]

    MultiCam configuration name for the selected camera.

    The configuration name is composed of the following parts:

    • [Scan][Rate][CamMode][SyncMode]{_[Suffix]} for analog area-scan cameras

    • [Scan][Rate][CamMode][ExpMode] for digital area-scan cameras

    • [Scan][Size][CamMode][ExpMode] for line-scan cameras

    Scan is either L for line scan, P for proggressive scan, or I for interlaced scan. Size is the line length in pixels, Rate is the scanning rate (fps). CamMode is of the following:
    • S - The line rate is synchronously generated inside the camera (free run)

    • R - The line rate is externally controlled through a line-reset pulse (triggered)

    ExpMode is one of the following:
    • C - The line exposure duration is controlled by the camera

    • G - The line exposure duration is controlled by the frame grabber

    • P - Permanent exposure, i.e. no exposure control

  • CameraLinkMode cameraLinkMode

    [read, write]

    The camera link mode.

    Used to select the way the camera link bus operates. The mode must be selected before driver is initialized.

  • QString cameraModel

    [read, write]

    Camera model name.

    The name must be supported by MultiCam (refer to MultiCam documentation). Use "AVIIVA4010" for Atmel Aviiva 4010.

  • QString channel

    [read, write]

    The name of the acquisition channel.

    Valid names depend on the type of the selected board. For example, use A, B, or M (medium mode, uses both A and B) for the Expert 2 board.

  • QString serialProtocol

    [read, write]

    Defines the serial protocol.

    The implementation for the serial protocol must exist in camera plugin-in. For Aviiva cameras the protocol name is the complete camera model name without the last for digits. For example for the cameras AVIIVA M2 CL 4010 and AVIIVA M2 CL 2014 the protocol name is "AviivaM2CL".

  • double triggerRate

    [read, write]

    Triggering rate.

    The interpretation of this value depends on triggerSource. It has no effect in NoTrigger and ExternalTrigger modes. In the InternalClockTrigger mode it determines the clock frequency, in Hz. In EncoderTrigger mode it is used as a conversion ratio from encoder pulses to trigger pulses. For example, setting triggerRate to 0.5 sends every second encoder pulse to the camera.

  • TriggerSource triggerSource

    [read, write]

    The source of trigger signals.

    The default value is NoTrigger.

Enumeration details

  • enum CameraLinkMode

    Valid Camera Link operation modes.

    The mode type starts with the standard configuration type (Base, Medium or Full) followed by the number of taps (channels), a "T", and finally the number of bits per tap. For example, a base mode camera with 1 acquisition channel (tap) and 8 bits per tap is denoted by Base1T8.

  • enum TriggerSource

    The source of trigger signals.

    • NoTrigger - the camera needs no external trigger. Sometimes referred to as a free-running mode. Frame duration may be controlled for example by exposure time.

    • InternalClockTrigger - the frame grabber card generates a regular pulse train using its internal clock circuit. The frequency of the trigger signal is controlled by the triggerRate property.

    • ExternalTrigger - trigger signals received from an external source are directly sent to the camera through the camera bus.

    • EncoderTrigger - the trigger signals are generated by a pulse encoder. The conversion ratio from encoder pulses to trigger pulses is controlled by the triggerRate property.

Function details

  • PiiMultiCamDriver

    ()

    Construct a new PiiMultiCamDriver.

  • ~PiiMultiCamDriver

    ()

    Destroy the PiiMultiCamDriver.

  • int board

    ()
  • int bufferMemory

    ()
  • QSize bufferSize

    ()
  • QString cameraConfig

    ()
  • CameraLinkMode cameraLinkMode

    ()
  • QString cameraModel

    ()
  • QString channel

    ()
  • virtual bool close

    ()
    [virtual]

    Closes an initialized driver.

    After close(), #initialize() must be called again before the driver is functional.

    Returns

    true on success, false otherwise

    Reimplemented from PiiCameraDriver.

  • QVariant configurationValue

    (
    • const char *
    )

    Implements the corresponding function of the base class.

  • virtual void * frameBuffer

    (
    • int frameIndex = 0
    )
    [virtual]

    Returns a pointer to the beginning of a frame buffer.

    Parameters
    frameIndex

    the index of the frame buffer

    Returns

    the frame buffer's memory address

    Reimplemented from PiiCameraDriver.

  • void frameBuffers

    (
    • int firstFrameIndex
    • int cnt
    • void ** scanLines
    )
  • virtual QSize frameSize

    ()
    [virtual]

    Returns frame size.

    Reimplemented from PiiCameraDriver.

  • void initialize

    ()
  • virtual bool isCapturing

    ()
    [virtual]

    Returns true if frames are currently being captured and false otherwise.

    Reimplemented from PiiCameraDriver.

  • virtual bool isOpen

    ()
    [virtual]

    Returns true if the driver is open and false otherwise.

    Reimplemented from PiiCameraDriver.

  • bool selectUnit

    ( )

    Select the camera unit.

    An example of a camera configuration file:

     # Refer to MultiCam documentation for valid camera names.
     cameraModel = AVIIVA4010
     # Refer to MultiCam documentation for valid configuration names.
     cameraConfig = L4096SC
     # Base mode camera, 1 channel (tap), and 8 bits per pixel
     cameraLinkMode = Base1T8
     # Physical connection is through the first board's B channel.
     board = 0
     channel = B
     # Use a pulse encoder for triggering.
     triggerSource = EncoderTrigger
     # Trigger on every fourth encoder pulse.
     triggerRate = 0.25
    
    Parameters
    unit

    file name (absolute or relative path) containing camera configuration. The camera configuration file must contain a QSettings-compatible file of property name-value pairs.

  • QString serialProtocol

    ()
  • void setBoard

    (
    • int board
    )
  • void setBufferMemory

    (
    • int bufferMemory
    )
  • void setCameraConfig

    ( )
  • void setCameraLinkMode

    ( )
  • void setCameraModel

    ( )
  • void setChannel

    ( )
  • bool setConfigurationValue

    (
    • const char * name
    • const QVariant & value
    )

    Implements the corresponding function of the base class.

  • void setSerialProtocol

    ( )
  • void setSignalInterval

    (
    • int signalInterval
    )
  • void setTriggerRate

    (
    • double triggerRate
    )
  • void setTriggerSource

    ( )
  • int signalInterval

    ()
  • virtual bool startCapture

    (
    • int frames
    )
    [virtual]

    Starts capturing frames.

    Parameters
    frames

    the maximum number of frames to capture. If this value is less than one, frames will be captured until explicitly interrupted.

    Returns

    true if the capture was successfully started, false otherwise

    Reimplemented from PiiCameraDriver.

  • virtual bool stopCapture

    ()
    [virtual]

    Stops capturing frames.

    Returns

    true if the capture was successfully stopped, false otherwise.

    Reimplemented from PiiCameraDriver.

  • double triggerRate

    ()
  • TriggerSource triggerSource

    ()
Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.