TwiceAsNice  2019-02-18
Typedefs | Functions
IE Functions: Functions drivers call to register with the INDI event utilities.

Callbacks are called when a read on a file descriptor will not block. More...

Typedefs

typedef void() IE_CBF(int readfiledes, void *userpointer)
 Signature of a callback. More...
 
typedef void() IE_TCF(void *userpointer)
 Signature of a timeout caller. More...
 
typedef void() IE_WPF(void *userpointer)
 Signature of a work procedure function. More...
 
typedef void() IE_CBF(int readfiledes, void *userpointer)
 
typedef void() IE_TCF(void *userpointer)
 
typedef void() IE_WPF(void *userpointer)
 

Functions

int IEAddCallback (int readfiledes, IE_CBF *fp, void *userpointer)
 Register a new callback, fp, to be called with userpointer as argument when readfiledes is ready. More...
 
void IERmCallback (int callbackid)
 Remove a callback function. More...
 
int IEAddTimer (int millisecs, IE_TCF *fp, void *userpointer)
 Register a new timer function, fp, to be called with ud as argument after ms. More...
 
void IERmTimer (int timerid)
 Remove the timer with the given timerid, as returned from IEAddTimer. More...
 
int IEAddWorkProc (IE_WPF *fp, void *userpointer)
 Add a new work procedure, fp, to be called with ud when nothing else to do. More...
 
void IERmWorkProc (int workprocid)
 Remove a work procedure. More...
 
int IEDeferLoop (int maxms, int *flagp)
 
int IEDeferLoop0 (int maxms, int *flagp)
 

Detailed Description

Callbacks are called when a read on a file descriptor will not block.

Timers are called once after a specified interval. Workprocs are called when there is nothing else to do. The "Add" functions return a unique id for use with their corresponding "Rm" removal function. An arbitrary pointer may be specified when a function is registered which will be stored and forwarded unchanged when the function is later invoked.

Typedef Documentation

◆ IE_CBF [1/2]

IE_CBF

Signature of a callback.

◆ IE_CBF [2/2]

typedef void() IE_CBF(int readfiledes, void *userpointer)

◆ IE_TCF [1/2]

typedef void() IE_TCF(void *userpointer)

◆ IE_TCF [2/2]

IE_TCF

Signature of a timeout caller.

◆ IE_WPF [1/2]

IE_WPF

Signature of a work procedure function.

◆ IE_WPF [2/2]

typedef void() IE_WPF(void *userpointer)

Function Documentation

◆ IEAddCallback()

int IEAddCallback ( int  readfiledes,
IE_CBF fp,
void *  userpointer 
)

Register a new callback, fp, to be called with userpointer as argument when readfiledes is ready.

Parameters
readfiledesfile descriptor.
fpa pointer to the callback function.
userpointera pointer to be passed to the callback function when called.
Returns
a unique callback id for use with IERmCallback().

◆ IEAddTimer()

int IEAddTimer ( int  millisecs,
IE_TCF fp,
void *  userpointer 
)

Register a new timer function, fp, to be called with ud as argument after ms.

Add to list in order of decreasing time from epoch, ie, last entry runs soonest. The timer will only invoke the callback function once. You need to call addTimer again if you want to repeat the process.

Parameters
millisecstimer period in milliseconds.
fpa pointer to the callback function.
userpointera pointer to be passed to the callback function when called.
Returns
a unique id for use with IERmTimer().

◆ IEAddWorkProc()

int IEAddWorkProc ( IE_WPF fp,
void *  userpointer 
)

Add a new work procedure, fp, to be called with ud when nothing else to do.

Parameters
fpa pointer to the work procedure callback function.
userpointera pointer to be passed to the callback function when called.
Returns
a unique id for use with IERmWorkProc().

◆ IEDeferLoop()

int IEDeferLoop ( int  maxms,
int *  flagp 
)

◆ IEDeferLoop0()

int IEDeferLoop0 ( int  maxms,
int *  flagp 
)

◆ IERmCallback()

void IERmCallback ( int  callbackid)

Remove a callback function.

Parameters
callbackidthe callback ID returned from IEAddCallback()

◆ IERmTimer()

void IERmTimer ( int  timerid)

Remove the timer with the given timerid, as returned from IEAddTimer.

Parameters
timeridthe timer callback ID returned from IEAddTimer().

◆ IERmWorkProc()

void IERmWorkProc ( int  workprocid)

Remove a work procedure.

Parameters
workprocidThe unique ID for the work procedure to be removed.