ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcppTransferQueue.c File Reference
#include <ngc/core/ngcpp.h>

Functions

int ngcppUnsigned (void)
 
int ngcppAddFrameType (int type, const char *name, const char *paramName, char *erms)
 
void ngcppAddFrame (int type)
 
void ngcppRemoveFrame (int type)
 
int ngcppDataReq (int n, ngcpp_req_t request, int transferMode, ngcpp_frame_t *frame, int *noSort, int *noWin, int *map, ngcb_sema_t **txSig)
 
void ngcppDataResetReq (int n)
 
void ngcppDataAck (int n)
 
void ngcppDataAckPending (int n)
 
void ngcppDataTransferReset (int n)
 
void ngcppDataServerStatus (int flag, const char *erms)
 
int ngcppStartDataServer (unsigned int n, char *erms)
 
int ngcppCloseDataServer (void)
 
void ngcppSyncOutput (void)
 
int ngcppFlushOutput (void)
 
int ngcppPublish (int syncMode, ngcppFRAME *frame)
 
void ngcppSetTimeStamp (uint64_t ts)
 
void ngcppResetTimeStamp ()
 
void ngcppSetTransferringState (void)
 
void ngcppResetTransferringState (void)
 
void ngcppInitFrame (ngcppFRAME *frame, char **array, int n)
 
void ngcppReInitFrame (ngcppFRAME *frame, char **array)
 
void ngcppReInitFrameN (ngcppFRAME *frame, char **array, int n)
 
void ngcppSetQueue (void)
 
int ngcppInitFileDump (char *erms)
 
ngcb_thread_t ngcppDSRV_THID ()
 

Variables

int ngcppNumPublishers = 0
 
int ngcppTransferTypes =ngcppFRAME_NO_FRAME
 
char ngcppDataHost [ngcppMAX_DATA_CON][256]
 
int ngcppDataFcnt [ngcppMAX_DATA_CON]
 
int ngcppDataRcnt [ngcppMAX_DATA_CON]
 
int ngcppNumTypes = 0
 
ngcpp_ftype ngcppFrameType [ngcppMAX_FRAME_TYPES]
 
ngcpp_ds_t ngcppDataServer = ngcppDataServerTcp
 
void(* ngcppDataServerExit )(void) = NULL
 

Detailed Description

Function Documentation

◆ ngcppAddFrame()

void ngcppAddFrame ( int type)

Add a frame type to the publishing list.

◆ ngcppAddFrameType()

int ngcppAddFrameType ( int type,
const char * name,
const char * paraName,
char * erms )

Add a new frame type and a assign a name and a parameter to switch the frame generation on/off.

◆ ngcppCloseDataServer()

int ngcppCloseDataServer ( void )

Shutdown data server.

◆ ngcppDataAck()

void ngcppDataAck ( int n)

Acknowledge that the data transfer process has done the frame transfer.

◆ ngcppDataAckPending()

void ngcppDataAckPending ( int n)

Pending acknowledge that the data transfer process has done the frame transfer.

◆ ngcppDataReq()

int ngcppDataReq ( int n,
ngcpp_req_t request,
int transferMode,
ngcpp_frame_t * frame,
int * noSort,
int * noWin,
int * attach,
ngcb_sema_t ** txSig )

Request a frame. If request.blocking is set, the routine blocks, until frame is available or an error (or request abort) occurs. noSort/noWin return flags in order not to apply sorting or window parameters to the output frame.

◆ ngcppDataResetReq()

void ngcppDataResetReq ( int n)

Reset the data transfer request set by ngcppDataReq().

◆ ngcppDataServerStatus()

void ngcppDataServerStatus ( int flag,
const char * erms )

Set the initialization status of the data server (1=success, 0=failure).

◆ ngcppDataTransferReset()

void ngcppDataTransferReset ( int n)

Reset all synchronization for data transfer process.

◆ ngcppDSRV_THID()

ngcb_thread_t ngcppDSRV_THID ( )

data service thread id

◆ ngcppFlushOutput()

int ngcppFlushOutput ( void )

Flush the output queue

◆ ngcppInitFileDump()

int ngcppInitFileDump ( char * erms)

Intialize file-dump mode.

◆ ngcppInitFrame()

void ngcppInitFrame ( ngcppFRAME * frame,
char ** array,
int n )

Initialize the configuration elements of the frame structure. The parameter n is the size of the ring-buffered frames. The array is an array of pointers to output frames of the same type.

◆ ngcppPublish()

int ngcppPublish ( int syncMode,
ngcppFRAME * frame )

Request a queued output for the frame pointed to by frame. The sync parameter controls the behaviour in the case the output queue becomes full:

ngcppQUEUE_SKIP   - skip the frame
ngcppQUEUE_BLOCK  - block
ngcppQUEUE_SETERR - report an error (-> return -1)

When the function returns, the frame structure element frame->dptr
returns in any case the index of the ring buffer element, that can be processed next by the calling process.

◆ ngcppReInitFrame()

void ngcppReInitFrame ( ngcppFRAME * frame,
char ** array )

Reassign new array buffers.

◆ ngcppReInitFrameN()

void ngcppReInitFrameN ( ngcppFRAME * frame,
char ** array,
int n )

Reassign new array buffers to frame.

◆ ngcppRemoveFrame()

void ngcppRemoveFrame ( int type)

Remove a frame type from the publishing list.

◆ ngcppResetTimeStamp()

void ngcppResetTimeStamp ( )

Reset timestamp in all frames.

◆ ngcppResetTransferringState()

void ngcppResetTransferringState ( void )

Reset transferring state

◆ ngcppSetQueue()

void ngcppSetQueue ( void )

Switch to queue mode

◆ ngcppSetTimeStamp()

void ngcppSetTimeStamp ( uint64_t ts)

Set the timestamp in all frames, which have the time-stamp marked as not set.

◆ ngcppSetTransferringState()

void ngcppSetTransferringState ( void )

Set transferring state

◆ ngcppStartDataServer()

int ngcppStartDataServer ( unsigned int n,
char * erms )

Start the data server for n publishers

◆ ngcppSyncOutput()

void ngcppSyncOutput ( void )

Wait until all output is done.

◆ ngcppUnsigned()

int ngcppUnsigned ( void )

Return 1 in case the raw data type is unsigned short integer. Otherwise zero is returned.

Variable Documentation

◆ ngcppDataFcnt

int ngcppDataFcnt[ngcppMAX_DATA_CON]

Output frame counters

◆ ngcppDataHost

char ngcppDataHost[ngcppMAX_DATA_CON][256]

Data client host info

◆ ngcppDataRcnt

int ngcppDataRcnt[ngcppMAX_DATA_CON]

Output request counters

◆ ngcppDataServer

ngcpp_ds_t ngcppDataServer = ngcppDataServerTcp

Data server plug-in

◆ ngcppDataServerExit

void(* ngcppDataServerExit) (void) ( void ) = NULL

Data server exit hook sending an EXIT service request to data server

◆ ngcppFrameType

Frame types

◆ ngcppNumPublishers

int ngcppNumPublishers = 0

Number of publishers

◆ ngcppNumTypes

int ngcppNumTypes = 0

Number of defined frame types

◆ ngcppTransferTypes

int ngcppTransferTypes =ngcppFRAME_NO_FRAME

Valid frame types