MeshMessageGenericOnOffSet
public struct MeshMessageGenericOnOffSet : MeshMessage
Mesh Message Generic OnOff Set
Generic OnOff Set is an acknowledged message used to set the Generic OnOff state of an element.
The response to the Generic OnOff Set message is a Generic OnOff Status message
-
Op Code
Declaration
Swift
private(set) public var opCode: Data { get }
-
State
Declaration
Swift
private(set) public var state: GenericOnOffState { get }
-
Transaction Identifier
Declaration
Swift
private(set) public var transaction: UInt8 { get }
-
Transition Time
Declaration
Swift
private(set) public var transition: MeshTransitionTime? { get }
-
Message execution delay
Message execution delay in 5 millisecond steps
Declaration
Swift
private(set) public var delay: UInt8? { get }
-
Create Message
Declaration
Swift
public init(state: GenericOnOffState, transaction: UInt8, transition: MeshTransitionTime?, delay: UInt8?)
Parameters
state
OnOff State
transaction
Transaction Identifier
transition
Transition Time
delay
Message execution delay
-
Encodes into Data
Declaration
Swift
public func encode() -> Result<Data, BluetoothEncodeError>
Return Value
Encoded Data Result