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

Macros

#define TSSCR_VERSION   "0.0.1"
 

Functions

void event_cb_client (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_len, void *user_data)
 Clients Teonet Events callback. More...
 
void event_cb_server (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_len, void *user_data)
 Servers Teonet Events callback. More...
 
void event_cb (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_len, void *user_data)
 Common Teonet Events callback. More...
 
int main (int argc, char **argv)
 Main Subscribe example function. More...
 

Detailed Description

Macro Definition Documentation

#define TSSCR_VERSION   "0.0.1"
Examples:
teosscr.c.

Referenced by main().

Function Documentation

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

Common Teonet Events callback.

Parameters
kePointer to ksnetEvMgrClass
eventTeonet event selected in ksnetEvMgrEvents enum
dataEvents data
data_lenData length
user_dataUser data selected in ksnetEvMgrInitPort() function
Examples:
teosscr.c.

References teonet_cfg::app_argv, EV_K_STARTED, event_cb_client(), event_cb_server(), and ksnetEvMgrClass::teo_cfg.

Referenced by main().

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

Clients Teonet Events callback.

Parameters
kePointer to ksnetEvMgrClass
eventTeonet event selected in ksnetEvMgrEvents enum
dataEvents data
data_lenData length
user_dataUser data selected in ksnetEvMgrInitPort() function
Examples:
teosscr.c.

References teonet_cfg::app_argv, CMD_USER, data, ksnCorePacketData::data, EV_K_CONNECTED, EV_K_RECEIVED, EV_K_SUBSCRIBE, EV_K_TIMER, ksnCorePacketData::from, ksnetEvMgrClass::kc, ksnCoreClass::kco, ksnCoreSendCmdto(), ksnCommandClass::ksscr, rd, ksnetEvMgrClass::teo_cfg, and teoSScrSubscribe().

Referenced by event_cb().

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

Servers Teonet Events callback.

Parameters
kePointer to ksnetEvMgrClass
eventTeonet event selected in ksnetEvMgrEvents enum
dataEvents data
data_lenData length
user_dataUser data selected in ksnetEvMgrInitPort() function
Examples:
teosscr.c.

References ksnCorePacketData::cmd, CMD_USER, data, ksnCorePacketData::data, ksnCorePacketData::data_len, EV_K_DISCONNECTED, EV_K_RECEIVED, free(), ksnCorePacketData::from, ksnCorePacketData::from_len, ksnetEvMgrClass::kc, ksnCoreClass::kco, ksnCommandClass::ksscr, malloc(), rd, teoSScrSend(), and teoSScrUnSubscription().

Referenced by event_cb().

int main ( int  argc,
char **  argv 
)