aura  0.1
 All Data Structures Functions Variables Modules Pages
dummy-cached-id.c
1 #include <aura/aura.h>
2 
3 int main() {
4  slog_init(NULL, 18);
5 
6  int ret;
7  struct aura_node *n = aura_open("dummy", NULL);
8  struct aura_buffer *retbuf;
9  aura_wait_status(n, AURA_STATUS_ONLINE);
10 
11  AURA_DECLARE_CACHED_ID(echo_id, n, "echo_u16");
12 
13  ret = aura_call_raw(n, echo_id, &retbuf, 0x0102);
14  slog(0, SLOG_DEBUG, "call ret %d", ret);
15  if (ret !=0)
16  return ret;
17 
18  aura_hexdump("Out buffer", retbuf->data, retbuf->size);
19  aura_buffer_release(retbuf);
20  aura_close(n);
21 
22  return 0;
23 }
24 
25 
void aura_wait_status(struct aura_node *node, int status)
Definition: aura.c:607
int aura_call_raw(struct aura_node *node, int id, struct aura_buffer **retbuf,...)
Definition: aura.c:626
struct aura_node * aura_open(const char *name, const char *opts)
Definition: aura.c:34
int size
Definition: aura.h:337
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