A simple OSC Data composer and parser. A OSC data starts with an address string followed by a format string. This is followed by the data. You need to call the read and write methods in the sequence defined by the format string. There is no validation for this, so you need to be careful and test your code properly. To compose a message call:
More...
#include <OSCData.h>
A simple OSC Data composer and parser. A OSC data starts with an address string followed by a format string. This is followed by the data. You need to call the read and write methods in the sequence defined by the format string. There is no validation for this, so you need to be careful and test your code properly. To compose a message call:
To parse a message call:
- parse() to parse the message
- getAddress() to get the address
- getFormat() to get the format string
- readXxxx() to read the data ... I recommend to register for each address and process the reads in the callback
OSC V1.0 Specification: https://opensoundcontrol.stanford.edu/spec-1_0.html
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ OSCData() [1/2]
◆ OSCData() [2/2]
◆ addCallback()
register a parsing callback for a specific address matching string
replace existing callback
◆ clear()
◆ compare()
◆ data()
provides access to the original binary message (defined in the constructor or via parse())
◆ getAddress()
provides the address: after calling parse
◆ getEnd()
◆ getFormat()
provides the format string: after calling parse
◆ logMsg()
◆ messageData()
provides access to the original binary message (defined in the constructor or via parse())
◆ oscFormatSize() [1/2]
storage size (multiple of 4) for format string (w/o the leading ,)
◆ oscFormatSize() [2/2]
storage size (multiple of 4) for format string (w/o the leading ,)
◆ oscSize() [1/3]
storage size (multiple of 4) for string
◆ oscSize() [2/3]
storage size (multiple of 4)
◆ oscSize() [3/3]
storage size (multiple of 4) for binary blob data
◆ parse()
parse the data to start for reading
call callback if there are any
◆ readData()
reads the next attribute as binary data blob.
◆ readDouble()
reads the next attribute as double
◆ readFloat()
reads the next attributes as float
◆ readInt32()
reads the next attribute as int32
◆ readInt64()
reads the next attribute as long
◆ readString()
◆ readTime()
reads the next attribute as uint64_t
◆ setAddress()
Defines the address string (e.g. /test)
◆ setFormat()
Defines the format string (e.g. ,iif)
◆ setLogActive()
Log the beginning of the received messages.
◆ setReference()
store a reference object (for callback)
◆ size()
returns the number of bytes written (or parsed)
◆ write() [1/7]
◆ write() [2/7]
◆ write() [3/7]
write a 64bit double number (d)
◆ write() [4/7]
write an int32_t number (i)
◆ write() [5/7]
◆ write() [6/7]
◆ write() [7/7]
write a timetag (t) data type
◆ binary_content
◆ callbacks
◆ is_log_active
◆ read_data
◆ read_format_start
◆ reference
◆ write_pos
The documentation for this class was generated from the following file: