<udp_local_server> ‐ The set up of a UDP server
Name | Type | Defaults |
---|---|---|
id | STRING | Empty string |
local_port | INTEGER | 1979 |
input_message_ stack_depth | INTEGER | 30 |
receive_format | STRING (OSC, Plain) | Plain |
OSC_endian_reversal | BOOLEAN | true |
receive_prefix | STRING | Empty string |
offset_UDP_message_ received | INTEGER | 0 |
carbon_copy | STRING | Empty string |
UDP_message_ acknowledgement | BOOLEAN | false |
acknowledge_prefix | STRING | Empty string |
UDP_message_trace | BOOLEAN | false |
receive_ID | BOOLEAN | true |
OSC_duplicate_removal | BOOLEAN | true |
This element defines the parameters of a UDP server.
The string value of the local_port attribute defines the local port of the UDP local server (in VC).
The string value of the receive_format attribute defines the encoding format for input messages as explained in the description of the udp_remote_client element. In the Plain format, the message is made of the message string. In the OSC format the message is built as indicated by Figure 3-1 depending on whether it is made of a string or a structured OSC message.
The boolean value of the OSC_endian_reversal attribute defines whether the encoding of numbers has to be reversed upon OSC message reception. More details about little vs. big endian order is given the description of the udp_remote_client.
The integer value of the input_message_stack_ depth attribute defines the depth of the input message stack used to store input messages before their processing.
The string values of the receive_prefix and acknowledge_prefix attributes define the prefix strings that are concatenated to input and acknowledgement messages.
The integer value of the offset_UDP_message_received is used to access the message content of received messages in OSC format by adding an offset to the standard 20-character long prefix.
The string value of the carbon_copy attribute defines the ID of a udp_remote_client to which a copy of all the messages received by the server is automatically sent.
If the boolean value of the UDP_message_acknowledgement attribute is true, the server stores the ID of messages that are received with the acknowledge_prefix string. The ID of these messages is accessed by udp_remote_clients with UDP_message_acknowledgement attribute set to true in order to in order to make sure that a message has been received before sending another one. The boolean value of the UDP_message_trace attribute enables the output of emitted and received messages to the console.
The boolean value of the receive_ID attribute defines whether or not the message is expected to contain a numerical ID just after the receive prefix. Numerical IDs can be used to check message reception order and reception acknowledgement.
Duplicate OSC incoming messages are removed in order to process only the latest message with a given ID. (The duplicate removal only considers the address of OSC messages. Duplicates with different parameter values will be removed.) In order to avoir OSC message duplicate removal the OSC_duplicate_removal attribute should be set to false. For a selective duplicate removal of OSC messages, messages with OSC addresses that are prefixed with an '_' character such as /_NodeSize will not be removed even if the OSC_duplicate_removal attribute is true.
None.
The example below defines a UDP server at the local port 1979. Acknowledgement messages are processed by this server. They must be prefixed by the string graphic. Input message stack can contain up to 100 messages. Receive format is OSC and duplicate messages are not removed. Input message strings are prefixed by the string sound and are not expected to contain a message ID. Received messages are in the core OSC format and no offset is required to access the message string. Input message content is displayed on the console. A copy of each input message is forwarded to the udp_remote_client named superviser.
<udp_local_server id="port1979" local_port="1979" UDP_message_acknowledgement="true" acknowledge_prefix="graphic " input_message_stack_depth="100" receive_prefix="sound " receive_format="OSC" offset_UDP_message_received="0" UDP_message_trace="true" carbon_copy="superviser" OSC_endian_reversal="false" receive_ID="false" OSC_duplicate_removal="false" />