ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcppInt.h File Reference
#include <ngc/core/ngcb.h>

Go to the source code of this file.

Classes

struct  ngcpp_cmd_t
 
struct  ngcpp_rep_t
 
struct  ngcpp_win_t
 
struct  ngcpp_hdr_simple
 
struct  ngcpp_data_service
 
struct  ngcpp_req_t
 
struct  ngcpp_reqack_t
 
struct  ngcpp_hdr_t
 
struct  ngcpp_frame_t
 
struct  ngcpp_ftype
 
struct  ngcpp_cfg_t
 
struct  ngcpp_error_t
 
struct  ngcpp_link_cfg_t
 
struct  ngcpp_cmd_client_api
 

Macros

#define ngcppLog(...)
 
#define ngcppNUM_ELE(x)
 
#define ngcppMAX_DATA_CON   16
 
#define ngcppCI_MAX_CON   4
 
#define ngcppCOM_PROT_ENDIAN   ngcbBIG_ENDIAN
 
#define ngcppDATA_PROTOCOL   0x1
 
#define ngcppDATA_PROT_ENDIAN   ngcbBIG_ENDIAN
 
#define ngcppCOM_H_SIZE   8
 
#define ngcppREP_H_SIZE   10
 
#define ngcppMAX_COMBUFSIZE   (8 * 1024)
 
#define ngcppMES_COMMAND   0xffff
 
#define ngcppMES_DATA   0x0002
 
#define ngcppMES_BACKREPLY   0x0003
 
#define ngcppMES_MESSAGE   0x0004
 
#define ngcppENV_COMMAND_PORT   "NGCPP_CMD"
 
#define ngcppENV_DATA_PORT   "NGCPP_DATA"
 
#define ngcppENV_DATA_PATH   "NGCPP_DPATH"
 
#define ngcppENV_ERR_PORT   "NGCPP_ERR"
 
#define ngcppENV_HOST   "NGCPP_HOST"
 
#define ngcppENV_DEVNAME   "NGCPP_DEV"
 
#define ngcppCOMMAND_PORT   8001
 
#define ngcppDATA_PORT   0
 
#define ngcppERR_PORT   0
 
#define ngcppNO_TIMEOUT   0
 
#define ngcppDEFAULT_TIMEOUT   ngcppNO_TIMEOUT
 
#define ngcppSTAT_IDLE   0
 
#define ngcppSTAT_WAITING   1
 
#define ngcppSTAT_PROCESSING   2
 
#define ngcppSTAT_READY   3
 
#define ngcppSTAT_FAILURE   4
 
#define ngcppRAW_RTD   SHORT
 
#define ngcppDTYPE_BYTE   0
 
#define ngcppDTYPE_REAL32   1
 
#define ngcppDTYPE_REAL64   2
 
#define ngcppDTYPE_INT16   3
 
#define ngcppDTYPE_INT32   4
 
#define ngcppDTYPE_INT64   5
 
#define ngcppDTYPE_STRING   6
 
#define ngcppDTYPE_UINT16   7
 
#define ngcppMAX_FRAME_TYPES   32
 
#define ngcppFRAME_ANY   0xffffffff
 
#define ngcppFRAME_NO_FRAME   0x00000000
 
#define ngcppFRAME_SNAPSHOT   0x00000001
 
#define ngcppFRAME_DIT   0x00000002
 
#define ngcppFRAME_INT   0x00000004
 
#define ngcppFRAME_INTERMEDIATE_INT   0x00000008
 
#define ngcppFRAME_INTERMEDIATE_DIT   0x00000010
 
#define ngcppFRAME_SDV   0x00000020
 
#define ngcppFRAME_SAMPLE   0x00000040
 
#define ngcppFRAME_HCYCLE1   0x00000080
 
#define ngcppFRAME_HCYCLE2   0x00000100
 
#define ngcppFRAME_TRACK   0x00000200
 
#define ngcppFRAME_NOTIFY   0x00000400
 
#define ngcppFRAME_APP   0x00000800
 
#define ngcppFRAME_NAME_ANY   "ANY_FRAME"
 
#define ngcppFRAME_NAME_NO_FRAME   "NO_FRAME"
 
#define ngcppFRAME_NAME_SNAPSHOT   "SNAPSHOT"
 
#define ngcppFRAME_NAME_DIT   "DIT"
 
#define ngcppFRAME_NAME_INT   "INT"
 
#define ngcppFRAME_NAME_INTERMEDIATE_INT   "INTERM-INT"
 
#define ngcppFRAME_NAME_INTERMEDIATE_DIT   "INTERM-DIT"
 
#define ngcppFRAME_NAME_SDV   "STDEV"
 
#define ngcppFRAME_NAME_SAMPLE   "SAMPLE"
 
#define ngcppFRAME_NAME_TRACK   "TRACK"
 
#define ngcppFRAME_NAME_HCYCLE1   "HCYCLE1"
 
#define ngcppFRAME_NAME_HCYCLE2   "HCYCLE2"
 
#define ngcppFRAME_NAME_NOTIFY   "NOTIFY"
 
#define ngcppFRAME_NAME_APP   "APP"
 
#define ngcppMAX_PARAMSIZE   256
 
#define ngcppPARAM_TYPE_LOGICAL   0
 
#define ngcppPARAM_TYPE_INT   4
 
#define ngcppPARAM_TYPE_FLOAT   1
 
#define ngcppCOM_TIMEOUT   -3
 
#define ngcppCOM_NOP   400
 
#define ngcppCOM_START   401
 
#define ngcppCOM_STOP   402
 
#define ngcppCOM_STAT   403
 
#define ngcppCOM_TIME   404
 
#define ngcppCOM_MSET   405
 
#define ngcppCOM_PSET   406
 
#define ngcppCOM_PSTAT   407
 
#define ngcppCOM_PSYNC   408
 
#define ngcppCOM_MSYNC   409
 
#define ngcppCOM_EXIT   410
 
#define ngcppCOM_ICONF   411
 
#define ngcppCOM_PCONF   412
 
#define ngcppCOM_DYNCMD   413
 
#define ngcppCOM_VERBOSE   414
 
#define ngcppCOM_SIMTIME   415
 
#define ngcppCOM_MCLOSE   416
 
#define ngcppCOM_FLUSHOUT   417
 
#define ngcppCOM_RSTCNT   418
 
#define ngcppCOM_END   419
 
#define ngcppCOM_FILEBASE   420
 
#define ngcppCOM_FILEPATH   421
 
#define ngcppCOM_ERRPORT   422
 
#define ngcppCOM_USRCMD   423
 
#define ngcppCOM_DATAPORT   424
 
#define ngcppCOM_CHIPOFFSET   425
 
#define ngcppCOM_PAUSE   426
 
#define ngcppCOM_ABORT   427
 
#define ngcppCOM_CHAN   428
 
#define ngcppCOM_SETDPATH   429
 
#define ngcppCOM_GETDPATH   430
 
#define ngcppCOM_REV   431
 
#define ngcppCOM_SIMDELAY   432
 
#define ngcppCOM_RECVSTAT   433
 
#define ngcppNUM_COM   (434 - ngcppCOM_NOP)
 
#define ngcppERR_NO_ERR   0
 
#define ngcppERR_IO_ERROR   -1
 
#define ngcppERR_IO_OVERRUN   -2
 
#define ngcppERR_IO_OVERFLOW   -3
 
#define ngcppERR_GENERAL   400
 
#define ngcppERR_NO_VALID_COMMAND   401
 
#define ngcppERR_OUT_OF_RANGE   402
 
#define ngcppERR_OPEN   405
 
#define ngcppERR_ALLOC   406
 
#define ngcppERR_TERM   407
 
#define ngcppERR_UNKNOWN   408
 
#define ngcppERR_STARTED   409
 
#define ngcppERR_NOT_STARTED   410
 
#define ngcppERR_SYSTEM   411
 
#define ngcppERR_TIMEOUT   412
 
#define ngcppERR_INIT   413
 
#define ngcppERR_CMD   414
 
#define ngcppERR_FILIO   415
 
#define ngcppERR_HANDSHAKE_REQ   451
 
#define ngcppERR_HANDSHAKE_FRAME   452
 
#define ngcppFAILURE   -1
 
#define ngcppQUEUE_SKIP   0
 
#define ngcppQUEUE_BLOCK   1
 
#define ngcppQUEUE_SETERR   2
 
#define ngcppMAX_DEV   12
 
#define ngcppMODE_SIM   1
 
#define ngcppMODE_NORMAL   2
 
#define ngcppMODE_STREAM   3
 
#define ngcppMODE_PLAYBACK   4
 
#define ngcppMAX_USRCMD_LEN   1024
 
#define ngcppDYN_CMD_IVLD   0
 
#define ngcppDYN_CMD_RESET   1
 
#define ngcppDYN_CMD_RESERVED   100
 
#define ngcppFLATFIELD   1
 
#define ngcppBADPIXMASK   2
 
#define ngcppDARK   4
 
#define ngcppDATA_SERVICE_EXIT   0
 
#define ngcppDATA_SERVICE_PING   1
 
#define ngcppDATA_SERVICE_CONNECT   2
 
#define ngcppDATA_SERVICE_ABORT   3
 
#define ngcppDATA_SERVICE_TYPES   4
 
#define ngcppDATA_SERVICE_PROCNAME   5
 
#define ngcppDATA_SERVICE_TYPEDEF   6
 
#define ngcppDATA_SERVICE_EXPORT   7
 
#define ngcppDATA_SERVICE_PROTOCOL   8
 
#define ngcppDATA_SERVICE_KILL   9
 
#define ngcppTMODE_NOTRANS   0x00
 
#define ngcppTMODE_SCIENCE   0x01
 
#define ngcppTMODE_VIDEO   0x02
 
#define ngcppTMODE_INTR   0x10
 
#define ngcppTFLAG_SKIP   0x00000000
 
#define ngcppTFLAG_TRANSFER   0x00000001
 
#define ngcppTFLAG_HOLD   0x00000002
 
#define ngcppTFLAG_LOCAL   0x00000004
 
#define ngcppFSTAT_TRANSFERRING   0x1
 
#define ngcppFSTAT_EXP_END   0x2
 
#define ngcppFSTAT_ROT90   0x4
 
#define ngcppAPP_HDR_SIZE   128
 
#define ngcppFRAME_H_SIZE   (int)(sizeof(ngcpp_hdr_t) - ngcppAPP_HDR_SIZE)
 
#define ngcppFRAME_HX_SIZE   24
 

Typedefs

typedef int ngcpp_link_t
 
typedef unsigned short ngcpp_t
 
typedef char ngcppPARAM_NAMES[ngcppMAX_PARAMSIZE][256]
 
typedef int ngcppPARAM_VALUES[ngcppMAX_PARAMSIZE]
 
typedef int(* ngcppMSG_OPEN) (const char *name, ngcpp_link_cfg_t *cfg, char *erms)
 
typedef int(* ngcppMSG_CLOSE) (int link, ngcpp_link_cfg_t *cfg)
 
typedef int(* ngcppMSG_CMD) (int link, ngcpp_cmd_t command, char *erms)
 
typedef int(* ngcppMSG_REPLY) (int link, ngcpp_rep_t *reply, char *erms)
 

Functions

int ngcppExec (const char *host, const char *cmd, int xt, int debugPort, int *pid, char *erms)
 
int ngcppKill (const char *host, int pid, char *erms)
 
int ngcppComExec (ngcpp_link_t *link, const char *srvName, const char *cmd, int xt, int debugPort, int *pid, int *cmdPortReal, char *erms)
 
int ngcppComKill (const char *host, int pid, char *erms)
 
int ngcppSelectCom (const char *comType, char *erms)
 
int ngcppAllocCom (char *erms)
 
int ngcppOpenComLine (const char *srvName, ngcpp_link_t *link, char *erms)
 
int ngcppCloseComLine (ngcpp_link_t link)
 
int ngcppTimeout (ngcpp_link_t link, int seconds, char *erms)
 
int ngcppSendCommand (ngcpp_link_t link, ngcpp_cmd_t command, char *erms)
 
int ngcppGetReply (ngcpp_link_t link, ngcpp_rep_t *reply, char *erms)
 
void ngcppErr (char *erms, int errorId)
 
int ngcppGetParamSetup (ngcpp_link_t link, int *numParame, ngcppPARAM_NAMES paramName, ngcppPARAM_VALUES paramBuf, char *erms)
 
int ngcppGetParamType (ngcpp_link_t link, const char *paramName, int *type, char *erms)
 
int ngcppSetParam (ngcpp_link_t link, const char *paramName, int value, char *erms)
 
int ngcppSetParamBuf (ngcpp_link_t link, int *paramBuf, char *erms)
 
int ngcppGetParam (ngcpp_link_t link, const char *paramName, int *value, char *erms)
 
int ngcppGetParamBuf (ngcpp_link_t link, int *paramBuf, char *erms)
 
int ngcppParamSync (ngcpp_link_t link, int timeout, char *erms)
 
int ngcppSetChipOffset (ngcpp_link_t link, int startX, int startY, char *erms)
 
int ngcppChanSelect (ngcpp_link_t link, int chan, char *erms)
 
int ngcppStart (ngcpp_link_t link, char *erms)
 
int ngcppResetCnt (ngcpp_link_t link, char *erms)
 
int ngcppEnd (ngcpp_link_t link, char *erms)
 
int ngcppStop (ngcpp_link_t link, char *erms)
 
int ngcppPause (ngcpp_link_t link, int pauseFlag, char *erms)
 
int ngcppAbort (ngcpp_link_t link, char *erms)
 
int ngcppExitComServer (ngcpp_link_t link, char *erms)
 
int ngcppConnect (ngcpp_link_t *link, const char *srvName, char *erms)
 
int ngcppPing (ngcpp_link_t link, char *erms)
 
int ngcppGetStatus (ngcpp_link_t link, int *status, char *erms)
 
int ngcppGetRev (ngcpp_link_t link, int *rev1, int *rev2, char *erms)
 
int ngcppGetTime (ngcpp_link_t link, double *loopTime, double *calcTime, char *erms)
 
int ngcppSetSimTime (ngcpp_link_t link, int simTime, char *erms)
 
int ngcppSetSimStartDelay (ngcpp_link_t link, int simTime, char *erms)
 
int ngcppVerbose (ngcpp_link_t link, int vflag, char *erms)
 
int ngcppGetConfig (ngcpp_link_t link, ngcpp_cfg_t *config, char *erms)
 
int ngcppGetRecvStat (ngcpp_link_t link, int *err, int *stat, char *erms)
 
int ngcppGetErrPort (ngcpp_link_t link, int *errPort, char *erms)
 
int ngcppGetDataPort (ngcpp_link_t link, int *dataPort, char *erms)
 
int ngcppGetDataPath (ngcpp_link_t link, char *path, char *erms)
 
int ngcppSetDataPath (ngcpp_link_t link, const char *path, char *erms)
 
int ngcppSendDynCmd (ngcpp_link_t link, int cmdCode, int timeout, char *erms)
 
int ngcppExecUsrCmd (ngcpp_link_t link, const char *usrCommand, char *usrReply, char *erms)
 
int ngcppMemClose (ngcpp_link_t link, char *erms)
 
int ngcppMemSync (ngcpp_link_t link, int id, char *erms)
 
int ngcppUploadBuf (ngcpp_link_t link, char *buf, int id, int size, int blockSize, char *erms)
 
int ngcppFlushOutputQueue (ngcpp_link_t link, char *erms)
 
int ngcppSetFilePubBase (ngcpp_link_t link, char *baseName, char *erms)
 
int ngcppSetFilePubPath (ngcpp_link_t link, int id, char *path, char *erms)
 
int ngcppLcuRdAddr (ngcpp_link_t link, unsigned int addr, unsigned int *value, char *erms)
 
int ngcppLcuWrAddr (ngcpp_link_t link, unsigned int addr, unsigned int value, char *erms)
 
int ngcppLcuRdPci (ngcpp_link_t link, unsigned int addr, unsigned int *value, char *erms)
 
int ngcppLcuWrPci (ngcpp_link_t link, unsigned int addr, unsigned int value, char *erms)
 
void ngcppDataInit (void)
 
void ngcppHdrInit (ngcpp_hdr_t *hdr)
 
int ngcppDataConnect (const char *srvName, int *socket, int transferMode, int processId, char *erms)
 
int ngcppDataDisconnect (int socket)
 
int ngcppPingDataSrv (const char *srvName, char *procName, char *erms)
 
int ngcppKillDataClient (const char *srvName, int id, char *erms)
 
int ngcppDataProtocol (const char *srvName, int *version, char *erms)
 
int ngcppAbortReq (const char *srvName, int processId, char *erms)
 
int ngcppCancelReq (int socket, int processId, char *erms)
 
int ngcppSendDataRequest (int socket, ngcpp_req_t request, char *erms)
 
int ngcppWaitDataReply (int socket, ngcpp_hdr_t *header, char *erms)
 
int ngcppWaitNextFrame (int socket, ngcpp_req_t request, ngcpp_hdr_t *header, char *erms)
 
int ngcppPollNextFrame (int socket, ngcpp_req_t request, ngcpp_hdr_t *header, char *erms)
 
int ngcppSkipFrame (int socket, char *erms)
 
int ngcppAcceptFrame (int socket, ngcpp_req_t request, ngcpp_frame_t *frame, char *erms)
 
int ngcppAcceptFrameN (int socket, ngcpp_req_t request, ngcpp_frame_t *frame, int partNo, int numDiv, char *erms)
 
int ngcppAckFrame (int socket, ngcpp_req_t request, ngcpp_hdr_t *header, char *erms)
 
int ngcppGetFrameBuf (int socket, ngcpp_frame_t *frame, size_t offset, size_t size, char *erms)
 
int ngcppGetTypeDef (const char *srvName, int *nTypes, ngcpp_ftype *frameType, char *erms)
 
int ngcppGetFrameTypes (const char *srvName, int *types, char *erms)
 
void ngcppScale (ngcpp_frame_t *frame)
 
void ngcppScale2Real (ngcpp_frame_t *frame)
 
void ngcppScaleBuf (void *dest, ngcpp_frame_t *frame)
 
void ngcppScaleBuf2Real (void *dest, ngcpp_frame_t *frame)
 
int ngcppGetFrameTypeByName (int *type, const char *name, char *erms)
 
int ngcppGetFrameNameByType (int type, char *name, char *erms)
 
int ngcppAttachData (char *srvName, size_t bufferSize, char *erms)
 
int ngcppDetachData (char *srvName)
 
ngcpp_hdr_simplengcppImportData (void **buffer, char *erms)
 
int ngcppReturnData (char *erms)
 

Variables

int ngcppEndian
 
ngcpp_cmd_client_apingcppSys
 
ngcpp_cmd_client_api ngcppCmdTcpClient
 
ngcb_sig_t ngcppSigMask
 

Detailed Description

Macro Definition Documentation

◆ ngcppAPP_HDR_SIZE

#define ngcppAPP_HDR_SIZE   128

Application header data buffer size

◆ ngcppBADPIXMASK

#define ngcppBADPIXMASK   2

bad-pixel-mask data-set

◆ ngcppCI_MAX_CON

#define ngcppCI_MAX_CON   4

Maximum number of command connections

◆ ngcppCOM_ABORT

#define ngcppCOM_ABORT   427

abort all

◆ ngcppCOM_CHAN

#define ngcppCOM_CHAN   428

select DMA-channel

◆ ngcppCOM_CHIPOFFSET

#define ngcppCOM_CHIPOFFSET   425

set chip offset

◆ ngcppCOM_DATAPORT

#define ngcppCOM_DATAPORT   424

set data server port

◆ ngcppCOM_DYNCMD

#define ngcppCOM_DYNCMD   413

send dynamic command code

◆ ngcppCOM_END

#define ngcppCOM_END   419

end of measurement

◆ ngcppCOM_ERRPORT

#define ngcppCOM_ERRPORT   422

set error stack port

◆ ngcppCOM_EXIT

#define ngcppCOM_EXIT   410

exit command interpreter

◆ ngcppCOM_FILEBASE

#define ngcppCOM_FILEBASE   420

set file publisher base name

◆ ngcppCOM_FILEPATH

#define ngcppCOM_FILEPATH   421

set file publisher path name

◆ ngcppCOM_FLUSHOUT

#define ngcppCOM_FLUSHOUT   417

flush all output data queues

◆ ngcppCOM_GETDPATH

#define ngcppCOM_GETDPATH   430

get local data path

◆ ngcppCOM_H_SIZE

#define ngcppCOM_H_SIZE   8

Command message header size

◆ ngcppCOM_ICONF

#define ngcppCOM_ICONF   411

get configuration

◆ ngcppCOM_MCLOSE

#define ngcppCOM_MCLOSE   416

remove shared memory data

◆ ngcppCOM_MSET

#define ngcppCOM_MSET   405

download data-set

◆ ngcppCOM_MSYNC

#define ngcppCOM_MSYNC   409

data-set synchronization

◆ ngcppCOM_NOP

#define ngcppCOM_NOP   400

no operation (ping)

◆ ngcppCOM_PAUSE

#define ngcppCOM_PAUSE   426

pause

◆ ngcppCOM_PCONF

#define ngcppCOM_PCONF   412

get parameter configuration

◆ ngcppCOM_PROT_ENDIAN

#define ngcppCOM_PROT_ENDIAN   ngcbBIG_ENDIAN

Communication protocol endianess

◆ ngcppCOM_PSET

#define ngcppCOM_PSET   406

set parameter

◆ ngcppCOM_PSTAT

#define ngcppCOM_PSTAT   407

get parameter status

◆ ngcppCOM_PSYNC

#define ngcppCOM_PSYNC   408

parameter synchronization

◆ ngcppCOM_RECVSTAT

#define ngcppCOM_RECVSTAT   433

get errno and status of receiver

◆ ngcppCOM_REV

#define ngcppCOM_REV   431

get revision

◆ ngcppCOM_RSTCNT

#define ngcppCOM_RSTCNT   418

reset counters

◆ ngcppCOM_SETDPATH

#define ngcppCOM_SETDPATH   429

set local data path

◆ ngcppCOM_SIMDELAY

#define ngcppCOM_SIMDELAY   432

set simulation start delay

◆ ngcppCOM_SIMTIME

#define ngcppCOM_SIMTIME   415

set simulation interval time

◆ ngcppCOM_START

#define ngcppCOM_START   401

start acquisition

◆ ngcppCOM_STAT

#define ngcppCOM_STAT   403

get processing status

◆ ngcppCOM_STOP

#define ngcppCOM_STOP   402

stop acquisition

◆ ngcppCOM_TIME

#define ngcppCOM_TIME   404

get on-line calcualtion time

◆ ngcppCOM_TIMEOUT

#define ngcppCOM_TIMEOUT   -3

System timeout command

◆ ngcppCOM_USRCMD

#define ngcppCOM_USRCMD   423

execute ext. user command

◆ ngcppCOM_VERBOSE

#define ngcppCOM_VERBOSE   414

switch verbose mode on/off

◆ ngcppCOMMAND_PORT

#define ngcppCOMMAND_PORT   8001

Default command port

◆ ngcppDARK

#define ngcppDARK   4

dark frame (bias)

◆ ngcppDATA_PORT

#define ngcppDATA_PORT   0

Default data port

◆ ngcppDATA_PROT_ENDIAN

#define ngcppDATA_PROT_ENDIAN   ngcbBIG_ENDIAN

Data protocol endianess

◆ ngcppDATA_PROTOCOL

#define ngcppDATA_PROTOCOL   0x1

Data protocol version

◆ ngcppDATA_SERVICE_ABORT

#define ngcppDATA_SERVICE_ABORT   3

abort request

◆ ngcppDATA_SERVICE_CONNECT

#define ngcppDATA_SERVICE_CONNECT   2

connection request

◆ ngcppDATA_SERVICE_EXIT

#define ngcppDATA_SERVICE_EXIT   0

exit data server

◆ ngcppDATA_SERVICE_EXPORT

#define ngcppDATA_SERVICE_EXPORT   7

export internals

◆ ngcppDATA_SERVICE_KILL

#define ngcppDATA_SERVICE_KILL   9

kill clienty

◆ ngcppDATA_SERVICE_PING

#define ngcppDATA_SERVICE_PING   1

ping request

◆ ngcppDATA_SERVICE_PROCNAME

#define ngcppDATA_SERVICE_PROCNAME   5

get process name

◆ ngcppDATA_SERVICE_PROTOCOL

#define ngcppDATA_SERVICE_PROTOCOL   8

get protocol version

◆ ngcppDATA_SERVICE_TYPEDEF

#define ngcppDATA_SERVICE_TYPEDEF   6

get defines types

◆ ngcppDATA_SERVICE_TYPES

#define ngcppDATA_SERVICE_TYPES   4

get frame types

◆ ngcppDEFAULT_TIMEOUT

#define ngcppDEFAULT_TIMEOUT   ngcppNO_TIMEOUT

Default timeout definition

◆ ngcppDTYPE_BYTE

#define ngcppDTYPE_BYTE   0

signed 8-bit integer

◆ ngcppDTYPE_INT16

#define ngcppDTYPE_INT16   3

signed 16-bit integer

◆ ngcppDTYPE_INT32

#define ngcppDTYPE_INT32   4

signed 32-bit integer

◆ ngcppDTYPE_INT64

#define ngcppDTYPE_INT64   5

signed 64-bit integer

◆ ngcppDTYPE_REAL32

#define ngcppDTYPE_REAL32   1

32-bit floating point

◆ ngcppDTYPE_REAL64

#define ngcppDTYPE_REAL64   2

64-bit floating point

◆ ngcppDTYPE_STRING

#define ngcppDTYPE_STRING   6

string

◆ ngcppDTYPE_UINT16

#define ngcppDTYPE_UINT16   7

unsigned 16-bit integer

◆ ngcppDYN_CMD_IVLD

#define ngcppDYN_CMD_IVLD   0

invalid command

◆ ngcppDYN_CMD_RESERVED

#define ngcppDYN_CMD_RESERVED   100

reserved command codes

◆ ngcppDYN_CMD_RESET

#define ngcppDYN_CMD_RESET   1

reset counters

◆ ngcppENV_COMMAND_PORT

#define ngcppENV_COMMAND_PORT   "NGCPP_CMD"

Command port environment variable

◆ ngcppENV_DATA_PATH

#define ngcppENV_DATA_PATH   "NGCPP_DPATH"

Data path environment variable

◆ ngcppENV_DATA_PORT

#define ngcppENV_DATA_PORT   "NGCPP_DATA"

Data port environment variable

◆ ngcppENV_DEVNAME

#define ngcppENV_DEVNAME   "NGCPP_DEV"

Acquisition device name environment variable

◆ ngcppENV_ERR_PORT

#define ngcppENV_ERR_PORT   "NGCPP_ERR"

Error port environment variable

◆ ngcppENV_HOST

#define ngcppENV_HOST   "NGCPP_HOST"

Acquisition process host environment variable

◆ ngcppERR_ALLOC

#define ngcppERR_ALLOC   406

allocation error

◆ ngcppERR_CMD

#define ngcppERR_CMD   414

command could not be handled

◆ ngcppERR_FILIO

#define ngcppERR_FILIO   415

file i/o error

◆ ngcppERR_GENERAL

#define ngcppERR_GENERAL   400

general error

◆ ngcppERR_HANDSHAKE_FRAME

#define ngcppERR_HANDSHAKE_FRAME   452

Frame handshake error

◆ ngcppERR_HANDSHAKE_REQ

#define ngcppERR_HANDSHAKE_REQ   451

Request handshake error

◆ ngcppERR_INIT

#define ngcppERR_INIT   413

init failure

◆ ngcppERR_IO_ERROR

#define ngcppERR_IO_ERROR   -1

i/o error

◆ ngcppERR_IO_OVERFLOW

#define ngcppERR_IO_OVERFLOW   -3

input FIFO overflow

◆ ngcppERR_IO_OVERRUN

#define ngcppERR_IO_OVERRUN   -2

ring buffer overrun

◆ ngcppERR_NO_ERR

#define ngcppERR_NO_ERR   0

successfull operation

◆ ngcppERR_NO_VALID_COMMAND

#define ngcppERR_NO_VALID_COMMAND   401

no valid command

◆ ngcppERR_NOT_STARTED

#define ngcppERR_NOT_STARTED   410

acquisition is not started

◆ ngcppERR_OPEN

#define ngcppERR_OPEN   405

open error

◆ ngcppERR_OUT_OF_RANGE

#define ngcppERR_OUT_OF_RANGE   402

out of range

◆ ngcppERR_PORT

#define ngcppERR_PORT   0

Default error-stack port

◆ ngcppERR_STARTED

#define ngcppERR_STARTED   409

acquisition is already started

◆ ngcppERR_SYSTEM

#define ngcppERR_SYSTEM   411

system call

◆ ngcppERR_TERM

#define ngcppERR_TERM   407

error terminating dma transfers

◆ ngcppERR_TIMEOUT

#define ngcppERR_TIMEOUT   412

timeout

◆ ngcppERR_UNKNOWN

#define ngcppERR_UNKNOWN   408

unknown element

◆ ngcppFAILURE

#define ngcppFAILURE   -1

General failure

◆ ngcppFLATFIELD

#define ngcppFLATFIELD   1

flatfield data-set

◆ ngcppFRAME_ANY

#define ngcppFRAME_ANY   0xffffffff

any frame

◆ ngcppFRAME_APP

#define ngcppFRAME_APP   0x00000800

appl. specific type

◆ ngcppFRAME_DIT

#define ngcppFRAME_DIT   0x00000002

DIT frame

◆ ngcppFRAME_H_SIZE

#define ngcppFRAME_H_SIZE   (int)(sizeof(ngcpp_hdr_t) - ngcppAPP_HDR_SIZE)

Frame header size (without application data)

◆ ngcppFRAME_HCYCLE1

#define ngcppFRAME_HCYCLE1   0x00000080

chop half-cycle 1 frame

◆ ngcppFRAME_HCYCLE2

#define ngcppFRAME_HCYCLE2   0x00000100

chop half-cycle 2 frame

◆ ngcppFRAME_HX_SIZE

#define ngcppFRAME_HX_SIZE   24

Frame header extension size (for backwards compatibility)

◆ ngcppFRAME_INT

#define ngcppFRAME_INT   0x00000004

INT frame

◆ ngcppFRAME_INTERMEDIATE_DIT

#define ngcppFRAME_INTERMEDIATE_DIT   0x00000010

intermediata DIT frame

◆ ngcppFRAME_INTERMEDIATE_INT

#define ngcppFRAME_INTERMEDIATE_INT   0x00000008

intermediata INT frame

◆ ngcppFRAME_NAME_ANY

#define ngcppFRAME_NAME_ANY   "ANY_FRAME"

◆ ngcppFRAME_NAME_APP

#define ngcppFRAME_NAME_APP   "APP"

◆ ngcppFRAME_NAME_DIT

#define ngcppFRAME_NAME_DIT   "DIT"

◆ ngcppFRAME_NAME_HCYCLE1

#define ngcppFRAME_NAME_HCYCLE1   "HCYCLE1"

◆ ngcppFRAME_NAME_HCYCLE2

#define ngcppFRAME_NAME_HCYCLE2   "HCYCLE2"

◆ ngcppFRAME_NAME_INT

#define ngcppFRAME_NAME_INT   "INT"

◆ ngcppFRAME_NAME_INTERMEDIATE_DIT

#define ngcppFRAME_NAME_INTERMEDIATE_DIT   "INTERM-DIT"

◆ ngcppFRAME_NAME_INTERMEDIATE_INT

#define ngcppFRAME_NAME_INTERMEDIATE_INT   "INTERM-INT"

◆ ngcppFRAME_NAME_NO_FRAME

#define ngcppFRAME_NAME_NO_FRAME   "NO_FRAME"

◆ ngcppFRAME_NAME_NOTIFY

#define ngcppFRAME_NAME_NOTIFY   "NOTIFY"

◆ ngcppFRAME_NAME_SAMPLE

#define ngcppFRAME_NAME_SAMPLE   "SAMPLE"

◆ ngcppFRAME_NAME_SDV

#define ngcppFRAME_NAME_SDV   "STDEV"

◆ ngcppFRAME_NAME_SNAPSHOT

#define ngcppFRAME_NAME_SNAPSHOT   "SNAPSHOT"

◆ ngcppFRAME_NAME_TRACK

#define ngcppFRAME_NAME_TRACK   "TRACK"

◆ ngcppFRAME_NO_FRAME

#define ngcppFRAME_NO_FRAME   0x00000000

no frame

◆ ngcppFRAME_NOTIFY

#define ngcppFRAME_NOTIFY   0x00000400

notification frame

◆ ngcppFRAME_SAMPLE

#define ngcppFRAME_SAMPLE   0x00000040

sample frame

◆ ngcppFRAME_SDV

#define ngcppFRAME_SDV   0x00000020

standard deviation frame

◆ ngcppFRAME_SNAPSHOT

#define ngcppFRAME_SNAPSHOT   0x00000001

snapshot frame

◆ ngcppFRAME_TRACK

#define ngcppFRAME_TRACK   0x00000200

tracking frame

◆ ngcppFSTAT_EXP_END

#define ngcppFSTAT_EXP_END   0x2

end exposurer

◆ ngcppFSTAT_ROT90

#define ngcppFSTAT_ROT90   0x4

rotated by 90 deg

◆ ngcppFSTAT_TRANSFERRING

#define ngcppFSTAT_TRANSFERRING   0x1

transferring state

◆ ngcppLog

#define ngcppLog ( ...)
Value:
ngcbLog(__VA_ARGS__)
#define ngcbLog(...)
Definition ngcb.h:119

Verbose output function

◆ ngcppMAX_COMBUFSIZE

#define ngcppMAX_COMBUFSIZE   (8 * 1024)

Command buffer size in bytes

◆ ngcppMAX_DATA_CON

#define ngcppMAX_DATA_CON   16

Maximum number of data connections

◆ ngcppMAX_DEV

#define ngcppMAX_DEV   12

Maximum number of DMA devices

◆ ngcppMAX_FRAME_TYPES

#define ngcppMAX_FRAME_TYPES   32

Maximum numbert of frame types

◆ ngcppMAX_PARAMSIZE

#define ngcppMAX_PARAMSIZE   256

Maximum number of dynamic parameters

◆ ngcppMAX_USRCMD_LEN

#define ngcppMAX_USRCMD_LEN   1024

Maximum size of the user command/reply

◆ ngcppMES_BACKREPLY

#define ngcppMES_BACKREPLY   0x0003

reply message

◆ ngcppMES_COMMAND

#define ngcppMES_COMMAND   0xffff

command message

◆ ngcppMES_DATA

#define ngcppMES_DATA   0x0002

data message

◆ ngcppMES_MESSAGE

#define ngcppMES_MESSAGE   0x0004

unformatted message

◆ ngcppMODE_NORMAL

#define ngcppMODE_NORMAL   2

input via DMA

◆ ngcppMODE_PLAYBACK

#define ngcppMODE_PLAYBACK   4

play-back mode

◆ ngcppMODE_SIM

#define ngcppMODE_SIM   1

built in simulator

◆ ngcppMODE_STREAM

#define ngcppMODE_STREAM   3

streaming mode

◆ ngcppNO_TIMEOUT

#define ngcppNO_TIMEOUT   0

No timeout definition

◆ ngcppNUM_COM

#define ngcppNUM_COM   (434 - ngcppCOM_NOP)

◆ ngcppNUM_ELE

#define ngcppNUM_ELE ( x)
Value:
((sizeof x) / (sizeof x[0]))

Macro computing the number of elements in vector

◆ ngcppPARAM_TYPE_FLOAT

#define ngcppPARAM_TYPE_FLOAT   1

32-bit floating point parameter

◆ ngcppPARAM_TYPE_INT

#define ngcppPARAM_TYPE_INT   4

32-bit integer parameter

◆ ngcppPARAM_TYPE_LOGICAL

#define ngcppPARAM_TYPE_LOGICAL   0

Logical parameter (32-bit)

◆ ngcppQUEUE_BLOCK

#define ngcppQUEUE_BLOCK   1

Block until queue is free

◆ ngcppQUEUE_SETERR

#define ngcppQUEUE_SETERR   2

Raise error flag and skip frame if output queue is full

◆ ngcppQUEUE_SKIP

#define ngcppQUEUE_SKIP   0

Skip frame if output queue is full

◆ ngcppRAW_RTD

#define ngcppRAW_RTD   SHORT

Raw data type (RTD)

◆ ngcppREP_H_SIZE

#define ngcppREP_H_SIZE   10

Reply message header size

◆ ngcppSTAT_FAILURE

#define ngcppSTAT_FAILURE   4

failure state

◆ ngcppSTAT_IDLE

#define ngcppSTAT_IDLE   0

idle state

◆ ngcppSTAT_PROCESSING

#define ngcppSTAT_PROCESSING   2

processing state

◆ ngcppSTAT_READY

#define ngcppSTAT_READY   3

ready state

◆ ngcppSTAT_WAITING

#define ngcppSTAT_WAITING   1

waiting state

◆ ngcppTFLAG_HOLD

#define ngcppTFLAG_HOLD   0x00000002

hold frame

◆ ngcppTFLAG_LOCAL

#define ngcppTFLAG_LOCAL   0x00000004

store to local media

◆ ngcppTFLAG_SKIP

#define ngcppTFLAG_SKIP   0x00000000

skip frame

◆ ngcppTFLAG_TRANSFER

#define ngcppTFLAG_TRANSFER   0x00000001

transfer frame

◆ ngcppTMODE_INTR

#define ngcppTMODE_INTR   0x10

interruptible

◆ ngcppTMODE_NOTRANS

#define ngcppTMODE_NOTRANS   0x00

no transfer

◆ ngcppTMODE_SCIENCE

#define ngcppTMODE_SCIENCE   0x01

science transfer mode

◆ ngcppTMODE_VIDEO

#define ngcppTMODE_VIDEO   0x02

video transfer mode

Typedef Documentation

◆ ngcpp_link_t

typedef int ngcpp_link_t

Command link type

◆ ngcpp_t

typedef unsigned short ngcpp_t

Raw data type (signed or unsigened 16 bit integer)

◆ ngcppMSG_CLOSE

typedef int(* ngcppMSG_CLOSE) (int link, ngcpp_link_cfg_t *cfg)

Close function type

◆ ngcppMSG_CMD

typedef int(* ngcppMSG_CMD) (int link, ngcpp_cmd_t command, char *erms)

Command function type

◆ ngcppMSG_OPEN

typedef int(* ngcppMSG_OPEN) (const char *name, ngcpp_link_cfg_t *cfg, char *erms)

Open function type

◆ ngcppMSG_REPLY

typedef int(* ngcppMSG_REPLY) (int link, ngcpp_rep_t *reply, char *erms)

Reply function type

◆ ngcppPARAM_NAMES

typedef char ngcppPARAM_NAMES[ngcppMAX_PARAMSIZE][256]

Parameter names array type

◆ ngcppPARAM_VALUES

typedef int ngcppPARAM_VALUES[ngcppMAX_PARAMSIZE]

Parameter values array type

Function Documentation

◆ ngcppAbort()

int ngcppAbort ( ngcpp_link_t link,
char * erms )

Abort all.

◆ ngcppAbortReq()

int ngcppAbortReq ( const char * srvName,
int processId,
char * erms )

Abort the current frame request.modehronously. The process waiting for the data reply receives immediately a reply. If there was no valid frame when the other side received the abort request, the frame type is set to ngcppFRAME_NO_FRAME and one must neither skip nor accept the frame. If the frame was ready when the other side received the abort command, the valid frame header is sent and the receiving process has to either skip or accept the frame.

◆ ngcppAcceptFrame()

int ngcppAcceptFrame ( int socket,
ngcpp_req_t request,
ngcpp_frame_t * frame,
char * erms )

Accept the frame returned by ngcppWaitNextFrame(). The frame is transferred and read into a buffer. The frame header might be different from the the one received with ngcppWaitDataReply() or ngcppWait/PollNextFrame() (because of windowing or if an error occured in the meantime).

◆ ngcppAcceptFrameN()

int ngcppAcceptFrameN ( int socket,
ngcpp_req_t request,
ngcpp_frame_t * frame,
int partNo,
int numDiv,
char * erms )

Accept the frame returned by ngcppWaitNextFrame(). The frame partition (partNo) out of numDiv partiions is transferred and read into a buffer supplied by the frame structure. The frame header might be different from the the one received with ngcppWaitDataReply() or ngcppWait/PollNextFrame() (because of windowing or if an error occured in the meantime).

◆ ngcppAckFrame()

int ngcppAckFrame ( int socket,
ngcpp_req_t request,
ngcpp_hdr_t * header,
char * erms )

Acknowledge the frame for later transfer.

◆ ngcppAllocCom()

int ngcppAllocCom ( char * erms)

Allocate the command/reply buffers.

◆ ngcppAttachData()

int ngcppAttachData ( char * srvName,
size_t bufferSize,
char * erms )

Attach the calling process to acquisition process internal buffers for processing support.

◆ ngcppCancelReq()

int ngcppCancelReq ( int socket,
int processId,
char * erms )

Aborts the current frame request, wait for the data reply and skip an eventually incoming frame. This can only be called from within the same process that has sent the request before.

◆ ngcppChanSelect()

int ngcppChanSelect ( ngcpp_link_t link,
int chan,
char * erms )

Select the DMA interface channel in use.

◆ ngcppCloseComLine()

int ngcppCloseComLine ( ngcpp_link_t link)

Close link to the ngcpp command interpreter.

◆ ngcppComExec()

int ngcppComExec ( ngcpp_link_t * link,
const char * srvName,
const char * cmd,
int xt,
int debugPort,
int * pid,
int * cmdPortReal,
char * erms )

Execute the command cmd on host. If the flag xt is one, verbose output is done on a new x-terminal. If the debugPort is greater than zero, the verbose output is sent to this port. The function returns a process id (pid) to be used for ngcppComKill() and the actual command server port.

◆ ngcppComKill()

int ngcppComKill ( const char * host,
int pid,
char * erms )

Terminates the acquisition process on host.

◆ ngcppConnect()

int ngcppConnect ( ngcpp_link_t * link,
const char * srvName,
char * erms )

Connect to the ngcpp command interpreter.

◆ ngcppDataConnect()

int ngcppDataConnect ( const char * srvName,
int * socket,
int transferMode,
int processId,
char * erms )

Opens a connection to the ngcpp data server. The transferMode can be one of:

ngcppTMODE_SCIENCE - science transfer (for storage)
ngcppTMODE_VIDEO   - video transfer (not queued)

The server name must be given as string: "host:port"

◆ ngcppDataDisconnect()

int ngcppDataDisconnect ( int socket)

Diconnects from the ngcpp data server

◆ ngcppDataInit()

void ngcppDataInit ( void )

Initialize the data interface

◆ ngcppDataProtocol()

int ngcppDataProtocol ( const char * srvName,
int * version,
char * erms )

Return the actual data-protocol version used by the acquisition process.

◆ ngcppDetachData()

int ngcppDetachData ( char * srvName)

Detach the calling process from the acquisition process internal buffers.

◆ ngcppEnd()

int ngcppEnd ( ngcpp_link_t link,
char * erms )

Set a flag for the acquisition process to transfer an intermediate result as measurement frame.

◆ ngcppErr()

void ngcppErr ( char * erms,
int errorId )

Write the error message assigned to errorId to the string in erms.

◆ ngcppExec()

int ngcppExec ( const char * host,
const char * cmd,
int xt,
int debugPort,
int * pid,
char * erms )

Execute an acquisition process on a remote host host. If xt-flag is one, verbose output is done on a new x-terminal. If the debugPort is greater than zero, the verbose output is sent to this port. The function returns a process id (pid) to be used for ngcppComKill().

◆ ngcppExecUsrCmd()

int ngcppExecUsrCmd ( ngcpp_link_t link,
const char * usrCommand,
char * usrReply,
char * erms )

Executes an external user command handler at the acquisition process. The command/reply string are passed unchecked.

◆ ngcppExitComServer()

int ngcppExitComServer ( ngcpp_link_t link,
char * erms )

Terminates the ngcpp command interpreter.

◆ ngcppFlushOutputQueue()

int ngcppFlushOutputQueue ( ngcpp_link_t link,
char * erms )

Flush all data in the output queue(s).

◆ ngcppGetConfig()

int ngcppGetConfig ( ngcpp_link_t link,
ngcpp_cfg_t * config,
char * erms )

Receive the current configuration from the ngcpp command interpreter.

◆ ngcppGetDataPath()

int ngcppGetDataPath ( ngcpp_link_t link,
char * path,
char * erms )

Retrieve the path where data is stored to local media.

◆ ngcppGetDataPort()

int ngcppGetDataPort ( ngcpp_link_t link,
int * dataPort,
char * erms )

Retrieve the port number of the data server.

◆ ngcppGetErrPort()

int ngcppGetErrPort ( ngcpp_link_t link,
int * errPort,
char * erms )

Retrieve the port number of the error-stack server.

◆ ngcppGetFrameBuf()

int ngcppGetFrameBuf ( int socket,
ngcpp_frame_t * frame,
size_t offset,
size_t size,
char * erms )

Store data (size bytes) in the frame buffer at the given offset.

◆ ngcppGetFrameNameByType()

int ngcppGetFrameNameByType ( int type,
char * name,
char * erms )

Set the frame name to the name associated with the type. If the type cannot be resolved ngcppFAILURE is returned.

◆ ngcppGetFrameTypeByName()

int ngcppGetFrameTypeByName ( int * type,
const char * name,
char * erms )

Set the frame type to the type associated with the given name. If the name cannot be resolved ngcppFAILURE is returned.

◆ ngcppGetFrameTypes()

int ngcppGetFrameTypes ( const char * srvName,
int * types,
char * erms )

Return the currently available frames. A frame-type is available, if types & frame-type != 0.

◆ ngcppGetParam()

int ngcppGetParam ( ngcpp_link_t link,
const char * paramName,
int * value,
char * erms )

Gets the value of paramater definde by paramName. The parameter names are retrieved with ngcppGetParamSetup().

◆ ngcppGetParamBuf()

int ngcppGetParamBuf ( ngcpp_link_t link,
int * paramBuf,
char * erms )

Receive a parameter buffer from the command interpreter.

◆ ngcppGetParamSetup()

int ngcppGetParamSetup ( ngcpp_link_t link,
int * numParame,
ngcppPARAM_NAMES paramName,
ngcppPARAM_VALUES paramBuf,
char * erms )

Receive the currently loaded parameter setup from the ngcpp command interpreter.

◆ ngcppGetParamType()

int ngcppGetParamType ( ngcpp_link_t link,
const char * paramName,
int * type,
char * erms )

Return the type of the parameter.

◆ ngcppGetRecvStat()

int ngcppGetRecvStat ( ngcpp_link_t link,
int * err,
int * stat,
char * erms )

Get errno and status of the receiver devices.

◆ ngcppGetReply()

int ngcppGetReply ( ngcpp_link_t link,
ngcpp_rep_t * reply,
char * erms )

Get reply

◆ ngcppGetRev()

int ngcppGetRev ( ngcpp_link_t link,
int * rev1,
int * rev2,
char * erms )

Receive pre-processor revision

◆ ngcppGetStatus()

int ngcppGetStatus ( ngcpp_link_t link,
int * status,
char * erms )

Receive the current status from the ngcpp command interpreter.

◆ ngcppGetTime()

int ngcppGetTime ( ngcpp_link_t link,
double * loopTime,
double * calcTime,
char * erms )

Receive calculation- and input-loop time (in us/pixel) from the ngcpp command interpreter.

◆ ngcppGetTypeDef()

int ngcppGetTypeDef ( const char * srvName,
int * nTypes,
ngcpp_ftype * frameType,
char * erms )

Receive the frame-type definitions from the data-server. The maximum number of defined frametypes is ngcppMAX_FRAME_TYPES. The function returns an array of frame-type structures. The sturcture array has to be allocated by the calling function. One has to distinguish between defined frametypes and available frametypes, which are a subset of the defined frametypes (the defined frametypes might be enabled/disabled via commands).

◆ ngcppHdrInit()

void ngcppHdrInit ( ngcpp_hdr_t * hdr)

Initialize frame header structure

◆ ngcppImportData()

ngcpp_hdr_simple * ngcppImportData ( void ** buffer,
char * erms )

Import a buffer. The buffer must have been allocated by the caller. The address is stored for the later ngcppReturnData call. The function returns a pointer to the header of a buffer to be processed.

◆ ngcppKill()

int ngcppKill ( const char * host,
int pid,
char * erms )

Send a termination signal to the acquisition process on host.

◆ ngcppKillDataClient()

int ngcppKillDataClient ( const char * srvName,
int id,
char * erms )

Terminate data client

◆ ngcppLcuRdAddr()

int ngcppLcuRdAddr ( ngcpp_link_t link,
unsigned int addr,
unsigned int * value,
char * erms )

Read value from register address.

◆ ngcppLcuRdPci()

int ngcppLcuRdPci ( ngcpp_link_t link,
unsigned int addr,
unsigned int * value,
char * erms )

Read value from PCI configuration space address.

◆ ngcppLcuWrAddr()

int ngcppLcuWrAddr ( ngcpp_link_t link,
unsigned int addr,
unsigned int value,
char * erms )

Write value to register address.

◆ ngcppLcuWrPci()

int ngcppLcuWrPci ( ngcpp_link_t link,
unsigned int addr,
unsigned int value,
char * erms )

Write value to PCI configuration space address.

◆ ngcppMemClose()

int ngcppMemClose ( ngcpp_link_t link,
char * erms )

Removes a shared memory data area.

◆ ngcppMemSync()

int ngcppMemSync ( ngcpp_link_t link,
int id,
char * erms )

Swaps the datasets for id (id can be or'ed).

◆ ngcppOpenComLine()

int ngcppOpenComLine ( const char * srvName,
ngcpp_link_t * link,
char * erms )

Open link to the ngcpp command interpreter. The link has to be used for all further command calls.

◆ ngcppParamSync()

int ngcppParamSync ( ngcpp_link_t link,
int timeout,
char * erms )

If parameters are changed, their values are overtaken synchronously with ngcppParamSync(). If this function is called, before the previous synchronization is actually done, the function will block until the specified timeout. The timeout is given in seconds. A value of zero specifies "no timeout".

◆ ngcppPause()

int ngcppPause ( ngcpp_link_t link,
int pauseFlag,
char * erms )

Suspend the data acquisition if pause is one. If pause is zero the acquistion continues.

◆ ngcppPing()

int ngcppPing ( ngcpp_link_t link,
char * erms )

Ping the ngcpp command interpreter (NOP command).

◆ ngcppPingDataSrv()

int ngcppPingDataSrv ( const char * srvName,
char * procName,
char * erms )

Checks if the data server is alive. The actual acquisition process name is returned in procName.

◆ ngcppPollNextFrame()

int ngcppPollNextFrame ( int socket,
ngcpp_req_t request,
ngcpp_hdr_t * header,
char * erms )

Checks if a frame matching the request is available. If a frame is available it returns the frame header, and the output on the other end will block until the frame is either skipped or accepted. If no frame is available the frame type in the header is set to ngcppFRAME_NO_FRAME. request.blocking should be set to zero when using this function.

◆ ngcppResetCnt()

int ngcppResetCnt ( ngcpp_link_t link,
char * erms )

Set a flag for the acquisition process to reset all processing counters.

◆ ngcppReturnData()

int ngcppReturnData ( char * erms)

Return the processed buffer to the acquisition process.

◆ ngcppScale()

void ngcppScale ( ngcpp_frame_t * frame)

Scale the frame if frame->h.scal != 1.

◆ ngcppScale2Real()

void ngcppScale2Real ( ngcpp_frame_t * frame)

Scale the frame and convert to 32-bit floating point.

◆ ngcppScaleBuf()

void ngcppScaleBuf ( void * dest,
ngcpp_frame_t * frame )

Scale frame if frame->h.scal != 1 and store the result in a separate destination buffer.

◆ ngcppScaleBuf2Real()

void ngcppScaleBuf2Real ( void * dest,
ngcpp_frame_t * frame )

Scale frame, convert to 32-bit floating point and store the result in a separate destination buffer.

◆ ngcppSelectCom()

int ngcppSelectCom ( const char * comType,
char * erms )

Select the command link API.

◆ ngcppSendCommand()

int ngcppSendCommand ( ngcpp_link_t link,
ngcpp_cmd_t command,
char * erms )

Send command

◆ ngcppSendDataRequest()

int ngcppSendDataRequest ( int socket,
ngcpp_req_t request,
char * erms )

Send a request to the data output server.

◆ ngcppSendDynCmd()

int ngcppSendDynCmd ( ngcpp_link_t link,
int cmdCode,
int timeout,
char * erms )

Send dynamic command.

◆ ngcppSetChipOffset()

int ngcppSetChipOffset ( ngcpp_link_t link,
int startX,
int startY,
char * erms )

Set the offset of the readout window within the chip (startX, startY start with 1).

◆ ngcppSetDataPath()

int ngcppSetDataPath ( ngcpp_link_t link,
const char * path,
char * erms )

Set the path where data is stored to local media.

◆ ngcppSetFilePubBase()

int ngcppSetFilePubBase ( ngcpp_link_t link,
char * baseName,
char * erms )

Change the file publishing sequence base-name. Header information (frame-type, counter) is appended to the basename.

◆ ngcppSetFilePubPath()

int ngcppSetFilePubPath ( ngcpp_link_t link,
int id,
char * path,
char * erms )

Change the storage path of a file publisher.

◆ ngcppSetParam()

int ngcppSetParam ( ngcpp_link_t link,
const char * paramName,
int value,
char * erms )

Sets the paramater paramName to the given value. The parameter names are retrieved with ngcppGetParamSetup().

◆ ngcppSetParamBuf()

int ngcppSetParamBuf ( ngcpp_link_t link,
int * paramBuf,
char * erms )

Send a parameter buffer to the command interpreter.

◆ ngcppSetSimStartDelay()

int ngcppSetSimStartDelay ( ngcpp_link_t link,
int simTime,
char * erms )

Set the simulation start delay (in ms) of the built-in simulator.

◆ ngcppSetSimTime()

int ngcppSetSimTime ( ngcpp_link_t link,
int simTime,
char * erms )

Set the simulation interval (in ms) of the built-in simulator.

◆ ngcppSkipFrame()

int ngcppSkipFrame ( int socket,
char * erms )

Skip the frame returned by ngcppWaitNextFrame().

◆ ngcppStart()

int ngcppStart ( ngcpp_link_t link,
char * erms )

Start the data acquisition.

◆ ngcppStop()

int ngcppStop ( ngcpp_link_t link,
char * erms )

Stop the data acquisition.

◆ ngcppTimeout()

int ngcppTimeout ( ngcpp_link_t link,
int seconds,
char * erms )

Sets the timout for command replies.

◆ ngcppUploadBuf()

int ngcppUploadBuf ( ngcpp_link_t link,
char * buf,
int id,
int size,
int blockSize,
char * erms )

Sets buffer in user reserved memory at the offset position. If blockSize is greater than the maximum command buffer size, the buffer is transferred via a raw socket.

◆ ngcppVerbose()

int ngcppVerbose ( ngcpp_link_t link,
int vflag,
char * erms )

Switches verbose mode off if vflag is zero, otherwise verbose mode is switched on.

◆ ngcppWaitDataReply()

int ngcppWaitDataReply ( int socket,
ngcpp_hdr_t * header,
char * erms )

Wait for a reply from the data output server.

◆ ngcppWaitNextFrame()

int ngcppWaitNextFrame ( int socket,
ngcpp_req_t request,
ngcpp_hdr_t * header,
char * erms )

Wait for the next (valid) frame matching the request. The frame header is filled with the frame meta data. The output on the other end will block until the frame is either skipped or accepted. If the frametype is ngcppFRAME_NO_FRAME skip/accept must not be done.

Variable Documentation

◆ ngcppCmdTcpClient

ngcpp_cmd_client_api ngcppCmdTcpClient
extern

Command client i/o API for TCP/IP socket communication

◆ ngcppEndian

int ngcppEndian
extern

Endianess

◆ ngcppSigMask

ngcb_sig_t ngcppSigMask
extern

Signal mask function

◆ ngcppSys

ngcpp_cmd_client_api* ngcppSys
extern

Command client i/o interface API