#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 |
| void ngcppAddFrame | ( | int | type | ) |
Add a frame type to the publishing list.
| 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.
| int ngcppCloseDataServer | ( | void | ) |
Shutdown data server.
| void ngcppDataAck | ( | int | n | ) |
Acknowledge that the data transfer process has done the frame transfer.
| void ngcppDataAckPending | ( | int | n | ) |
Pending acknowledge that the data transfer process has done the frame transfer.
| 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.
| void ngcppDataResetReq | ( | int | n | ) |
Reset the data transfer request set by ngcppDataReq().
| void ngcppDataServerStatus | ( | int | flag, |
| const char * | erms ) |
Set the initialization status of the data server (1=success, 0=failure).
| void ngcppDataTransferReset | ( | int | n | ) |
Reset all synchronization for data transfer process.
| ngcb_thread_t ngcppDSRV_THID | ( | ) |
data service thread id
| int ngcppFlushOutput | ( | void | ) |
Flush the output queue
| int ngcppInitFileDump | ( | char * | erms | ) |
Intialize file-dump mode.
| 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.
| 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.
| void ngcppReInitFrame | ( | ngcppFRAME * | frame, |
| char ** | array ) |
Reassign new array buffers.
| void ngcppReInitFrameN | ( | ngcppFRAME * | frame, |
| char ** | array, | ||
| int | n ) |
Reassign new array buffers to frame.
| void ngcppRemoveFrame | ( | int | type | ) |
Remove a frame type from the publishing list.
| void ngcppResetTimeStamp | ( | ) |
Reset timestamp in all frames.
| void ngcppResetTransferringState | ( | void | ) |
Reset transferring state
| void ngcppSetQueue | ( | void | ) |
Switch to queue mode
| void ngcppSetTimeStamp | ( | uint64_t | ts | ) |
Set the timestamp in all frames, which have the time-stamp marked as not set.
| void ngcppSetTransferringState | ( | void | ) |
Set transferring state
| int ngcppStartDataServer | ( | unsigned int | n, |
| char * | erms ) |
Start the data server for n publishers
| void ngcppSyncOutput | ( | void | ) |
Wait until all output is done.
| int ngcppUnsigned | ( | void | ) |
Return 1 in case the raw data type is unsigned short integer. Otherwise zero is returned.
| int ngcppDataFcnt[ngcppMAX_DATA_CON] |
Output frame counters
| char ngcppDataHost[ngcppMAX_DATA_CON][256] |
Data client host info
| int ngcppDataRcnt[ngcppMAX_DATA_CON] |
Output request counters
| ngcpp_ds_t ngcppDataServer = ngcppDataServerTcp |
Data server plug-in
| void(* ngcppDataServerExit) (void) | ( | void | ) | = NULL |
Data server exit hook sending an EXIT service request to data server
| ngcpp_ftype ngcppFrameType[ngcppMAX_FRAME_TYPES] |
Frame types
| int ngcppNumPublishers = 0 |
Number of publishers
| int ngcppNumTypes = 0 |
Number of defined frame types
| int ngcppTransferTypes =ngcppFRAME_NO_FRAME |
Valid frame types