CharacteristicNorthPoleAweDiagnostics

@available(swift 3.1)
@available(iOS 10.0, tvOS 10.0, watchOS 3.0, macOS 10.12, *)
final public class CharacteristicNorthPoleAweDiagnostics : Characteristic
extension CharacteristicNorthPoleAweDiagnostics: Hashable
extension CharacteristicNorthPoleAweDiagnostics: Equatable

BLE AWE Diagnostic Characteristic

  • Characteristic Name

    Declaration

    Swift

    public static var name: String { get }
  • Characteristic UUID

    Declaration

    Swift

    public static var uuidString: String { get }
  • Name of the Characteristic

    Declaration

    Swift

    public var name: String { get }
  • Characteristic UUID String

    Declaration

    Swift

    public var uuidString: String { get }
  • Battery Swaps

    Declaration

    Swift

    private(set) public var batterySwaps: UInt16 { get }
  • Date Programmed

    Declaration

    Swift

    private(set) public var dateProgrammed: Date { get }
  • Total Operating Time

    Declaration

    Swift

    private(set) public var totalOperatingtime: UInt32 { get }
  • Advertising Time

    Time spent in a BLE Advertising

    Declaration

    Swift

    private(set) public var advertisingTime: Measurement<UnitDuration> { get }
  • Connected Time

    Time spent in a BLE Connection

    Declaration

    Swift

    private(set) public var connectedTime: Measurement<UnitDuration> { get }
  • Successful Firmware Update Events

    Number of times Firmware Update was requested and successul

    Declaration

    Swift

    private(set) public var succesfulFirmwareUpdateEvents: UInt8 { get }
  • Failed Firmware Update Events

    Number of times Firmware Update was requested and failed

    Declaration

    Swift

    private(set) public var failedFirmwareUpdateEvents: UInt8 { get }
  • Last Battery Level

    The battry level before the last device shutdown

    Declaration

    Swift

    private(set) public var lastBatteryLevel: Measurement<UnitPercent> { get }
  • Creates AWE Diagnostic Characteristic

    Declaration

    Swift

    public init(batterySwaps: UInt16,
                dateProgrammed: Date,
                totalOperatingtime: UInt32,
                advertisingTime: Measurement<UnitDuration>,
                connectedTime: Measurement<UnitDuration>,
                succesfulFirmwareUpdateEvents: UInt8,
                failedFirmwareUpdateEvents: UInt8,
                lastBatteryLevel: Measurement<UnitPercent>)

    Parameters

    batterySwaps

    Number of Battery Swaps

    totalOperatingtime

    Total Operating Time

    advertisingTime

    Time spent in a BLE Advertising

    connectedTime

    Time spent in a BLE Connection

  • Decodes Characteristic Data into Characteristic

    Declaration

    Swift

    public class func decode<C>(with data: Data) -> Result<C, BluetoothDecodeError> where C : Characteristic

    Parameters

    data

    Characteristic Data

    Return Value

    Characteristic Result

  • Encodes the Characteristic into Data

    Declaration

    Swift

    public func encode() -> Result<Data, BluetoothEncodeError>

    Return Value

    Characteristic Data Result

  • Hashes the essential components of this value by feeding them into the given hasher.

    Implement this method to conform to the Hashable protocol. The components used for hashing must be the same as the components compared in your type’s == operator implementation. Call hasher.combine(_:) with each of these components.

    Important

    Never call finalize() on hasher. Doing so may become a compile-time error in the future.

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)

    Parameters

    hasher

    The hasher to use when combining the components of this instance.

  • Returns a Boolean value indicating whether two values are equal.

    Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

    Declaration

    Swift

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

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.