milk  1.01
Modular Image processing Library toolKit
processtools.h File Reference

Command line interface. More...

#include <semaphore.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sched.h>
Include dependency graph for processtools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PROCESSINFO
 
struct  PROCESSINFOLIST
 
struct  PROCESSINFODISP
 
struct  PROCINFOPROC
 
struct  STRINGLISTENTRY
 

Macros

#define PROCESSINFOLISTSIZE   10000
 
#define MAXNBSUBPROCESS   50
 
#define MAXNBCPU   100
 
#define PROCESSINFO_NBtimer   100
 
#define STRINGMAXLEN_PROCESSINFO_NAME   80
 
#define STRINGMAXLEN_PROCESSINFO_SRCFUNC   200
 
#define STRINGMAXLEN_PROCESSINFO_SRCFILE   200
 
#define STRINGMAXLEN_PROCESSINFO_TMUXNAME   100
 
#define STRINGMAXLEN_PROCESSINFO_STATUSMSG   200
 
#define STRINGMAXLEN_PROCESSINFO_LOGFILENAME   250
 
#define STRINGMAXLEN_PROCESSINFO_DESCRIPTION   200
 
#define PROCESSINFO_TRIGGERMODE_IMMEDIATE   0
 
#define PROCESSINFO_TRIGGERMODE_CNT0   1
 
#define PROCESSINFO_TRIGGERMODE_CNT1   2
 
#define PROCESSINFO_TRIGGERMODE_SEMAPHORE   3
 
#define PROCESSINFO_TRIGGERMODE_DELAY   4
 
#define PROCESSINFO_TRIGGERSTATUS_WAITING   1
 
#define PROCESSINFO_TRIGGERSTATUS_RECEIVED   2
 
#define PROCESSINFO_TRIGGERSTATUS_TIMEDOUT   3
 

Typedefs

typedef int errno_t
 

Functions

PROCESSINFOprocessinfo_setup (char *pinfoname, char descriptionstring[200], char msgstring[200], const char *functionname, const char *filename, int linenumber)
 
errno_t processinfo_error (PROCESSINFO *processinfo, char *errmsgstring)
 
errno_t processinfo_loopstart (PROCESSINFO *processinfo)
 
int processinfo_loopstep (PROCESSINFO *processinfo)
 
int processinfo_compute_status (PROCESSINFO *processinfo)
 
PROCESSINFOprocessinfo_shm_create (const char *pname, int CTRLval)
 
PROCESSINFOprocessinfo_shm_link (const char *pname, int *fd)
 
int processinfo_shm_close (PROCESSINFO *pinfo, int fd)
 
int processinfo_cleanExit (PROCESSINFO *processinfo)
 
int processinfo_SIGexit (PROCESSINFO *processinfo, int SignalNumber)
 
int processinfo_WriteMessage (PROCESSINFO *processinfo, const char *msgstring)
 
int processinfo_exec_start (PROCESSINFO *processinfo)
 
int processinfo_exec_end (PROCESSINFO *processinfo)
 
int processinfo_CatchSignals ()
 
int processinfo_ProcessSignals (PROCESSINFO *processinfo)
 
errno_t processinfo_waitoninputstream_init (PROCESSINFO *processinfo, imageID trigID, int triggermode, int semindexrequested)
 Set up input wait stream. More...
 
errno_t processinfo_waitoninputstream (PROCESSINFO *processinfo)
 Wait on a stream. More...
 
errno_t processinfo_update_output_stream (PROCESSINFO *processinfo, imageID outstreamID)
 Update ouput stream at completion of processinfo-enabled loop iteration. More...
 
errno_t processinfo_CTRLscreen ()
 

Detailed Description

Command line interface.

Command line interface (CLI) definitions and function prototypes

Bug:
No known bugs.

Command line interface (CLI) definitions and function prototypes

Function Documentation

◆ processinfo_CTRLscreen()

errno_t processinfo_CTRLscreen ( )

Purpose

Control screen for PROCESSINFO structures

Description

Relies on ncurses for display

Display

◆ processinfo_shm_create()

PROCESSINFO* processinfo_shm_create ( const char *  pname,
int  CTRLval 
)

Create PROCESSINFO structure in shared memory

The structure holds real-time information about a process, so its status can be monitored and controlled See structure PROCESSINFO in CLLIcore.h for details

◆ processinfo_update_output_stream()

errno_t processinfo_update_output_stream ( PROCESSINFO processinfo,
imageID  outstreamID 
)

Update ouput stream at completion of processinfo-enabled loop iteration.

◆ processinfo_waitoninputstream()

errno_t processinfo_waitoninputstream ( PROCESSINFO processinfo)

Wait on a stream.

◆ processinfo_waitoninputstream_init()

errno_t processinfo_waitoninputstream_init ( PROCESSINFO processinfo,
imageID  trigID,
int  triggermode,
int  semindexrequested 
)

Set up input wait stream.

Specify stream on which the loop process will be triggering, and what is the trigger mode.

The actual trigger mode may be different from the requested trigger mode.

The standard option should be tiggermode = PROCESSINFO_TRIGGERMODE_SEMAPHORE and semindex = -1, which will automatically find a suitable semaphore