This can be done in a node dispatch routine. Variables of note:
- osc\_message\_in\_argc : how many arguments in the typetag section
- osc\_message\_in\_len : total message length
- p\_osc_message\_in : pointer to start of message
- p\_osc_message\_in\_tt : pointer to start of typetags (after magic comma)
- p\_osc_message\_in\_data : pointer to start of data section
For figuring out which method was matched in a large tree of nodes:
- osc\_match\_depth : depth of tree at match
- osc\_match\_index : offset of match at each depth
Also, the index of the current depth match is the first argument to the dispatch method (byte i)
// actually enable the hardware feature here...
OpenUSART(...);
} else if(v == 0 && ttl_enabled == 1) {
// turn off the hardware feature here...
CloseUSART();
ttl_enabled = 0;
}
}
}
# Packing
Sending OSC messages is extremely easy, but is less simple than in a high-level language implementation. The address and typetag strings must be formatted by hand.