12#error This is a C++ include file and cannot be used from plain C
85 char **queue =
static_cast<char **
>(malloc(nq *
sizeof(
char **)));
90 size_t size =
static_cast<size_t>(nx) *
static_cast<size_t>(ny);
108 if (queue[i] == NULL)
111 for (j=0;j<i;j++) free(queue[j]);
127 frame.h.dtype = dtype;
128 frame.h.ftype = ftype;
187 virtual int Connect(
const char *name,
char *erms);
193 virtual int Alloc(
unsigned char **buffer,
int n,
size_t size,
char *erms);
196 virtual void Free(
unsigned char **buffer,
int n);
199 virtual int Clear(
char *erms);
211 virtual int NextData(
unsigned char *buffer,
size_t size, uint64_t *ts,
215 virtual int Process(
int instance,
void *buffer,
char *erms);
224 virtual int CheckParam(
int *param,
int running,
int *idx);
227 virtual void Command(
const char *command,
char *reply);
233 int RunApp(
int argc,
char **argv,
char *erms);
239 void AddLog(
const char *msg);
Definition ngcbTHREAD.hpp:67
int numProc
Number of processors.
Definition ngcppAPP.hpp:166
virtual int Clear(char *erms)
Clear data fifos.
Definition ngcppAPP.cpp:415
virtual void AppStart()
Enter main loop callback.
Definition ngcppAPP.cpp:585
void TerminateProcesses()
Terminate application processes.
Definition ngcppAPP.cpp:554
void FailureOverrun(const char *msg)
Signal buffer overrun (error condition)
Definition ngcppAPP.cpp:580
virtual int Disconnect(char *erms)
Disconnect from camera.
Definition ngcppAPP.cpp:368
virtual int Process(int instance, void *buffer, char *erms)
Process data (multithreaded, if numProc is greater than 1)
Definition ngcppAPP.cpp:436
ngcppAPP()
Application constructor.
Definition ngcppAPP.cpp:349
ngcbSEM * semData
Counting data buffer semaphore.
Definition ngcppAPP.hpp:172
void Failure(const char *msg)
Signal error condition.
Definition ngcppAPP.cpp:575
virtual int StopAcquisition(char *erms)
Stop image acquisition.
Definition ngcppAPP.cpp:419
int RunApp(int argc, char **argv, char *erms)
Run the application.
Definition ngcppAPP.cpp:457
virtual int NextData(unsigned char *buffer, size_t size, uint64_t *ts, char *erms)
Get next data buffer from camera.
Definition ngcppAPP.cpp:427
virtual int Configure(char *erms)
Configuration call-back.
Definition ngcppAPP.cpp:364
virtual int Connect(const char *name, char *erms)
Connect to camera.
Definition ngcppAPP.cpp:366
virtual int StartAcquisition(char *erms)
Start image acquisition.
Definition ngcppAPP.cpp:417
virtual void Free(unsigned char **buffer, int n)
Free circular buffer.
Definition ngcppAPP.cpp:400
virtual ~ngcppAPP()
Destructor.
Definition ngcppAPP.cpp:362
virtual void ResetCounters(int cnt)
Call-back to reset the application counters.
Definition ngcppAPP.cpp:444
virtual int CheckParam(int *param, int running, int *idx)
Check parameter range.
Definition ngcppAPP.cpp:446
virtual void Command(const char *command, char *reply)
Command handler.
Definition ngcppAPP.cpp:452
virtual void SkipData()
Skip next data buffer.
Definition ngcppAPP.cpp:421
bool mainLoopRunning
Main loop is running.
Definition ngcppAPP.hpp:175
int nx
x-dimension
Definition ngcppAPP.hpp:160
virtual void Publish()
Publisher call-back, executed after all data-processes have finished.
Definition ngcppAPP.cpp:442
int ny
y-dimension
Definition ngcppAPP.hpp:163
virtual int Alloc(unsigned char **buffer, int n, size_t size, char *erms)
Allocate circular buffer.
Definition ngcppAPP.cpp:370
int skipData
Enable data-skip call-back.
Definition ngcppAPP.hpp:169
void AddLog(const char *msg)
Add a message to the logging service.
Definition ngcppAPP.cpp:570
#define ngcppDTYPE_UINT16
Definition ngcppInt.h:220
#define ngcppDTYPE_INT64
Definition ngcppInt.h:218
#define ngcppDTYPE_REAL64
Definition ngcppInt.h:215
#define ngcppDTYPE_INT16
Definition ngcppInt.h:216
#define ngcppDTYPE_INT32
Definition ngcppInt.h:217
#define ngcppDTYPE_REAL32
Definition ngcppInt.h:214
int ngcppPublish(int syncMode, ngcppFRAME *frame)
Definition ngcppData.c:687
void * ngcppMalloc(size_t size)
Definition ngcppOpen.c:477
void ngcppInitFrame(ngcppFRAME *frame, char **array, int n)
Definition ngcppData.c:1154
char * Ptr()
Return current data pointer.
Definition ngcppAPP.hpp:148
void Publish(int flag)
Publish.
Definition ngcppAPP.hpp:151
ngcppFRAME frame
Definition ngcppAPP.hpp:74
ngcppFRAME_QUEUE()
Constructor.
Definition ngcppAPP.hpp:77
virtual ~ngcppFRAME_QUEUE()
Destructor.
Definition ngcppAPP.hpp:142
ngcppFRAME_QUEUE(int ftype, int dtype, int nx, int ny, int nq, int scal=1)
Initializing Constructor.
Definition ngcppAPP.hpp:84
int Valid()
Check if frame is valid.
Definition ngcppAPP.hpp:145
Process synchronization structure.
Definition ngcppAPP.hpp:30
ngcbSEM * semAck
Definition ngcppAPP.hpp:32
pthread_t thid
Definition ngcppAPP.hpp:33
virtual ~ngcpp_thr_t()
Destructor.
Definition ngcppAPP.hpp:66
ngcpp_thr_t()
Constructor.
Definition ngcppAPP.hpp:37
int idx
Definition ngcppAPP.hpp:34
ngcpp_thr_t(const ngcpp_thr_t &other)
Copy constructor.
Definition ngcppAPP.hpp:46
ngcbSEM * semSync
Definition ngcppAPP.hpp:31
ngcpp_thr_t & operator=(const ngcpp_thr_t &other)
Operator =.
Definition ngcppAPP.hpp:52