ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcdttPUBLISH Class Reference

#include <ngcdttPUBLISH.hpp>

Inheritance diagram for ngcdttPUBLISH:
ngc::gateway::ddt::Publisher ngcdttIPC

Public Member Functions

 ngcdttPUBLISH ()
 Constructor.
 
 ngcdttPUBLISH (int n)
 Constructor with number of display buffers.
 
virtual ~ngcdttPUBLISH ()
 Destructor.
 
char * ErrMsg ()
 Return actual error message.
 
const char * Type ()
 Return display type.
 
int BytesPerPix (int dataType)
 Return number of bytes per pixel for specific data type.
 
int Size (ngcpp_hdr_t hdr)
 Compute frame size in bytes.
 
int NumBuf ()
 Return number of available display buffers.
 
void NumBuf (int n)
 Set new number of display buffers.
 
ngcdtt_frame_tFrame ()
 Get current frame slot.
 
int Publish ()
 Publish current frame buffer.
 
int TryLock ()
 Try to lock current frame bbuffer.
 
int Lock ()
 Lock current frame buffer.
 
int Unlock ()
 Unlock current frame buffer.
 
void Invalidate ()
 Invalidate current frame buffer.
 
virtual int Configure (const char *name, int nx, int ny)
 Initialize/configure publisher.
 
virtual void Shutdown ()
 Shutdown publisher.
 
virtual int IdxOut ()
 Return actual display buffer index.
 
virtual int IdxIn ()
 Return the buffer index to be used for next transfer.
 
virtual int Locked (int idx)
 Check whether the image stored in frame[idx] is locked.
 
virtual int Lock (int idx)
 Lock frame[idx].
 
virtual int TryLock (int idx)
 Try to lock frame[idx].
 
virtual int Unlock (int idx)
 Unlock frame[idx].
 
virtual int Wait (int idx)
 Wait until the image stored in frame[idx] is unlocked.
 
virtual int Publish (int idx)
 Publish the image stored in frame[idx].
 
virtual void Invalidate (int idx)
 Invalidate the image stored in frame[idx].
 

Public Attributes

int initialized
 Initialized (flag)
 
char uri [256]
 URI, if applicable.
 
int frameId
 Unique frame-id for display.
 
ngcdtt_frame_tframe
 Frames array.
 

Protected Member Functions

void Type (const char *name)
 

Detailed Description

Publisher class

Constructor & Destructor Documentation

◆ ngcdttPUBLISH() [1/2]

ngcdttPUBLISH::ngcdttPUBLISH ( )

Constructor.

◆ ngcdttPUBLISH() [2/2]

ngcdttPUBLISH::ngcdttPUBLISH ( int n)
explicit

Constructor with number of display buffers.

◆ ~ngcdttPUBLISH()

ngcdttPUBLISH::~ngcdttPUBLISH ( )
virtual

Destructor.

Member Function Documentation

◆ BytesPerPix()

int ngcdttPUBLISH::BytesPerPix ( int dataType)

Return number of bytes per pixel for specific data type.

◆ Configure()

int ngcdttPUBLISH::Configure ( const char * name,
int nx,
int ny )
virtual

Initialize/configure publisher.

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ ErrMsg()

char * ngcdttPUBLISH::ErrMsg ( )

Return actual error message.

◆ Frame()

ngcdtt_frame_t * ngcdttPUBLISH::Frame ( )

Get current frame slot.

◆ IdxIn()

int ngcdttPUBLISH::IdxIn ( )
virtual

Return the buffer index to be used for next transfer.

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ IdxOut()

int ngcdttPUBLISH::IdxOut ( )
virtual

Return actual display buffer index.

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Invalidate() [1/2]

void ngcdttPUBLISH::Invalidate ( )

Invalidate current frame buffer.

◆ Invalidate() [2/2]

void ngcdttPUBLISH::Invalidate ( int idx)
virtual

Invalidate the image stored in frame[idx].

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Lock() [1/2]

int ngcdttPUBLISH::Lock ( )

Lock current frame buffer.

◆ Lock() [2/2]

int ngcdttPUBLISH::Lock ( int idx)
virtual

Lock frame[idx].

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Locked()

int ngcdttPUBLISH::Locked ( int idx)
virtual

Check whether the image stored in frame[idx] is locked.

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ NumBuf() [1/2]

int ngcdttPUBLISH::NumBuf ( )

Return number of available display buffers.

◆ NumBuf() [2/2]

void ngcdttPUBLISH::NumBuf ( int n)

Set new number of display buffers.

◆ Publish() [1/2]

int ngcdttPUBLISH::Publish ( )

Publish current frame buffer.

◆ Publish() [2/2]

int ngcdttPUBLISH::Publish ( int idx)
virtual

Publish the image stored in frame[idx].

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Shutdown()

void ngcdttPUBLISH::Shutdown ( )
virtual

Shutdown publisher.

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Size()

int ngcdttPUBLISH::Size ( ngcpp_hdr_t hdr)

Compute frame size in bytes.

◆ TryLock() [1/2]

int ngcdttPUBLISH::TryLock ( )

Try to lock current frame bbuffer.

◆ TryLock() [2/2]

int ngcdttPUBLISH::TryLock ( int idx)
virtual

Try to lock frame[idx].

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Type() [1/2]

const char * ngcdttPUBLISH::Type ( )

Return display type.

◆ Type() [2/2]

void ngcdttPUBLISH::Type ( const char * name)
protected

◆ Unlock() [1/2]

int ngcdttPUBLISH::Unlock ( )

Unlock current frame buffer.

◆ Unlock() [2/2]

int ngcdttPUBLISH::Unlock ( int idx)
virtual

Unlock frame[idx].

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

◆ Wait()

int ngcdttPUBLISH::Wait ( int idx)
virtual

Wait until the image stored in frame[idx] is unlocked.

Reimplemented in ngc::gateway::ddt::Publisher, and ngcdttIPC.

Member Data Documentation

◆ frame

ngcdtt_frame_t* ngcdttPUBLISH::frame

Frames array.

◆ frameId

int ngcdttPUBLISH::frameId

Unique frame-id for display.

◆ initialized

int ngcdttPUBLISH::initialized

Initialized (flag)

◆ uri

char ngcdttPUBLISH::uri[256]

URI, if applicable.


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