Created
August 5, 2019 06:07
-
-
Save beraylik/daeb2e8a16e4271765d01a5ee800c5f3 to your computer and use it in GitHub Desktop.
someCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Device {} | |
protocol DeviceState {} | |
enum Types { | |
case timer | |
case action | |
case event | |
} | |
protocol ScriptTrigger { | |
var type: Types { get } | |
var isTriggered: Bool { get } | |
} | |
protocol TimerTrigger { | |
var targetTime: Date { get } | |
var repeats: Int? { get } | |
} | |
protocol ScriptAction { | |
var device: Device { get } | |
var state: DeviceState { get } | |
var targetValue: String { get set } | |
} | |
protocol Script { | |
var isEnabled: Bool { get set } | |
var isProcessing: Bool { get } | |
var trigger: ScriptTrigger { get } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment