Protocols
The following protocols are available globally.
-
A connection of a controller to a switcher. Use it to interact with the switcher: send messages and attach message handlers for incoming
Message
s.Message handlers are functions that will be executed when a certain type of Message is received by the
Controller
.Attach a handler to a certain type of
Message
by callingconnection.when { message: <MessageType> in // Handle your message here }
Replace
See more<MessageType>
with a concrete type that conforms to theMessage
protocol (eg:ProgramBusChanged
).Declaration
Swift
public protocol ControllerConnection : AnyObject
-
A message that can be constructed from a sequence of bytes (
See moreArraySlice<UInt8>
)Declaration
Swift
public protocol DeserializableMessage : CustomDebugStringConvertible
-
A
See moreMessage
that is serializable. In other words: that can be transformed into a binary format, ready to be sent to another device. Serializable messages use theMessage.title
andSerializable.dataBytes
properties to compute the serialized message.Declaration
Swift
public protocol SerializableMessage : DeserializableMessage
-
Interact with connections to a switcher.
Used to send messages to all connected controllers and to attach message handlers to incoming
Message
s.Handlers are functions that will be executed when a certain type of Message is received by the
See moreSwitcher
.Declaration
Swift
public protocol SwitcherConnections
-
Undocumented
See moreDeclaration
Swift
public protocol SingleValueDescribable