Connection
public final class Connection
IPv4/IPv6 UDP Connection to send DMX Data to a given Universe Note: this class is not threadsafe
-
Undocumented
See moreDeclaration
Swift
public enum IPVersion
-
Undocumented
Declaration
Swift
public static let defaultParameters: NWParameters
-
Undocumented
Declaration
Swift
public let connection: NWConnection
-
Undocumented
Declaration
Swift
public let queue: DispatchQueue
-
Sender’s Component Identifier
Declaration
Swift
public let cid: UUID
-
Source Name - Userassigned Name of Source
Declaration
Swift
public let sourceName: String
-
Undocumented
Declaration
Swift
public private(set) var sequenceNumber: UInt8
-
Starts a UDP Unicast or Multicast Connection, depending on the given
endpoint
, for the givenendpoint
Declaration
Swift
public init( endpoint: NWEndpoint, universe: UInt16, cid: UUID = .init(), sourceName: String = getDeviceName(), queue: DispatchQueue? = nil, parameters: NWParameters? = nil )
Parameters
endpoint
sACN endpoint.
universe
valid DMX Universe. 1 - 64000.
cid
Sender’s Component Identifier - should be uninque for each device. Default will generate a random UUID.
sourceName
Source Name - Userassigned Name of Source. Default is the device name.
queue
DispatchQueue used for NWConnection.
parameters
custom parameters for NWConnection. Must be UDP. Defaults to UDP with
serviceClass
set to.responsiveData
. -
Starts a IPv4/IPv6 UDP Multicast Connection for a given
universe
Declaration
Swift
public convenience init( universe: UInt16, ipVersion: IPVersion = .v4, port: NWEndpoint.Port = .sACN, cid: UUID = .init(), sourceName: String = getDeviceName(), queue: DispatchQueue? = nil, parameters: NWParameters? = nil )
Parameters
universe
valid DMX Universe. 1 - 64000. will crash if the universe can not be converted to a IPv4/IPv6 Address
ipVersion
version of the Internet Protocol to use. Default is
.v4
.port
UPD port of the connection. Default is 5568 wich is the sACN default port.
cid
Sender’s Component Identifier - should be uninque for each device. Default will generate a random UUID.
sourceName
Source Name - Userassigned Name of Source. Default is the device name.
queue
DispatchQueue used for NWConnection/
parameters
custom parameters for NWConnection. Must be UDP. Defaults to UDP with
serviceClass
set to.responsiveData
. -
Send the given DMX Data to
universe
Declaration
Swift
public func sendDMXData(_ data: Data, priority: UInt8 = 100, isPreviewData: Bool = false)