4.6. ISCPParser
added in version 1.7.0
An interface to provide functions to generate commands for the peripheral control.
This interface is only for models which support the peripheral. For the supporting models, refer to Supported Peripherals .
Constant
Name
Contents
Parse result constants
Property
Name
Contents
Parse result constants
Method
Name
Contents
Generates a command to receive the response from the peripheral.
4.6.1. StarIoExtParserCompletionResult
added in version 1.7.0
Parse result constants
Declaration
public enum StarIoExtParserCompletionResult : Int { case invalid case success case failure }
Constants
Name
Contents
invalid
Parse invalid
success
Parse success
failure
Parse failure
4.6.2. completionHandler
added in version 1.7.0
Analyzes the response of the command (command generated with the createSendCommands ) for the peripheral control.
Declaration
public typealias StarIoExtParserCompletionHandler = (UnsafeMutablePointer<UInt8>?, UnsafeMutablePointer<Int32>?) -> StarIoExtParserCompletionResult open var completionHandler: StarIoExtParserCompletionHandler!
Value
Contents
Type
Parse handler
StarIoExtParserCompletionHandler
4.6.3. createSendCommands
added in version 1.7.0
Generates a command to receive the response from the peripheral.
Declaration
open func createSendCommands() -> Data!
Parameter
None
Return value
Contents
Type
Generated command.
Data