<target> ‐ An action target
The target of a command is the set of node(s) that receive the action or the set of client(s) that receive the message when this command is executed. There are two types of targets: nodes and UDP clients. A target node is any node in a scene graph including the environment node that is defined in the configuration file. Target nodes correspond to single_node or multiple_nodes values of the type attribute. Target hosts correspond to single_host or multiple_hosts values of the type attribute.
In the case of node target, the value of the value attribute is a string that must be the id of at least one node in the scene graph. If more than one node has this id and if the type is multiple_nodes, there are as many target nodes as nodes with this id in the scene graph.
Wildcarding can be used to define the IDs of the referenced nodes. There are currently two meta-characters supported for wildcarding: * that stands for any sequence of characters (possibly empty) and ? that matches any single character. For instance, class.?.*new matches the strings class.1.local.new, class.2.new, and class.a.duplicate.new.
If the action is send_message_udp and if the value of the type attribute is single_host or multiple_hosts, the target string must be the ID of a udp_remote_client defined in the configuration file.
None.
The following examples are correct targets:
<target type="single_node" value="#snode sphere 1" /> <target type="multiple_hosts" value="sound_synthe" />
Targets of type single_node define the target node of a command. The string value of the value attribute defines the id of the target node. If there is more than one node in the scene graph with this id, the first node encountered in a depth-first traversal of the scene graph is chosen as unique target node.
The example below defines a message sent to the node named main sphere:
<send_message value="start sphere 3" /> <target type="single_node" value="#main sphere" /> </action>
If the action is send_message_udp, the target string must be the ID of a udp_remote_client defined in the configuration file.
The example below defines an action sent to the host named superviser:
<send_message_udp value="sound source 1" /> <target type="single_host" value="superviser" />
Targets of type multiple_nodes define the target nodes of a command. The string value of the value attribute defines the id of the targets node. If there is more than one node in the scene graph with this id, all the nodes in the scene graph with this id are selected as target nodes. If the argument string terminates with a * character, all the nodes with this prefix string are target nodes.
The example below defines an action sent to the node(s) named node sphere:
<set_node_attribute_value operator="="> <transformation x="((cos({#s5c2})*{#circrad})+{#circorig_x})" y="({#userheight}+0.20)" z="((sin({#s5c2})*{#circrad})+{#circorig_z})"/> </set_node_attribute_value> <target type="multiple_nodes" value="#node sphere" />
If the action is send_message_udp, the target string must be the ID of one or more udp_remote_client defined in the configuration file.
The string value of the value attribute defines the id of the udp_remote_clients. If there is more than one client defined in the configuration file with this id, all the clients with this id are selected as target hosts. If the argument string terminates with a * character, all the hosts with this prefix string are target hosts.
The example below defines an action sent to the hosts named superviser:
<send_message_udp value="send_message \"Key-P\" to \"#dummynode\"" /> <target type="multiple_hosts" value="superviser" />