Maps define dataflow connections between sets of signals. A map consists of one or more sources, one destination, and properties which determine how the source data is processed.
◆ mpr_map_add_scope()
void mpr_map_add_scope |
( |
mpr_map | map, |
|
|
mpr_dev | device ) |
Add a scope to this map. Map scopes configure the propagation of signal instance updates across the map. Changes to remote maps will not take effect until synchronized with the distributed graph using mpr_obj_push()
.
- Parameters
-
map | The map to modify. |
device | Device to add as a scope for this map. After taking effect, this setting will cause instance updates originating at this device to be propagated across the map. |
◆ mpr_map_get_is_ready()
int mpr_map_get_is_ready |
( |
mpr_map | map | ) |
|
Detect whether a map is completely initialized.
- Parameters
-
- Returns
- Non-zero if map is completely initialized, zero otherwise.
◆ mpr_map_get_sig_idx()
int mpr_map_get_sig_idx |
( |
mpr_map | map, |
|
|
mpr_sig | signal ) |
Retrieve the index for a specific map signal.
- Parameters
-
map | The map to check. |
signal | The signal to find. |
- Returns
- The signal index, or
-1
if not found.
◆ mpr_map_get_sigs()
mpr_list mpr_map_get_sigs |
( |
mpr_map | map, |
|
|
mpr_loc | endpoint ) |
Retrieve a list of connected signals for a specific map.
- Parameters
-
map | The map to check. |
endpoint | The map endpoint, must be MPR_LOC_SRC , MPR_LOC_DST , or MPR_LOC_ANY . |
- Returns
- A list of results. Use
mpr_list_get_next()
to iterate.
◆ mpr_map_new()
mpr_map mpr_map_new |
( |
int | num_sources, |
|
|
mpr_sig * | sources, |
|
|
int | num_destinations, |
|
|
mpr_sig * | destinations ) |
Create a map between a set of signals. The map will not take effect until it has been added to the distributed graph using mpr_obj_push()
.
- Parameters
-
num_sources | The number of source signals in this map. |
sources | Array of source signal data structures. |
num_destinations | The number of destination signals in this map. Currently restricted to 1 . |
destinations | Array of destination signal data structures. |
- Returns
- A map data structure – either loaded from the graph (if the map already existed) or newly created. In the latter case the map will not take effect until it has been added to the distributed graph using
mpr_obj_push()
.
◆ mpr_map_new_from_str()
mpr_map mpr_map_new_from_str |
( |
const char * | expression, |
|
|
| ... ) |
Create a map between a set of signals using an expression string containing embedded format specifiers that are replaced by mpr_sig
values specified in subsequent additional arguments. The map will not take effect until it has been added to the distributed graph using mpr_obj_push()
.
- Parameters
-
expression | A string specifying the map expression to use when mapping source to destination signals. The format specifier "%x" is used to specify source signals and the "%y" is used to specify the destination signal. Please refer to the expression syntax documentation for more information. |
... | A sequence of additional mpr_sig arguments, one for each format specifier in the format string |
- Returns
- A map data structure – either loaded from the graph (if the map already existed) or newly created. Changes to the map will not take effect until it has been added to the distributed graph using
mpr_obj_push()
.
◆ mpr_map_refresh()
void mpr_map_refresh |
( |
mpr_map | map | ) |
|
Re-create stale map if necessary.
- Parameters
-
map | The map to operate on. |
◆ mpr_map_release()
void mpr_map_release |
( |
mpr_map | map | ) |
|
Remove a map between a set of signals.
- Parameters
-
◆ mpr_map_remove_scope()
void mpr_map_remove_scope |
( |
mpr_map | map, |
|
|
mpr_dev | device ) |
Remove a scope from this map. Map scopes configure the propagation of signal instance updates across the map. Changes to remote maps will not take effect until synchronized with the distributed graph using mpr_obj_push()
.
- Parameters
-
map | The map to modify. |
device | Device to remove as a scope for this map. After taking effect, this setting will cause instance updates originating at this device to be blocked from propagating across the map. |