#include <ngc/core/ngcpp.h>#include <netinet/in.h>#include <arpa/inet.h>#include <netdb.h>#include <ctype.h>#include <sys/ipc.h>#include <sys/sem.h>Macros | |
| #define | _bailOut() |
Functions | |
| int | ngcppGetLocHostAddr (char *addr, char *erms) |
| void | ngcppDim (int nx, int ny) |
| void | ngcppAppInit (void) |
| void | ngcppCmdLineHelp (const char *paramStr, const char *helpStr, const char *defaultStr) |
| int | ngcppStartup (int argc, char **argv, size_t defaultBufsize, char *erms) |
| void | ngcppShutdown (int sigFlag) |
| void | ngcppExit (int stat) |
| void | ngcppSignalHandler (int sig) |
| void | ngcppChanMap (int *cm, int n) |
| ngcb_thread_t | ngcppCI_THID () |
| ngcb_thread_t | ngcppERR_THID () |
| #define _bailOut | ( | ) |
| void ngcppAppInit | ( | void | ) |
Function to be called by the application to signal that all initialization is done.
| void ngcppChanMap | ( | int * | cm, |
| int | n ) |
Default channel mapping
| ngcb_thread_t ngcppCI_THID | ( | ) |
command service thread id
| void ngcppCmdLineHelp | ( | const char * | paramStr, |
| const char * | helpStr, | ||
| const char * | defaultStr ) |
Add a help text for the -h command line option.
| void ngcppDim | ( | int | nx, |
| int | ny ) |
Set pixel map dimension
| ngcb_thread_t ngcppERR_THID | ( | ) |
error stack thread id
| void ngcppExit | ( | int | stat | ) |
Calls ngcppShutdwon() and exits.
| int ngcppGetLocHostAddr | ( | char * | addr, |
| char * | erms ) |
Returns the ip-address of the local host.
| void ngcppShutdown | ( | int | sigFlag | ) |
Terminate all running DMA, close the DMA device and clean up all allocated resource. When called from within a signal handler the sigFlag should be set.
| void ngcppSignalHandler | ( | int | sig | ) |
Signal handler of the ngcpp framework.
| int ngcppStartup | ( | int | argc, |
| char ** | argv, | ||
| size_t | defaultBufsize, | ||
| char * | erms ) |
Perform complete startup of the scd dma interface. Depending on the argument line interactive and capture threads are started. All semaphores are initialized here. A default buffersize (in bytes) can be passed which might be overwritten by the command line argument.
| int ngcppAdcPacketSize = 0 |
ADC-module packet size
| int ngcppArgc = 0 |
Number of command line arguments
| char** ngcppArgv = (char **)NULL |
Pointer to command line arguments
| int ngcppAutoTimeStamp = 1 |
Automatic frame timestamp
| char ngcppCapInitFlag[ngcppMAX_DEV] |
| int ngcppChopZero = ngcppCHOP_ZERO |
Chop zero phase
| char ngcppCiInitFlag = 1 |
Command interpreter initialization flag
| int ngcppCPU = ngcbCPU_HIGH |
Main-task CPU(s)
| char ngcppDataInitFlag = 1 |
Data server initialization flag
| int ngcppDetSetup = 0 |
Setup-id
| ngcpp_dma_t* ngcppDev = (ngcpp_dma_t *)NULL |
Global variables Acquisition devices
| char ngcppDitX = 0 |
DIT-handler DIT transfer
| int ngcppDmaChan = -1 |
DMA channel selection
| int ngcppDmaDiag = 0 |
DMA interrupt latency diagnose on/off
| unsigned int ngcppDmaIPPMode = NGCDRV_IPP_NONE |
DMA interrupt post processor mode
| int ngcppDmaMon = 1 |
DMA interrupt queue monitoring flag
| int ngcppDmaPacketSize = 4 |
DMA channel packet size
| int ngcppDmaResync = 0 |
DMA resync
| int ngcppDynCmd =ngcppDYN_CMD_IVLD |
Dynamic command code
| int ngcppDynCmdAck = 0 |
Dynamic command code acknowledge
| ngcpp_param_t ngcppDynParam |
Parameter configuration
| int* ngcppDynPtr = (int *)NULL |
Pointer to parameter buffer
| char ngcppEndFlg = 0 |
End of measurement flag
| int ngcppEndian = ngcbLITTLE_ENDIAN |
Endianess
| char* ngcppErmsCi = (char *)NULL |
Command interpreter initialization error
| char* ngcppErmsData = (char *)NULL |
Data server initialization error
| char ngcppErrInitFlag = 1 |
Error-stack initialization flag
| size_t ngcppFrameSize = 0 |
Output frame size
| unsigned int ngcppIppNumParam = 0 |
Number of DMA interrupt post processor task parameters
| int ngcppIppParam[NGCDRV_MAX_PARAM] |
DMA interrupt post processor task parameters
| int ngcppIppTaskId = -1 |
DMA interrupt post processor task-id
| int ngcppJoinerDelay = -1 |
Multicast joinder delay (microseconds)
| char ngcppMapFile[256] |
Channel mapping file
| int ngcppMapOp[4] |
Pixel map operation matrix
| int ngcppNoSort = 0 |
Flag to disable the pixel sorting
| int ngcppNQ = 3 |
Raw-frame output queue size (number of frames)
| int ngcppNumBuf = ngcppNUMBUF_AUTO |
Requested number of ringbuffers (0 = automatic)
| int ngcppNumDataFiles |
Number of data files
| int ngcppNumDet = 1 |
Number of detector instances
| int ngcppNumDev = 1 |
Number of acquisition devices
| int ngcppNumDiv = 1 |
Number of DMA sub-divisions
| int ngcppNumDynCmd = 0 |
Number of dynamic command codes
| int ngcppOvrScanX = 0 |
Overscan in X
| int ngcppOvrScanY = 0 |
Overscan in Y
| char ngcppPauseFlag = 0 |
Pause flag
| int ngcppPayloadSize = 0 |
RTMS payload Size (bytes)
| int ngcppPid = 0 |
Acquisition process id
| int* ngcppPixMap = (int *)NULL |
Pixel map
| size_t* ngcppPixMap64 = (size_t *)NULL |
Pixel map (64-bit)
| char ngcppPrintPars = 0 |
Print params flag
| char ngcppProcName[128] |
Process name
| char** ngcppPublisherName = (char **)NULL |
Publisher names
| size_t ngcppQBufSize = 0 |
Queue buffer size (bytes)
| int ngcppQCnt = 0 |
Queue frame counter
| int ngcppQEnd = 0 |
Queue end-command
| char ngcppQRstCnt = 0 |
Reset queue counters flag
| char ngcppQRstCnt_ = 0 |
Reset queue counters flag (internal)
| int ngcppQSize = 0 |
Queue size
| int ngcppQType = ngcppFRAME_NO_FRAME |
Queue frame type
| ngcpp_win_t ngcppQWin |
Queue window
| int ngcppRemoteFd = -1 |
Remote execution reply file descriptor
| char ngcppRstCnt = 0 |
Reset counters flag
| char ngcppRstCnt_ = 0 |
Reset counters flag (internal)
| int ngcppRtCheck = 1 |
Run-time check flag
| char ngcppRunning = 0 |
Capture running flag
| int ngcppSimDma = 0 |
DMA simulation flag
| int ngcppSimHiRes = 1000 |
High-resolution simulation
| int ngcppSimRt = 0 |
Real-time simulation flag
| int ngcppSimStartDelay = 0 |
Simulation start delay
| int ngcppSimTime = 500 |
Simulation interval
| int ngcppStartX = 0 |
Chip offset in x-direction
| int ngcppStartY = 0 |
Chip offset in y-direction
| char ngcppStatus =ngcppSTAT_IDLE |
Processing status
| char ngcppSyncInput = 0 |
Synchronous input flag
| int ngcppTestCnt = 0 |
Counter for tests
| ngcb_thread_t ngcppThCapture[ngcppMAX_DEV] |
| double ngcppTime[2] |
Calculation-time and frame-time information
| ngcb_ma_t ngcppTimeFilter[2] |
Filters for time measurements
| uint64_t ngcppTimeStamp = 0 |
Last sample timestamp
| char ngcppTransferring = 0 |
Transferring flag
| int ngcppUnitSize = 2 |
RTMS data unit size (bytes)
| ngcb_sema_t semAppInit |
Application startup synchronization semaphore
| ngcb_sema_t semBuf |
Ringbuffer access protection semaphore
| ngcb_sema_t semCam |
| ngcb_sema_t semCiInit |
Command interpreter synchronization semaphore
| ngcb_sema_t semCmd |
Dynamic command synchronization semaphore
| ngcb_sema_t semCmdAck |
Dynamic command acknowledge semaphore
| ngcb_sema_t semDataInit |
Data server synchronization semaphore
| ngcb_sema_t semErrInit |
Error-stack synchronization semaphore
| ngcb_sema_t semMem |
Data set access protection semaphore
| ngcb_sema_t semParam |
Parameter access protection semaphore
| ngcb_sema_t semParamLock |
Parameter lock synchronization semaphore
| ngcb_sema_t semRun |
Running flag access protection semaphore
| ngcb_sema_t semStat |
Status access protection semaphore
| ngcb_sema_t semTerm |
Termination synchronization semaphore