Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
teocquecpp.cpp File Reference
#include "teonet.hpp"

Macros

#define TCQUE_VERSION   "0.0.2"
 

Functions

void kq_cb (uint32_t id, int type, void *data)
 Callback Queue callback (the same as callback queue event). More...
 
void event_cb (teo::Teonet &teo, teo::teoEvents 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.2"
Examples:
teocquecpp.cpp.

Referenced by main().

Function Documentation

void event_cb ( teo::Teonet teo,
teo::teoEvents  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:
teocquecpp.cpp.

References cq, EV_K_CQUE_CALLBACK, EV_K_STARTED, EV_K_STOPPED, EV_K_TIMER, teo::Teonet::getCQueR(), kq_cb(), and teo::Teonet::stop().

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 inserted in teo::CQue::add
Examples:
teocquecpp.cpp.

Referenced by event_cb().

int main ( int  argc,
char **  argv 
)

Main QUEUE callback example function.

Parameters
argcNumber of arguments
argvArguments array
Returns
Examples:
teocquecpp.cpp.

References event_cb(), TCQUE_VERSION, and VERSION.