13#error This is a C++ include file and cannot be used from plain C
86 char **queue =
static_cast<char **
>(malloc(nq *
sizeof(
char **)));
91 size_t size =
static_cast<size_t>(nx) *
static_cast<size_t>(ny);
109 if (queue[i] == NULL)
112 for (j=0;j<i;j++) free(queue[j]);
128 frame.h.dtype = dtype;
129 frame.h.ftype = ftype;
188 virtual int Connect(
const char *name,
char *erms);
194 virtual int Alloc(
unsigned char **buffer,
int n,
size_t size,
char *erms);
197 virtual void Free(
unsigned char **buffer,
int n);
200 virtual int Clear(
char *erms);
212 virtual int NextData(
unsigned char *buffer,
size_t size, uint64_t *ts,
216 virtual int Process(
int instance,
void *buffer,
char *erms);
225 virtual int CheckParam(
int *param,
int running,
int *idx);
228 virtual void Command(
const char *command,
char *reply);
234 int RunApp(
int argc,
char **argv,
char *erms);
240 void AddLog(
const char *msg);
Definition ngcbTHREAD.hpp:68
int numProc
Number of processors.
Definition ngcppAPP.hpp:167
virtual int Clear(char *erms)
Clear data fifos.
Definition ngcppAPP.cpp:416
virtual void AppStart()
Enter main loop callback.
Definition ngcppAPP.cpp:586
void TerminateProcesses()
Terminate application processes.
Definition ngcppAPP.cpp:555
void FailureOverrun(const char *msg)
Signal buffer overrun (error condition)
Definition ngcppAPP.cpp:581
virtual int Disconnect(char *erms)
Disconnect from camera.
Definition ngcppAPP.cpp:369
virtual int Process(int instance, void *buffer, char *erms)
Process data (multithreaded, if numProc is greater than 1)
Definition ngcppAPP.cpp:437
ngcppAPP()
Application constructor.
Definition ngcppAPP.cpp:350
ngcbSEM * semData
Counting data buffer semaphore.
Definition ngcppAPP.hpp:173
void Failure(const char *msg)
Signal error condition.
Definition ngcppAPP.cpp:576
virtual int StopAcquisition(char *erms)
Stop image acquisition.
Definition ngcppAPP.cpp:420
int RunApp(int argc, char **argv, char *erms)
Run the application.
Definition ngcppAPP.cpp:458
virtual int NextData(unsigned char *buffer, size_t size, uint64_t *ts, char *erms)
Get next data buffer from camera.
Definition ngcppAPP.cpp:428
virtual int Configure(char *erms)
Configuration call-back.
Definition ngcppAPP.cpp:365
virtual int Connect(const char *name, char *erms)
Connect to camera.
Definition ngcppAPP.cpp:367
virtual int StartAcquisition(char *erms)
Start image acquisition.
Definition ngcppAPP.cpp:418
virtual void Free(unsigned char **buffer, int n)
Free circular buffer.
Definition ngcppAPP.cpp:401
virtual ~ngcppAPP()
Destructor.
Definition ngcppAPP.cpp:363
virtual void ResetCounters(int cnt)
Call-back to reset the application counters.
Definition ngcppAPP.cpp:445
virtual int CheckParam(int *param, int running, int *idx)
Check parameter range.
Definition ngcppAPP.cpp:447
virtual void Command(const char *command, char *reply)
Command handler.
Definition ngcppAPP.cpp:453
virtual void SkipData()
Skip next data buffer.
Definition ngcppAPP.cpp:422
bool mainLoopRunning
Main loop is running.
Definition ngcppAPP.hpp:176
int nx
x-dimension
Definition ngcppAPP.hpp:161
virtual void Publish()
Publisher call-back, executed after all data-processes have finished.
Definition ngcppAPP.cpp:443
int ny
y-dimension
Definition ngcppAPP.hpp:164
virtual int Alloc(unsigned char **buffer, int n, size_t size, char *erms)
Allocate circular buffer.
Definition ngcppAPP.cpp:371
int skipData
Enable data-skip call-back.
Definition ngcppAPP.hpp:170
void AddLog(const char *msg)
Add a message to the logging service.
Definition ngcppAPP.cpp:571
#define ngcppDTYPE_UINT16
Definition ngcppInt.h:221
#define ngcppDTYPE_INT64
Definition ngcppInt.h:219
#define ngcppDTYPE_REAL64
Definition ngcppInt.h:216
#define ngcppDTYPE_INT16
Definition ngcppInt.h:217
#define ngcppDTYPE_INT32
Definition ngcppInt.h:218
#define ngcppDTYPE_REAL32
Definition ngcppInt.h:215
int ngcppPublish(int syncMode, ngcppFRAME *frame)
Definition ngcppTransferQueue.c:688
void * ngcppMalloc(size_t size)
Definition ngcppOpen.c:478
void ngcppInitFrame(ngcppFRAME *frame, char **array, int n)
Definition ngcppTransferQueue.c:1155
char * Ptr()
Return current data pointer.
Definition ngcppAPP.hpp:149
void Publish(int flag)
Publish.
Definition ngcppAPP.hpp:152
ngcppFRAME frame
Definition ngcppAPP.hpp:75
ngcppFRAME_QUEUE()
Constructor.
Definition ngcppAPP.hpp:78
virtual ~ngcppFRAME_QUEUE()
Destructor.
Definition ngcppAPP.hpp:143
ngcppFRAME_QUEUE(int ftype, int dtype, int nx, int ny, int nq, int scal=1)
Initializing Constructor.
Definition ngcppAPP.hpp:85
int Valid()
Check if frame is valid.
Definition ngcppAPP.hpp:146
Process synchronization structure.
Definition ngcppAPP.hpp:31
ngcbSEM * semAck
Definition ngcppAPP.hpp:33
pthread_t thid
Definition ngcppAPP.hpp:34
virtual ~ngcpp_thr_t()
Destructor.
Definition ngcppAPP.hpp:67
ngcpp_thr_t()
Constructor.
Definition ngcppAPP.hpp:38
int idx
Definition ngcppAPP.hpp:35
ngcpp_thr_t(const ngcpp_thr_t &other)
Copy constructor.
Definition ngcppAPP.hpp:47
ngcbSEM * semSync
Definition ngcppAPP.hpp:32
ngcpp_thr_t & operator=(const ngcpp_thr_t &other)
Operator =.
Definition ngcppAPP.hpp:53