Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Monad class implementing an Open Sound Control transport.
Synopsis
- class Monad m => SendOSC m where
- sendPacket :: Packet -> m ()
- class Monad m => RecvOSC m where
- recvPacket :: m Packet
- 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 ()
- 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 => SendOSC m where Source #
Sender monad.
sendPacket :: Packet -> m () Source #
Encode and send an OSC packet.
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
sendMessage :: SendOSC m => Message -> m () Source #
Type restricted synonym for sendOSC
.
sendBundle :: SendOSC m => Bundle -> m () Source #
Type restricted synonym for sendOSC
.
Receive
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
waitUntil :: RecvOSC m => (Packet -> Bool) -> m Packet Source #
Wait for a Packet
where the supplied predicate is True
,
discarding intervening packets.
waitFor :: RecvOSC m => (Packet -> Maybe a) -> m a Source #
Wait for a Packet
where the supplied function does not give
Nothing
, discarding intervening packets.
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
.