Skip to content

Commit

Permalink
Add convenience manager initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Dec 16, 2023
1 parent 2c07d33 commit e9129ab
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Sources/SwiftOCA/OCC/ControlClasses/Agents/TimeSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public enum OcaTimeDeliveryMechanism: OcaUint8, Codable, Sendable {
case sntp = 4
case ieee1588v1 = 5
case ieee1588v2 = 6
case ieee1588v2_1 = 7 // 2.1
case ieee8021AS = 8
case ieee1588v2_1 = 7
case ieee8021AS = 8 // gPTP
case streamEndpoint = 9
case aes11 = 10
case expansionBase = 128
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
open class OcaAudioProcessingManager: OcaManager {
override public class var classID: OcaClassID { OcaClassID("1.3.9") }
override public class var classVersion: OcaClassVersionNumber { 3 }

public convenience init() {
self.init(objectNumber: OcaAudioProcessingManagerONo)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open class OcaDeviceTimeManager: OcaManager {
}
}

public func setDeviceTimeNTP(_ time: OcaTimeNTP) async throws {
public func set(deviceTimeNTP time: OcaTimeNTP) async throws {
try await sendCommandRrq(methodID: OcaMethodID("3.2"), parameters: time)
}

Expand All @@ -47,7 +47,7 @@ open class OcaDeviceTimeManager: OcaManager {
}
}

public func setDeviceTimePTP(_ time: OcaTime) async throws {
public func set(deviceTimePTP time: OcaTime) async throws {
try await sendCommandRrq(methodID: OcaMethodID("3.7"), parameters: time)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
open class OcaDiagnosticManager: OcaManager {
override public class var classID: OcaClassID { OcaClassID("1.3.13") }
override public class var classVersion: OcaClassVersionNumber { 3 }

public convenience init() {
self.init(objectNumber: OcaDiagnosticManagerONo)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ open class OcaLockManager: OcaManager {
public func abortWaits(oNo: OcaONo) async throws {
try await sendCommandRrq(methodID: OcaMethodID("3.2"), parameters: oNo)
}

public convenience init() {
self.init(objectNumber: OcaLockManagerONo)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ open class OcaMediaClockManager: OcaManager {
getMethodID: OcaMethodID("3.3")
)
public var clock3s: OcaProperty<OcaList<OcaONo>>.State

public convenience init() {
self.init(objectNumber: OcaMediaClockManagerONo)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public let OcaAudioProcessingManagerONo: OcaONo = 9
public let OcaDeviceTimeManagerONo: OcaONo = 10
public let OcaTaskManagerONo: OcaONo = 11
public let OcaCodingManagerONo: OcaONo = 12
public let OcaDiagnosticsManagerONo: OcaONo = 13
public let OcaDiagnosticManagerONo: OcaONo = 13
public let OcaLockManagerONo: OcaONo = 14

public let OcaRootBlockONo: OcaONo = 100

Expand Down

0 comments on commit e9129ab

Please sign in to comment.