Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
teocque.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ev_mgr.h"

Macros

#define TCQUE_VERSION   "0.0.1"
 

Functions

void kq_cb (uint32_t id, int type, void *data)
 Callback Queue callback (the same as callback queue event). More...
 
void event_cb (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_len, void *user_data)
 Teonet Events callback. More...
 
int main (int argc, char **argv)
 Main QUEUE callback example function. More...
 

Detailed Description

Macro Definition Documentation

#define TCQUE_VERSION   "0.0.1"
Examples:
teocque.c.

Referenced by main().

Function Documentation

void event_cb ( ksnetEvMgrClass ke,
ksnetEvMgrEvents  event,
void *  data,
size_t  data_len,
void *  user_data 
)

Teonet Events callback.

Parameters
kePointer to ksnetEvMgrClass
eventTeonet Event (ksnetEvMgrEvents)
dataEvents data
data_lenData length
user_dataSome user data (may be set in ksnetEvMgrInitPort())
Examples:
teocque.c.

References cq, data, EV_K_CQUE_CALLBACK, EV_K_TIMER, ksnCQueData::id, ksnetEvMgrClass::kq, kq_cb(), ksnCQueAdd(), ksnCQueExec(), and ksnetEvMgrStop().

Referenced by main().

void kq_cb ( uint32_t  id,
int  type,
void *  data 
)

Callback Queue callback (the same as callback queue event).

This function calls at timeout or after ksnCQueExec calls

Parameters
idCalls ID
typeType: 0 - timeout callback; 1 - successful callback
dataUser data
Examples:
teocque.c.

Referenced by event_cb().

int main ( int  argc,
char **  argv 
)

Main QUEUE callback example function.

Parameters
argcNumber of arguments
argvArguments array
Returns
Examples:
teocque.c.

References event_cb(), ke, ksnet_printf(), ksnetEvMgrInit(), ksnetEvMgrRun(), ksnetEvMgrSetCustomTimer(), MESSAGE, READ_CONFIGURATION, READ_OPTIONS, TCQUE_VERSION, ksnetEvMgrClass::teo_cfg, and VERSION.