Teonet library
0.4.7
|
Macros | |
#define | TDB_VERSION "0.0.2" |
#define | APPNAME _ANSI_MAGENTA "teodb_ex" _ANSI_NONE |
#define | TEODB_PEER teo.getKe()->teo_cfg.app_argv[1] |
#define | TEODB_EX_KEY "teo_db_ex" |
#define | TEST_KEY "test" |
#define | TEST_VALUE "{ \"name\": \"1\" }" |
Functions | |
void | event_cb (teo::Teonet &teo, teo::teoEvents event, void *data, size_t data_len, void *user_data) |
Callback Queue callback (the same as callback queue event). More... | |
int | main (int argc, char **argv) |
Main Teonet Database example function. More... | |
#define APPNAME _ANSI_MAGENTA "teodb_ex" _ANSI_NONE |
#define TDB_VERSION "0.0.2" |
Referenced by main().
#define TEODB_EX_KEY "teo_db_ex" |
Referenced by event_cb().
#define TEODB_PEER teo.getKe()->teo_cfg.app_argv[1] |
Referenced by event_cb().
#define TEST_KEY "test" |
Referenced by event_cb().
#define TEST_VALUE "{ \"name\": \"1\" }" |
Referenced by event_cb().
void event_cb | ( | teo::Teonet & | teo, |
teo::teoEvents | event, | ||
void * | data, | ||
size_t | data_len, | ||
void * | user_data | ||
) |
Callback Queue callback (the same as callback queue event).
This function calls at timeout or after ksnCQueExec calls
id | Calls ID |
type | Type: 0 - timeout callback; 1 - successful callback |
data | User data Teonet Events callback |
ke | Pointer to ksnetEvMgrClass |
event | Teonet Event (ksnetEvMgrEvents) |
data | Events data |
data_len | Data length |
user_data | Some user data (may be set in ksnetEvMgrInitPort()) |
References CMD_D_GET, CMD_D_LIST, CMD_D_SET, EV_K_CONNECTED, teo::Teonet::getPacket(), NUM_RECORDS_TO_SHOW, rd, TEODB_EX_KEY, TEODB_PEER, TEST_KEY, and TEST_VALUE.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Main Teonet Database example function.
argc | Number of arguments |
argv | Arguments array |
References APP_PARAM, event_cb(), READ_CONFIGURATION, READ_OPTIONS, TDB_VERSION, and VERSION.