|
mapper_device | mapper_link_device (mapper_link link, int idx) |
|
int | mapper_link_num_maps (mapper_link link) |
|
mapper_map * | mapper_link_maps (mapper_link link) |
|
mapper_id | mapper_link_id (mapper_link link) |
|
void | mapper_link_set_user_data (mapper_link link, const void *user_data) |
|
void * | mapper_link_user_data (mapper_link link) |
|
int | mapper_link_num_properties (mapper_link link) |
|
int | mapper_link_property (mapper_link link, const char *name, int *length, char *type, const void **value) |
|
int | mapper_link_property_index (mapper_link link, unsigned int index, const char **name, int *length, char *type, const void **value) |
|
int | mapper_link_set_property (mapper_link link, const char *name, int length, char type, const void *value, int publish) |
|
int | mapper_link_remove_property (mapper_link link, const char *name) |
|
void | mapper_link_clear_staged_properties (mapper_link link) |
|
void | mapper_link_push (mapper_link link) |
|
mapper_link * | mapper_link_query_union (mapper_link *query1, mapper_link *query2) |
|
mapper_link * | mapper_link_query_intersection (mapper_link *query1, mapper_link *query2) |
|
mapper_link * | mapper_link_query_difference (mapper_link *query1, mapper_link *query2) |
|
mapper_link | mapper_link_query_index (mapper_link *query, int index) |
|
mapper_link * | mapper_link_query_next (mapper_link *query) |
|
mapper_link * | mapper_link_query_copy (mapper_link *query) |
|
void | mapper_link_query_done (mapper_link *query) |
|
void | mapper_link_print (mapper_link link) |
|
Links define network connections between pairs of devices.
◆ mapper_link_clear_staged_properties()
void mapper_link_clear_staged_properties |
( |
mapper_link |
link | ) |
|
Clear any staged property changes.
- Parameters
-
link | The link to operate on. |
◆ mapper_link_device()
mapper_device mapper_link_device |
( |
mapper_link |
link, |
|
|
int |
idx |
|
) |
| |
Get the mapper_device for a specific link endpoint.
- Parameters
-
link | The link to check. |
idx | The endpoint index, must be 0 or 1. |
- Returns
- The endpoints's device.
◆ mapper_link_id()
mapper_id mapper_link_id |
( |
mapper_link |
link | ) |
|
Get the unique id for a specific link.
- Parameters
-
- Returns
- The unique id assigned to this link.
◆ mapper_link_maps()
mapper_map* mapper_link_maps |
( |
mapper_link |
link | ) |
|
Return the list of maps associated with a given link.
- Parameters
-
- Returns
- A double-pointer to the first item in the list of results. Use mapper_map_query_next() to iterate.
◆ mapper_link_num_maps()
int mapper_link_num_maps |
( |
mapper_link |
link | ) |
|
Get the number of maps associated with a specific link endpoint.
- Parameters
-
- Returns
- The number of associated maps.
◆ mapper_link_num_properties()
int mapper_link_num_properties |
( |
mapper_link |
link | ) |
|
Get the total number of properties for a specific link.
- Parameters
-
- Returns
- The number of properties.
◆ mapper_link_print()
void mapper_link_print |
( |
mapper_link |
link | ) |
|
Helper to print the properties of a specific network link.
- Parameters
-
◆ mapper_link_property()
int mapper_link_property |
( |
mapper_link |
link, |
|
|
const char * |
name, |
|
|
int * |
length, |
|
|
char * |
type, |
|
|
const void ** |
value |
|
) |
| |
Look up a link property by name.
- Parameters
-
link | The link to check. |
name | The name of the property to retrieve. |
length | A pointer to a location to receive the vector length of the property value. (Required.) |
type | A pointer to a location to receive the type of the property value. (Required.) |
value | A pointer to a location to receive the address of the property's value. (Required.) |
- Returns
- Zero if found, otherwise non-zero.
◆ mapper_link_property_index()
int mapper_link_property_index |
( |
mapper_link |
link, |
|
|
unsigned int |
index, |
|
|
const char ** |
name, |
|
|
int * |
length, |
|
|
char * |
type, |
|
|
const void ** |
value |
|
) |
| |
Look up a link property by index. To iterate all properties, call this function from index=0, increasing until it returns zero.
- Parameters
-
link | The link to check. |
index | Numerical index of a map property. |
name | Address of a string pointer to receive the name of indexed property. May be zero. |
length | A pointer to a location to receive the vector length of the property value. (Required.) |
type | A pointer to a location to receive the type of the property value. (Required.) |
value | A pointer to a location to receive the address of the property's value. (Required.) |
- Returns
- Zero if found, otherwise non-zero.
◆ mapper_link_push()
void mapper_link_push |
( |
mapper_link |
link | ) |
|
Push any property changes out to the network.
- Parameters
-
link | The link to operate on. |
◆ mapper_link_query_copy()
mapper_link* mapper_link_query_copy |
( |
mapper_link * |
query | ) |
|
Copy a previously-constructed link query.
- Parameters
-
query | The previous link record pointer. |
- Returns
- A double-pointer to the copy of the list, or zero if none. Use mapper_link_query_next() to iterate.
◆ mapper_link_query_difference()
mapper_link* mapper_link_query_difference |
( |
mapper_link * |
query1, |
|
|
mapper_link * |
query2 |
|
) |
| |
Get the difference between two link queries (links matching query1 but NOT query2).
- Parameters
-
query1 | The first link query. |
query2 | The second link query. |
- Returns
- A double-pointer to the first item in a list of results. Use mapper_link_query_next() to iterate.
◆ mapper_link_query_done()
void mapper_link_query_done |
( |
mapper_link * |
query | ) |
|
Given a link record pointer returned from a previous link query, indicate that we are done iterating.
- Parameters
-
query | The previous link record pointer. |
◆ mapper_link_query_index()
mapper_link mapper_link_query_index |
( |
mapper_link * |
query, |
|
|
int |
index |
|
) |
| |
Given a link record pointer returned from a previous link query, get an indexed item in the list.
- Parameters
-
query | The previous link record pointer. |
index | The index of the list element to retrieve. |
- Returns
- A pointer to the link record, or zero if it doesn't exist.
◆ mapper_link_query_intersection()
mapper_link* mapper_link_query_intersection |
( |
mapper_link * |
query1, |
|
|
mapper_link * |
query2 |
|
) |
| |
Get the intersection of two link queries (links matching query1 AND query2).
- Parameters
-
query1 | The first link query. |
query2 | The second link query. |
- Returns
- A double-pointer to the first item in a list of results. Use mapper_link_query_next() to iterate.
◆ mapper_link_query_next()
mapper_link* mapper_link_query_next |
( |
mapper_link * |
query | ) |
|
Given a link record pointer returned from a previous link query, get the next item in the list.
- Parameters
-
query | The previous link record pointer. |
- Returns
- A double-pointer to the next link record in the list, or zero if no more maps.
◆ mapper_link_query_union()
mapper_link* mapper_link_query_union |
( |
mapper_link * |
query1, |
|
|
mapper_link * |
query2 |
|
) |
| |
Get the union of two link queries (link matching query1 OR query2).
- Parameters
-
query1 | The first link query. |
query2 | The second link query. |
- Returns
- A double-pointer to the first item in a list of results. Use mapper_link_query_next() to iterate.
◆ mapper_link_remove_property()
int mapper_link_remove_property |
( |
mapper_link |
link, |
|
|
const char * |
name |
|
) |
| |
Remove a property of a link.
- Parameters
-
link | The link to operate on. |
name | The name of the property to remove. |
- Returns
- 1 if property has been removed, 0 otherwise.
◆ mapper_link_set_property()
int mapper_link_set_property |
( |
mapper_link |
link, |
|
|
const char * |
name, |
|
|
int |
length, |
|
|
char |
type, |
|
|
const void * |
value, |
|
|
int |
publish |
|
) |
| |
Set an arbitrary property for a specific link. Changes to remote links will not take effect until synchronized with the network using mapper_link_push().
- Parameters
-
link | The link to modify. |
name | The name of the property to add. |
length | The length of value array. |
type | The property datatype. |
value | An array of property values. |
publish | 1 to publish property to network, 0 for local-only. |
- Returns
- 1 if property has been changed, 0 otherwise.
◆ mapper_link_set_user_data()
void mapper_link_set_user_data |
( |
mapper_link |
link, |
|
|
const void * |
user_data |
|
) |
| |
Associate a link with an arbitrary pointer.
- Parameters
-
link | The link to operate on. |
user_data | A pointer to user data to be associated. |
◆ mapper_link_user_data()
void* mapper_link_user_data |
( |
mapper_link |
link | ) |
|
Retrieve the arbitrary pointer associated with a link.
- Parameters
-
link | The link to operate on. |
- Returns
- A pointer associated with this link.