Module losc.packet
OSC packet.
The unit of transmission of OSC is an OSC Packet. An OSC packet is either a messages or a bundle.
Info:
- Copyright: David Granström 2021
- License: MIT
- Author: David Granström
Functions
Packet.is_bundle (packet) | Check if a packet is a bundle or a message. |
Packet.validate (packet) | Validate a packet. |
Packet.pack (tbl) | Pack a Bundle or Message. |
Packet.unpack (data) | Unpack an OSC packet. |
Functions
- Packet.is_bundle (packet)
-
Check if a packet is a bundle or a message.
Parameters:
Returns:
-
True if packet is a bundle otherwise false.
- Packet.validate (packet)
-
Validate a packet. Can be a message or a bundle.
Parameters:
- Packet.pack (tbl)
-
Pack a Bundle or Message.
Parameters:
- tbl The table to pack.
Returns:
-
OSC data packet (byte string).
- Packet.unpack (data)
-
Unpack an OSC packet.
Parameters:
- data string The data to unpack.
Returns:
-
table with the content of the OSC message (bundle or message).