Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data types for OSC messages, bundles and packets.
Synopsis
- type Address_Pattern = String
- data Message = Message {
- messageAddress :: !Address_Pattern
- messageDatum :: ![Datum]
- message :: Address_Pattern -> [Datum] -> Message
- data Bundle = Bundle {
- bundleTime :: !Time
- bundleMessages :: ![Message]
- bundle :: Time -> [Message] -> Bundle
- data Packet
- = Packet_Message {
- packetMessage :: !Message
- | Packet_Bundle {
- packetBundle :: !Bundle
- = Packet_Message {
- p_bundle :: Time -> [Message] -> Packet
- p_message :: Address_Pattern -> [Datum] -> Packet
- packetTime :: Packet -> Time
- packetMessages :: Packet -> [Message]
- packet_to_bundle :: Packet -> Bundle
- packet_to_message :: Packet -> Maybe Message
- packet_is_immediate :: Packet -> Bool
- at_packet :: (Message -> a) -> (Bundle -> a) -> Packet -> a
- message_has_address :: Address_Pattern -> Message -> Bool
- bundle_has_address :: Address_Pattern -> Bundle -> Bool
- packet_has_address :: Address_Pattern -> Packet -> Bool
- messagePP :: FP_Precision -> Message -> String
- bundlePP :: FP_Precision -> Bundle -> String
- packetPP :: FP_Precision -> Packet -> String
Message
type Address_Pattern = String Source #
OSC address pattern. This is strictly an ASCII value, however it
is very common to pattern match on addresses and matching on
Data.ByteString.Char8 requires OverloadedStrings
.
An OSC message, an Address_Pattern
and a sequence of Datum
.
Message | |
|
message :: Address_Pattern -> [Datum] -> Message Source #
Message
constructor. It is an error
if the Address_Pattern
doesn't conform to the OSC specification.
Bundle
Bundle | |
|
Packet
packetTime :: Packet -> Time Source #
The Time
of Packet
, if the Packet
is a Message
this is
immediately
.
packet_to_bundle :: Packet -> Bundle Source #
If Packet
is a Message
add immediately
timestamp, else id
.
packet_is_immediate :: Packet -> Bool Source #
Is Packet
immediate, ie. a Bundle
with timestamp
immediately
, or a plain Message.
Address Query
message_has_address :: Address_Pattern -> Message -> Bool Source #
Does Message
have the specified Address_Pattern
.
bundle_has_address :: Address_Pattern -> Bundle -> Bool Source #
Do any of the Message
s at Bundle
have the specified
Address_Pattern
.
packet_has_address :: Address_Pattern -> Packet -> Bool Source #
Does Packet
have the specified Address_Pattern
, ie.
message_has_address
or bundle_has_address
.