Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
SocCamera::tcGigEIO Class Reference

The GigE streaming IO channel interface. More...

#include <GigEIO.h>

Inheritance diagram for SocCamera::tcGigEIO:
Collaboration diagram for SocCamera::tcGigEIO:

Classes

struct  tsPacketTransInfo
 

Public Member Functions

 tcGigEIO (tcSensorBoard *apSensor)
 Constructor. More...
 
 ~tcGigEIO ()
 Destructor. More...
 
SocCamera::teNackCode capture (tsCaptureRequest asRequest)
 
SocCamera::teNackCode setBpp (SocCamera::teBPPMode aeBppMode)
 
void ResetBlockID (void)
 
void sendUpdate (tsNewFrameMsg *apMsg)
 
void RetransmitPackets (tsGvcpCmdPacketResend *apReq)
 
bool is_capturing ()
 
int set_pkt_size (int size)
 
- Public Member Functions inherited from tcIOChannel
 tcIOChannel (SocCamera::teIOChannels aeIOId, SocCamera::tcSensorBoard *apSensor)
 Construct a new tcIOChannel::tcIOChannel object. More...
 
virtual ~tcIOChannel ()
 
virtual void initialized ()
 
SocCamera::teBPPMode getBpp ()
 
virtual void processUpdate (tsNewFrameMsg *apMsg)
 
void setEnable (bool abEnable)
 
tcImagegrabImage ()
 
SocCamera::teIOChannels id ()
 
virtual void invalidateCache (void *apMem, size_t anSize)
 
virtual void * memory ()
 
- Public Member Functions inherited from tcIOCallback
 tcIOCallback ()
 
virtual ~tcIOCallback ()
 

Static Public Attributes

static const int GVSP_MIN_PKT_SIZE = 512
 Minimum streaming packet size. More...
 
static const int GVSP_MAX_PKT_SIZE = 3800
 Maximum streaming packet size. More...
 
static const int MAX_WORKING_BUFFERS = 8
 

Protected Member Functions

void send_test_pkt ()
 
void set_pkt_fragment (bool fragment)
 
void set_buffer_sizes (int rxBufferMax, int txBufferMax)
 
- Protected Member Functions inherited from tcIOChannel
void invalidateCache (tsNewFrameMsg *apMsg)
 
void invalidateCache ()
 
void Report (const char *fmt,...)
 This method routes text to stderr. More...
 
void ReportError (const char *fmt,...)
 

Protected Attributes

int m_udp_sock
 
uint8_t maBuffer [MAX_WORKING_BUFFERS][MAX_GVSP_BUFFER_LENGTH]
 
uint8_t maReXmitBuffer [MAX_WORKING_BUFFERS][MAX_GVSP_BUFFER_LENGTH]
 
tcRegisterFilempRegisterFile
 
uint32_t mnCurrentHeaderIndex
 
uint32_t mnBlockID
 
bool mbIsStreaming
 
uint64_t mnLastFrameOffset
 
bool mbCancel
 
tsPacketTransInfo maPacketTransmitInfo [32]
 we will HASH the bottom 5 bits of the block ID More...
 
int m_pkt_size
 
- Protected Attributes inherited from tcIOChannel
std::string m_name
 
SocCamera::teIOChannels meIOId
 
SocCamera::tcSensorBoardmpSensor
 
SocCamera::teBPPMode meBppMode
 
int64 mnImgCount
 
std::list< tsNewFrameMsgmlUpdates
 
tcMutex mcMutex
 
tcCondition mcCond
 
void * mpMemory
 
tcIOChannelThread mcThread
 
tsNewFrameMsg msLastUpdate
 
bool mbSimRAM
 

Static Protected Attributes

static const int INVALID_SOCKET = -1
 
- Static Protected Attributes inherited from tcIOChannel
static uint32 CAPTURE_START_ADDR = (0x20000000)
 
static uint32 MEMORY_BLOCK_SIZE = (0x20000000)
 
static bool CMEM_USED = (true)
 
static bool MMAP_USED = (true)
 

Friends

class tcGigEIOHandler
 

Detailed Description

The GigE streaming IO channel interface.

Constructor & Destructor Documentation

◆ tcGigEIO()

SocCamera::tcGigEIO::tcGigEIO ( tcSensorBoard apSensor)

Constructor.

◆ ~tcGigEIO()

SocCamera::tcGigEIO::~tcGigEIO ( )

Destructor.

Member Function Documentation

◆ capture()

SocCamera::teNackCode SocCamera::tcGigEIO::capture ( tsCaptureRequest  asRequest)
virtual

Start a capture with this request. If the requests number of frames is tsNewRequest::CANCEL_CAPTURE then the current capture is stopped if possible.

Parameters
[in]asRequestThe request for capture being made.
Returns
a nack code if the capture parameters are inelligable for this IOChannel.

Implements tcIOChannel.

◆ is_capturing()

bool SocCamera::tcGigEIO::is_capturing ( )
inline

◆ ResetBlockID()

void SocCamera::tcGigEIO::ResetBlockID ( void  )
inline

◆ RetransmitPackets()

void SocCamera::tcGigEIO::RetransmitPackets ( tsGvcpCmdPacketResend apReq)

< packet block ID

< packet block ID

< packet block ID

< packet block ID

◆ send_test_pkt()

void SocCamera::tcGigEIO::send_test_pkt ( )
protected

◆ sendUpdate()

void SocCamera::tcGigEIO::sendUpdate ( tsNewFrameMsg apMsg)
virtual

Actually sends the frame by whatever means; called by the internal thread.

Parameters
[in]apMsg

Implements tcIOChannel.

◆ set_buffer_sizes()

void SocCamera::tcGigEIO::set_buffer_sizes ( int  rxBufferMax,
int  txBufferMax 
)
protected

Set the receive and transmit buffer sizes for this socket

Parameters
[in]rxBufferMaxMax size in bytes
[in]txBufferMaxMax size in bytes

◆ set_pkt_fragment()

void SocCamera::tcGigEIO::set_pkt_fragment ( bool  fragment)
protected

◆ set_pkt_size()

int SocCamera::tcGigEIO::set_pkt_size ( int  size)

This function sets the size of the transmit packets. It's invoked whenever the SCPS0 register is set.

Parameters
[in]sizeThe total packet size, including all headers (IP header = 20 bytes, UDP header = 8 bytes and GVSP header).
Returns
0 if successful, -1 if not.

◆ setBpp()

SocCamera::teNackCode SocCamera::tcGigEIO::setBpp ( SocCamera::teBPPMode  aeBppMode)
virtual

Sets the bits-per-pixel output of the camera.

Parameters
[in]aeBppModethe bits per pixel mode.
Returns
the nack code for the operation

Implements tcIOChannel.

Friends And Related Function Documentation

◆ tcGigEIOHandler

friend class tcGigEIOHandler
friend

Member Data Documentation

◆ GVSP_MAX_PKT_SIZE

const int SocCamera::tcGigEIO::GVSP_MAX_PKT_SIZE = 3800
static

Maximum streaming packet size.

◆ GVSP_MIN_PKT_SIZE

const int SocCamera::tcGigEIO::GVSP_MIN_PKT_SIZE = 512
static

Minimum streaming packet size.

These constants reflect the minimum and maximum packet sizes which the Camera will send while streaming image data. The sizes defined here MUST match values set forth in the GevSCPSPacketSize integer declaration in XML file. If they do not match we will fail the "StreamFormat" section of validation test program.

◆ INVALID_SOCKET

const int SocCamera::tcGigEIO::INVALID_SOCKET = -1
staticprotected

◆ m_pkt_size

int SocCamera::tcGigEIO::m_pkt_size
protected

◆ m_udp_sock

int SocCamera::tcGigEIO::m_udp_sock
protected

◆ maBuffer

uint8_t SocCamera::tcGigEIO::maBuffer[MAX_WORKING_BUFFERS][MAX_GVSP_BUFFER_LENGTH]
protected

◆ maPacketTransmitInfo

tsPacketTransInfo SocCamera::tcGigEIO::maPacketTransmitInfo[32]
protected

we will HASH the bottom 5 bits of the block ID

◆ maReXmitBuffer

uint8_t SocCamera::tcGigEIO::maReXmitBuffer[MAX_WORKING_BUFFERS][MAX_GVSP_BUFFER_LENGTH]
protected

◆ MAX_WORKING_BUFFERS

const int SocCamera::tcGigEIO::MAX_WORKING_BUFFERS = 8
static

◆ mbCancel

bool SocCamera::tcGigEIO::mbCancel
protected

◆ mbIsStreaming

bool SocCamera::tcGigEIO::mbIsStreaming
protected

◆ mnBlockID

uint32_t SocCamera::tcGigEIO::mnBlockID
protected

◆ mnCurrentHeaderIndex

uint32_t SocCamera::tcGigEIO::mnCurrentHeaderIndex
protected

◆ mnLastFrameOffset

uint64_t SocCamera::tcGigEIO::mnLastFrameOffset
protected

◆ mpRegisterFile

tcRegisterFile* SocCamera::tcGigEIO::mpRegisterFile
protected

The documentation for this class was generated from the following files: