UdtoutDAT Class

From TouchDesigner Documentation
Revision as of 14:57, 8 August 2017 by Admin (talk | contribs) (UDT OutDAT Class Auto Create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{lowercase} {OPClassSummary|OPtype=udtout|OPfamily=DAT} {ClassMemberSection|empty=True} {ClassMethodSection|empty=} {ClassMethod

   |call=sendBytes(message1, message2...)
   |text=: -> int

Send a sequence of bytes through this connection. No terminators are appended. Note: the message will not be OSC formatted. Messages can any combination of strings, byte arrays, or individual single-byte numeric values. To serialize non-byte values (example floats or integers) there are several python modules to do this, such as pickle or struct. Returns the number of bytes sent. n.sendBytes( 'TYPE', 23, 255, 12, 0x34, b'\x01\x00\x02\x00\x03\x00\x00\x00' ) } {ClassMethod

   |call=sendOSC(address, values, asBundle=False)
   |text=: -> int

Send an OSC formatted message through this connection. Returns the number of bytes sent.

address - The OSC address to label this message with.
values - A list of values to send in this message.
asBundle - (Keyword, Optional) When true, all messages are sent inside a single bundle.

vals = [1, b'abc', 'apple', [6,7,8], True, None, float("infinity")] n.sendOSC('/abc', vals) } {ClassMethod

   |call=send(message1, message2..., terminator=)
   |text=: -> int

Send a sequence of strings through this connection. Note: the message will not be OSC formatted.

messsage - One or more strings to send across the network connection.
terminator - (Keyword, Optional) Specifies how the message is to be terminated. If no append terminator is specified, a null character will automatically be appended to the message. To send no terminator, use terminator=.

Returns the number of bytes sent. n.send('Hello', 'World', terminator='\r\n') #send two strings with windows newline termination. } {ClassInheritance|class=DAT} {ClassInheritance|class=OP} TouchDesigner Build:

{#invoke:Category|list|DAT Classes}

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.