DeviceModel

public enum DeviceModel : CustomStringConvertible

Model of a device.

  • Drone model.

    Declaration

    Swift

    case drone(Drone.Model)
  • Remote control model.

    Declaration

    Swift

    case rc(RemoteControl.Model)
  • Internal unique identifier.

    Declaration

    Swift

    public var internalId: Int { get }
  • Debug description.

    Declaration

    Swift

    public var description: String { get }
  • Uid of the default model. A default model will be available if the app is providing an app defaults. See GroundSdkConfig.defaultDevices.

    Declaration

    Swift

    public var defaultModelUid: String { get }
  • All known device models.

    Declaration

    Swift

    public static var allDevices: Set<DeviceModel> { get }
  • Filters device models that support a given technology.

    Declaration

    Swift

    public static func supportingTechnology(
        models: Set<DeviceModel>, technology: DeviceConnectorTechnology) -> Set<DeviceModel>

    Parameters

    models

    set of device models to filter

    technology

    technology that must be supported

    Return Value

    a subset of the given device models that support this technology

  • Retrieves a device model by its name.

    Declaration

    Swift

    public static func from(name: String) -> DeviceModel?

    Parameters

    name

    name of the device model to retrieve

    Return Value

    the corresponding DeviceModel, or nil if no model with such a name exists

  • Retrieves a device model by its internal id.

    Declaration

    Swift

    public static func from(internalId: Int) -> DeviceModel?

    Parameters

    internalId

    internal id of the device model to retrieve

    Return Value

    the corresponding DeviceModel, or nil if no model with such internal id exists

  • Retrieves a device model by its internal id as hex string.

    Declaration

    Swift

    public static func from(internalIdHexStr: String) -> DeviceModel?

    Parameters

    internalIdHexStr

    internal id of the device model to retrieve

    Return Value

    the corresponding DeviceModel, or nil if no model with such internal id exists

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func == (lhs: DeviceModel, rhs: DeviceModel) -> Bool