DfuEventType

public class DfuEventType

This class identifies the possible event types of a DfuEvent.

Every type gives full information of what happened, divided by priority, and with an user-friendly description.

Every possible event is already created and is reused to improve performance. The objects can be compared directly.

The type of the event should be used to allow type-casting of the DfuEvent in the case that the event is of TYPE_ERROR to de.sensry.kallisto.hardware.listeners.events.DfuEvent.DfuErrorEvent and of TYPE_PROGRESS to de.sensry.kallisto.hardware.listeners.events.DfuEvent.DfuProgressEvent.

See also: DfuEvent

Fields

DEVICE_CONNECTED

public static final DfuInfoEventType DEVICE_CONNECTED

The DFU service is connected to the device.

DEVICE_CONNECTING

public static final DfuInfoEventType DEVICE_CONNECTING

The DFU service is connecting to the device.

DEVICE_DISCONNECTED

public static final DfuInfoEventType DEVICE_DISCONNECTED

The DFU service is disconnected from the device.

DEVICE_DISCONNECTING

public static final DfuInfoEventType DEVICE_DISCONNECTING

The DFU service is disconnecting from the device.

DFU_ABORTED

public static final DfuInfoEventType DFU_ABORTED

The DFU procedure was aborted.

DFU_DEVICE_RECOVERED

public static final DfuInfoEventType DFU_DEVICE_RECOVERED

The system was able to reconnect to the device after the DFU procedure.

The DFU procedure is completed after receiving this event.

DFU_DONE

public static final DfuInfoEventType DFU_DONE

The DFU procedure completed successfully.

DFU_ERROR_COMMUNICATION

public static final DfuErrorEventType DFU_ERROR_COMMUNICATION

A DFU communication error occurred. Refer to https://github.com/NordicSemiconductor/Android-DFU-Library documentation.

DFU_ERROR_COMMUNICATION_STATE

public static final DfuErrorEventType DFU_ERROR_COMMUNICATION_STATE

A DFU communication state error occurred. Refer to https://github.com/NordicSemiconductor/Android-DFU-Library documentation.

DFU_ERROR_DEVICE_RECOVER_FAILED

public static final DfuErrorEventType DFU_ERROR_DEVICE_RECOVER_FAILED

A DFU device recovery error occurred. Since the system tries to reconnect to the device after the DFU procedure finished, this event means that the system was unable to connect to the device. This can happen if the new firmware doesn’t advertise right away for example.

The DFU procedure is completed after receiving this event.

DFU_ERROR_DFU_REMOTE

public static final DfuErrorEventType DFU_ERROR_DFU_REMOTE

A DFU remote error occurred. Refer to https://github.com/NordicSemiconductor/Android-DFU-Library documentation.

DFU_ERROR_OTHER

public static final DfuErrorEventType DFU_ERROR_OTHER

A DFU other error occurred. Refer to https://github.com/NordicSemiconductor/Android-DFU-Library documentation.

DFU_NOT_RECOVERABLE

public static final DfuInfoEventType DFU_NOT_RECOVERABLE

The system is not able to reconnect to the device since it was a generic device.

The DFU procedure is completed after receiving this event.

DFU_PROGRESS

public static final DfuProgressEventType DFU_PROGRESS

A progress event.

DFU_STARTED

public static final DfuInfoEventType DFU_STARTED

Update procedure started.

DFU_STARTING

public static final DfuInfoEventType DFU_STARTING

The DFU service is starting the update procedure.

ENABLING_DFU

public static final DfuInfoEventType ENABLING_DFU

The DFU service is sending the device to DFU mode.

TYPE_ERROR

public static final int TYPE_ERROR

A constant describing a error type of event.

TYPE_INFO

public static final int TYPE_INFO

A constant describing an information type of event.

TYPE_PROGRESS

public static final int TYPE_PROGRESS

A constant describing a progress type of event.

VALIDATING_FW

public static final DfuInfoEventType VALIDATING_FW

The remote device is validating the new firmware package.

code

public final int code

Event code. An integer value.

description

public final String description

Human readable description of the event.

type

public final int type

Event type. Can be TYPE_INFO, TYPE_ERROR or TYPE_PROGRESS

Methods

equals

public boolean equals(Object o)

Compares the passed object with this DfuEventType.

Parameters
  • o – The object to be compared.

Returns

true if the object is equal to this DfuEventType.