Controller

public class Controller

An interface to

  • send commands to an ATEM Switcher
  • react upon incomming state change messages from the ATEM Switcher

To make an anology with real world devices: this class can be compared to a BlackMagicDesign Control Panel. It is used to control a production switcher.

  • The underlying NIO Datagram Channel

    Declaration

    Swift

    public let channel: EventLoopFuture<Channel>
  • Undocumented

    Declaration

    Swift

    public let messageHandler = MessageHandler()
  • Start a new connection to an ATEM Switcher.

    When a connection is being initialized it will receive Messages from the switcher to describe its initial state. If you are interested in these messages use the initializer parameter to set up handlers for them (see MessageHandlerBase.when(...)). When this connection initiation process is finished the ConnectionInitiationEnd message will be sent. From that moment on you know that a connection is succesfully established.

    Declaration

    Swift

    public init(ipAddress: String, eventLoopGroup: EventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1), initializer: (MessageHandler)->Void = {_ in}) throws

    Parameters

    ipAddress

    the IPv4 address of the switcher.

    eventLoopGroup

    the underlying EventLoopGroup that will be used for the network connection.

    initializer

    a closure that will be called before establishing the connection to the switcher. Use the provided MessageHandler to register callbacks for incoming messages from the switcher.

  • Sends a message to the connected switcher.

    Declaration

    Swift

    public func send(message: Serializable)

    Parameters

    message

    the message that will be sent to the switcher