aura  0.1
 All Data Structures Functions Variables Modules Pages
dummy-sync-evt-read.c
1 #include <aura/aura.h>
2 
3 
4 int main() {
5  slog_init(NULL, 18);
6 
7  int count = 5;
8  int ret;
9  struct aura_node *n = aura_open("dummy", NULL);
10  aura_wait_status(n, AURA_STATUS_ONLINE);
11 
12  struct aura_buffer *retbuf;
13  const struct aura_object *o;
14 
16 
17  while (count--) {
18  ret = aura_get_next_event(n, &o, &retbuf);
19  slog(0, SLOG_DEBUG, "evt get ret %d", ret);
20 
21  aura_hexdump("Out buffer", retbuf->data, retbuf->size);
22  aura_buffer_release(retbuf);
23  }
24 
25  aura_close(n);
26 
27  return 0;
28 }
29 
30 
int aura_get_next_event(struct aura_node *node, const struct aura_object **obj, struct aura_buffer **retbuf)
Definition: aura.c:753
void aura_wait_status(struct aura_node *node, int status)
Definition: aura.c:607
struct aura_node * aura_open(const char *name, const char *opts)
Definition: aura.c:34
int size
Definition: aura.h:337
void aura_enable_sync_events(struct aura_node *node, int count)
Definition: aura.c:711
void aura_buffer_release(struct aura_buffer *buf)
Definition: buffer.c:80
void aura_close(struct aura_node *node)
Definition: aura.c:102
char * data
Definition: aura.h:347