DUNE: Uniform Navigational Environment  2019.02.1
Vision::DFK51BG02H::GVCP Class Reference

Detailed Description

Implementation of the GigE Vision Control Protocol (GVCP).

Other cameras might have registers in different addresses. The right way to handle this would be to parse the Zipped XML that the camera provides.

Public Types

Public Member Functions

 GVCP (const Address &cam_addr)
 
 ~GVCP (void)
 
void setPrivilege (unsigned bits)
 
void setStreamPort (uint16_t port)
 
void setStreamAddress (const Address &address)
 
void setPixelFormat (PixelFormats format)
 
void setFPS (FramesPerSecond fps)
 
void setFPS (unsigned fps)
 
void setExposureTime (double exposure)
 
void setGain (unsigned gain)
 
void setGamma (unsigned gamma)
 
void setStrobeMode (StrobeModes mode, bool polarity=true)
 
void setStrobeDelay (int32_t delay)
 
void setStrobeDuration (uint32_t duration)
 
void startStreaming (void)
 
void stopStreaming (void)
 
void keepAlive (void)
 

Member Enumeration Documentation

Frames per second.

Enumerator
FPS_15 
FPS_7 
FPS_3 

Operation code.

Enumerator
OP_REG_WRITE 

Register write request.

OP_REG_READ 

Register read request.

Pixel formats.

Enumerator
PIX_MONO8 

Grayscale, 1 byte per pixel.

PIX_BGB8 

Bayer GB8, 1 byte per pixel.

Privilege bits.

Enumerator
PRIV_BV_EXCLUSIVE 
PRIV_BV_CONTROL 

Register addresses.

Enumerator
ADR_STREAM_PRT 

Primary stream destination port.

ADR_STREAM_ADR 

Primary stream destination address.

ADR_PRIV 

Control privilege.

ADR_WIDTH 

Picture width (fixed).

ADR_HEIGHT 

Picture height (fixed).

ADR_OFFS_X 

Picture offset (X).

ADR_OFFS_Y 

Picture offset (Y).

ADR_PIX_FMT 

Pixel format.

ADR_ACQ_CTL 

Acquisition control: start/stop.

ADR_FPS 

Frames per second.

ADR_EXPO_RAW 

Exposure time (raw).

ADR_GAMMA_RAW 

Gamma (raw).

ADR_GAIN_RAW 

Gain (raw).

ADR_STROBE_MOD 

Strobe mode.

ADR_STROBE_DUR 

Strobe duration.

ADR_STROBE_DEL 

Strobe delay.

Strobe bit values.

Enumerator
STROBE_BV_ON_OFF 

Bit that controls on/off.

STROBE_BV_POLARITY 

Bit that sets signal polarity.

STROBE_BV_EXPOSURE 

Bit that ties the duration to exposure time.

Strobe modes.

Enumerator
STROBE_MODE_OFF 
STROBE_MODE_ALWAYS_ON 
STROBE_MODE_FIXED 
STROBE_MODE_EXPOSURE 

Message types.

Enumerator
TYPE_COM_CAM 

Computer to camera.

TYPE_CAM_COM 

Camera to computer.

Constructor & Destructor Documentation

Vision::DFK51BG02H::GVCP::GVCP ( const Address &  cam_addr)
inline
Vision::DFK51BG02H::GVCP::~GVCP ( void  )
inline

References setPrivilege(), and stopStreaming().

Member Function Documentation

void Vision::DFK51BG02H::GVCP::keepAlive ( void  )
inline

Send keep-alive signal.

References ADR_PRIV, OP_REG_READ, OP_REG_WRITE, TYPE_CAM_COM, and TYPE_COM_CAM.

Referenced by Vision::DFK51BG02H::Task::onMain().

void Vision::DFK51BG02H::GVCP::setExposureTime ( double  exposure)
inline
void Vision::DFK51BG02H::GVCP::setFPS ( FramesPerSecond  fps)
inline

Configure number of frames per second.

Parameters
[in]fpsframes per second.

References ADR_FPS.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization(), and setFPS().

void Vision::DFK51BG02H::GVCP::setFPS ( unsigned  fps)
inline

Configure number of frames per second.

Parameters
[in]fpsframes per second.

References FPS_15, FPS_3, FPS_7, and setFPS().

void Vision::DFK51BG02H::GVCP::setGain ( unsigned  gain)
inline

Configure gain.

Parameters
[in]gainraw gain.

References ADR_GAIN_RAW.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setGamma ( unsigned  gamma)
inline

Configure gamma.

Parameters
[in]gammaraw gamma.

References ADR_GAMMA_RAW.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setPixelFormat ( PixelFormats  format)
inline

Set pixel format.

Parameters
[in]formatpixel format.

References ADR_PIX_FMT.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setPrivilege ( unsigned  bits)
inline

Set access privileges. It's mandatory (or so I think)

References ADR_PRIV.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization(), and ~GVCP().

void Vision::DFK51BG02H::GVCP::setStreamAddress ( const Address &  address)
inline

Configure destination stream address (GVSP).

Parameters
[in]addressdestination IP address.

References ADR_STREAM_ADR.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setStreamPort ( uint16_t  port)
inline

Configure destination stream port (GVSP).

Parameters
[in]portUDP port.

References ADR_STREAM_PRT.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setStrobeDelay ( int32_t  delay)
inline

Set strobe delay.

Parameters
[in]delaystrobe delay.

References ADR_STROBE_DEL.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setStrobeDuration ( uint32_t  duration)
inline

Set strobe duration.

Parameters
[in]durationstrobe duration.

References ADR_STROBE_DUR.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::setStrobeMode ( StrobeModes  mode,
bool  polarity = true 
)
inline

Configure strobe mode.

Parameters
[in]modestrobe mode.
[in]polaritystrobe polarity, false means inverted polarity.

References ADR_STROBE_DEL, ADR_STROBE_DUR, ADR_STROBE_MOD, STROBE_BV_EXPOSURE, STROBE_BV_ON_OFF, STROBE_BV_POLARITY, STROBE_MODE_ALWAYS_ON, STROBE_MODE_EXPOSURE, STROBE_MODE_FIXED, and STROBE_MODE_OFF.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization(), and stopStreaming().

void Vision::DFK51BG02H::GVCP::startStreaming ( void  )
inline

Start streaming.

References ADR_ACQ_CTL.

Referenced by Vision::DFK51BG02H::Task::onResourceInitialization().

void Vision::DFK51BG02H::GVCP::stopStreaming ( void  )
inline

Stop streaming.

References ADR_ACQ_CTL, setStrobeMode(), and STROBE_MODE_OFF.

Referenced by ~GVCP().

Collaboration diagram for Vision::DFK51BG02H::GVCP:
Collaboration graph