This documentation describes only the C API and aura's internal stuff. If you are looking for documentation on lua bindings - it's not here. See luadoc.
TODO: Describe that we need to include <aura/aura.h>, pkg-config and the rest of the stuff
You start working with aura by opening a node using aura_open() or aura_vopen(). struct aura_node represents a remote device connected via some transport. The transport layer is irrelevant here. Opening a node does NOT mean that the node is immediately ready to accept calls - opening only starts the process of connecting to a node which may take a little time depending on the transport. Even more, a node can go offline and online multiple times and normally this doesn't cause an application to terminate (although, you can always do so).
You can associate your own data with a node using aura_set_userdata() and retrieve the pointer with aura_get_userdata()
When you are done working with the node, you just call aura_close() and all the memory is freed. Simple, huh? Get over to to the next section to learn how to do something useful with a node apart from opening and closing.
void aura_close |
( |
struct aura_node * |
node | ) |
|
static int aura_get_status |
( |
struct aura_node * |
node | ) |
|
|
inlinestatic |
Retrieve current node status.
- Parameters
-
- Returns
Definition at line 41 of file inlines.h.
static void* aura_get_userdata |
( |
struct aura_node * |
node | ) |
|
|
inlinestatic |
struct aura_node* aura_open |
( |
const char * |
name, |
|
|
const char * |
opts |
|
) |
| |
Open a remote node. Transport arguments are passed in a variadic fasion. The number and format is transport-dependent.
- Parameters
-
name | transport name |
opts | transport-specific options. Refer to transport docs for details |
- Returns
- node instance or NULL
Definition at line 34 of file aura.c.
static void aura_set_userdata |
( |
struct aura_node * |
node, |
|
|
void * |
udata |
|
) |
| |
|
inlinestatic |
Set user data associated with this node. Just a convenient way to attach an arbitary pointer to this node. See aura_get_userdata()
- Parameters
-
Definition at line 17 of file inlines.h.