|
Teonet library
0.4.7
|
Macros | |
| #define | APP_VERSION "0.0.1" |
| #define | CMD_T 129 |
| #define | INTERVAL 0.25 |
| #define | BUFFER_SIZE 128 |
| #define | NUM_TO_SHOW 10000 |
| #define | SERVER_PEER ke->teo_cfg.app_argv[1] |
Typedefs | |
| typedef struct cmd_data | cmd_data |
| Simple load test data structure. More... | |
Functions | |
| void | sendCmdT (ksnetEvMgrClass *ke, const char *to, int id, int type) |
| ! Server flag: 1 - this host is a server, 0 - this host is a client More... | |
| void | event_cb (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_length, void *user_data) |
| Teonet event handler. More... | |
| int | main (int argc, char **argv) |
| Main application function. More... | |
| #define APP_VERSION "0.0.1" |
Referenced by main().
| #define BUFFER_SIZE 128 |
Referenced by sendCmdT().
| #define CMD_T 129 |
Referenced by event_cb(), and sendCmdT().
| #define INTERVAL 0.25 |
Referenced by main().
| #define NUM_TO_SHOW 10000 |
Referenced by event_cb(), and sendCmdT().
| #define SERVER_PEER ke->teo_cfg.app_argv[1] |
Referenced by event_cb().
| typedef struct cmd_data cmd_data |
Simple load test data structure.
| void event_cb | ( | ksnetEvMgrClass * | ke, |
| ksnetEvMgrEvents | event, | ||
| void * | data, | ||
| size_t | data_length, | ||
| void * | user_data | ||
| ) |
Teonet event handler.
| ke | |
| event | |
| data | |
| data_length | |
| user_data |
References ksnCorePacketData::cmd, CMD_T, ksnCorePacketData::data, DEBUG, ERROR_M, EV_K_CONNECTED, EV_K_RECEIVED, EV_K_STOPPED, EV_K_TIMER, ksnCorePacketData::from, ksn_printf, ksn_puts, NUM_TO_SHOW, rd, sendCmdT(), and SERVER_PEER.
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Main application function.
| argc | |
| argv |
References ksnetEvMgrAppParam::app_argc, ksnetEvMgrAppParam::app_argv, ksnetEvMgrAppParam::app_descr, APP_PARAM, APP_VERSION, event_cb(), INTERVAL, ke, ksnetEvMgrInitPort(), ksnetEvMgrRun(), ksnetEvMgrSetCustomTimer(), READ_CONFIGURATION, READ_OPTIONS, teoGetLibteonetVersion(), teoSetAppType(), and teoSetAppVersion().
| void sendCmdT | ( | ksnetEvMgrClass * | ke, |
| const char * | to, | ||
| int | id, | ||
| int | type | ||
| ) |
! Server flag: 1 - this host is a server, 0 - this host is a client
Send command with simple load test data
| ke | Pointer to ksnetEvMgrClass |
| to | Peer name |
| id | Packet id |
| type | Packet type: 0 - request, 1 - response |
References BUFFER_SIZE, CMD_T, DEBUG, ksnetEvMgrClass::kc, ksn_printf, ksnCoreSendCmdto(), and NUM_TO_SHOW.
Referenced by event_cb().