Microhard
public protocol Microhard : Peripheral
Microhard peripheral.
This peripheral allows to pair drones supporting Microhard technology.
This peripheral can be retrieved by:
device.getPeripheral(Peripherals.microhard)
-
Current state.
Declaration
Swift
var state: MicrohardState { get }
-
Pairing operation status.
This property is transient: it will be set once when the pairing operation ends, and then immediately back to
nil
.Declaration
Swift
var pairingStatus: MicrohardPairingStatus? { get }
-
Supported operation channels.
Declaration
Swift
var supportedChannelRange: ClosedRange<UInt> { get }
-
Supported operation power, in dBm.
Declaration
Swift
var supportedPowerRange: ClosedRange<UInt> { get }
-
Supported operation bandwidths.
Declaration
Swift
var supportedBandwidths: Set<MicrohardBandwidth> { get }
-
Supported encryption algorithms.
Declaration
Swift
var supportedEncryptions: Set<MicrohardEncryption> { get }
-
Powers on the Microhard chip.
Declaration
Swift
func powerOn() -> Bool
Return Value
true
if the command has been sent -
Powers off the Microhard chip.
Declaration
Swift
func shutdown() -> Bool
Return Value
true
if the command has been sent -
Pairs a Microhard device.
Declaration
Swift
func pairDevice(networkId: String, encryptionKey: String, pairingParameters: MicrohardPairingParameters, connectionParameters: MicrohardConnectionParameters) -> Bool
Parameters
networkId
device network identifier
encryptionKey
pairing encryption key
pairingParameters
parameters for device pairing
connectionParameters
parameters for device connection
Return Value
true
if the command has been sent. The command will not be sent, if the pairing or connection parameters are out of supported values, or if the currentstate
does not allow pairing (seeMicrohardState.canPair
).