Safe Haskell | None |
---|---|
Language | Haskell98 |
Optimised encode function for OSC packets.
Synopsis
- build_packet :: Packet -> Builder
- encodeMessage :: Message -> ByteString
- encodeBundle :: Bundle -> ByteString
- encodePacket :: Packet -> ByteString
- encodePacket_strict :: Packet -> ByteString
Documentation
encodeMessage :: Message -> ByteString Source #
Encode an OSC Message
, ie. encodePacket
of Packet_Message
.
let m = [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0] encodeMessage (Message "/g_free" [Int32 0]) == L.pack m
encodeBundle :: Bundle -> ByteString Source #
Encode an OSC Bundle
, ie. encodePacket
of Packet_Bundle
.
let m = [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0] let b = [35,98,117,110,100,108,101,0,0,0,0,0,0,0,0,1,0,0,0,16] ++ m encodeBundle (Bundle immediately [Message "/g_free" [Int32 0]]) == L.pack b
encodePacket :: Packet -> ByteString Source #
Encode an OSC Packet
.
encodePacket_strict :: Packet -> ByteString Source #
Encode an OSC Packet
to a strict ByteString
.