next up previous contents
Next: ddu_attach Up: User Routines Previous: User Routines

ddu_init

Usage: int ddu_init(char *fname, struct fifo_mode fmode );
Returns: 0 if good status, -1 if bad status.
This routine attaches a process to a fifo, from where it can receive events. If the fifo already exists, it attaches to it. If the event is a producer, the fifo name is ``INPUT''.

 
		  fname 		 Fifoname.

fmode fifo mode (C structure fifo_mode )

The C structure fifo_mode is defined as follows:
 
		  struct fifo_mode {

int mode;

int wait;

int prescale;

int xsuser;

int *p2ctl;

};

with:
 
		  fmode.mode 		  FMODE_ALL : every event

FMODE_COND : only events that match *p2ctl

FMODE_ONREQ : gets only events if asks for

fmode.wait DD_WAIT_SLEEP : falls asleep if no event available

DD_WAIT_ASYNC : returns with error code if no event

available

fmode.prescale prescale factor: gets only every n-th event (default: 1)

fmode.suser FMODE_SINGLE_USER: only one process is allowed

to attach to the fifo

FMODE_MULTI_USER: multiple processes are allowed

to attach to the fifo

*p2ctl pointer to the four control words (see below for details).



Online software development
Thu Mar 14 10:35:53 EST 1996