// Send QTM OSC Command to server private void SendCommand(string cmd) { qtmCommand.ClearData(); qtmCommand.Append(cmd); LogMessage(qtmCommand); qtmCommand.Send(serverEndPoint); }
public void AppendMessage(string address, List <object> values) { OscMessage messageToSend = new OscMessage(localEndPoint, address); messageToSend.ClearData(); // do i need this? foreach (object message in values) { messageToSend.Append(message); } messagesThisFrame.Add(messageToSend); }
private void AppendToBundle <T>(OscBundle oscBundle, OscMessage sourceMsg, OscMessage aliveMsg, OscMessage fseqMsg, bool forceSet = false) where T : ITUIOEntity { // http://www.tuio.org/?specification - Message & Bundle Format // // /tuio/2Dcur source application@address // /tuio/2Dcur alive s_id0 ... s_idN // /tuio/2Dcur set s x y X Y m // /tuio/2Dcur fseq f_id // // nb. TUIOsharp does not enforce an order for alive/set messages so long as they're before fseq oscBundle.Append(sourceMsg); // entities: alive, set aliveMsg.ClearData(); // nb. also clears address aliveMsg.Append("alive"); oscBundle.Append(aliveMsg); for (int i = 0; i < _entities.Count; i++) { ITUIOEntity e = _entities[i]; if (e.GetType() != typeof(T)) { continue; } aliveMsg.Append(e.Id); if (forceSet || e.isSendRequired) { oscBundle.Append(e.oscMessage); // set e.isSendRequired = false; } } // frame sequence fseqMsg.UpdateDataAt(1, fseq); oscBundle.Append(fseqMsg); }