Safe Haskell | None |
---|---|
Language | Haskell98 |
Monad class implementing an Open Sound Control transport.
- class Monad m => SendOSC m where
- class Monad m => RecvOSC m where
- class (SendOSC m, RecvOSC m) => DuplexOSC m
- class (DuplexOSC m, MonadIO m) => Transport m
- type Connection t a = ReaderT t IO a
- withTransport :: Transport t => IO t -> Connection t a -> IO a
- sendMessage :: SendOSC m => Message -> m ()
- sendBundle :: SendOSC m => Bundle -> m ()
- recvOSC :: (RecvOSC m, OSC o) => m (Maybe o)
- recvBundle :: RecvOSC m => m Bundle
- recvMessage :: RecvOSC m => m (Maybe Message)
- recvMessage_err :: RecvOSC m => m Message
- recvMessages :: RecvOSC m => m [Message]
- waitUntil :: RecvOSC m => (Packet -> Bool) -> m Packet
- waitFor :: RecvOSC m => (Packet -> Maybe a) -> m a
- waitImmediate :: RecvOSC m => m Packet
- waitMessage :: RecvOSC m => m Message
- waitAddress :: RecvOSC m => Address_Pattern -> m Packet
- waitReply :: RecvOSC m => Address_Pattern -> m Message
- waitDatum :: RecvOSC m => Address_Pattern -> m [Datum]
Documentation
class Monad m => RecvOSC m where Source #
Receiver monad.
recvPacket :: m Packet Source #
Receive and decode an OSC packet.
type Connection t a = ReaderT t IO a Source #
Transport connection.
withTransport :: Transport t => IO t -> Connection t a -> IO a Source #
Bracket Open Sound Control communication.
Send
Receive
recvOSC :: (RecvOSC m, OSC o) => m (Maybe o) Source #
Variant of recvPacket
that runs fromPacket
.
recvBundle :: RecvOSC m => m Bundle Source #
Variant of recvPacket
that runs packet_to_bundle
.
recvMessage :: RecvOSC m => m (Maybe Message) Source #
Variant of recvPacket
that runs packet_to_message
.
recvMessage_err :: RecvOSC m => m Message Source #
Erroring variant.
recvMessages :: RecvOSC m => m [Message] Source #
Variant of recvPacket
that runs packetMessages
.
Wait
waitImmediate :: RecvOSC m => m Packet Source #
waitMessage :: RecvOSC m => m Message Source #
waitFor
packet_to_message
, ie. an incoming Message
or
immediate mode Bundle
with one element.
waitAddress :: RecvOSC m => Address_Pattern -> m Packet Source #
A waitFor
for variant using packet_has_address
to match on
the Address_Pattern
of incoming Packets
.
waitReply :: RecvOSC m => Address_Pattern -> m Message Source #
Variant on waitAddress
that returns matching Message
.
waitDatum :: RecvOSC m => Address_Pattern -> m [Datum] Source #
Variant of waitReply
that runs messageDatum
.