7 int main(int argc, char ** argv)
9 EVEL_ERR_CODES evel_rc = EVEL_SUCCESS;
10 EVENT_HEADER * heartbeat = NULL;
12 printf("\nHello AT&T Vendor Event world!\n");
17 fprintf(stderr, "Usage: %s <FQDN>|<IP address> <port>\n", argv[0]);
21 /***************************************************************************/
23 /***************************************************************************/
24 if (evel_initialize(argv[1], /* FQDN */
25 atoi(argv[2]), /* Port */
26 NULL, /* optional path */
27 NULL, /* optional topic */
31 EVEL_SOURCE_VIRTUAL_MACHINE, /* Source type */
32 "EVEL training demo", /* Role */
35 fprintf(stderr, "\nFailed to initialize the EVEL library!!!\n");
40 printf("Initialization completed\n");
43 /***************************************************************************/
44 /* Send a heartbeat just to show we're alive! */
45 /***************************************************************************/
46 heartbeat = evel_new_heartbeat();
47 if (heartbeat != NULL)
49 evel_rc = evel_post_event(heartbeat);
50 if (evel_rc != EVEL_SUCCESS)
52 printf("Post failed %d (%s)", evel_rc, evel_error_string());
57 printf("New heartbeat failed");
60 /***************************************************************************/
62 /***************************************************************************/
65 printf("Terminated\n");