/******************************************************************************
* Copyright (C) Ultraleap, Inc. 2011-2021. *
* *
* Use subject to the terms of the Apache License 2.0 available at *
* http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
* between Ultraleap and you, your company or other organization. *
******************************************************************************/
namespace Leap
{
using System;
///
/// The FailedDevice class provides information about Leap Motion hardware that
/// has been physically connected to the client computer, but is not operating
/// correctly.
///
/// Failed devices do not provide any tracking data and do not show up in the
/// Controller.Devices() list.
///
/// Get the list of failed devices using Controller.FailedDevices().
///
/// @since 3.0
///
public class FailedDevice :
IEquatable
{
public FailedDevice()
{
Failure = FailureType.FAIL_UNKNOWN;
PnpId = "0";
}
///
/// Test FailedDevice equality.
/// True if the devices are the same.
/// @since 3.0
///
public bool Equals(FailedDevice other)
{
return PnpId == other.PnpId;
}
///
/// The device plug-and-play id string.
/// @since 3.0
///
public string PnpId { get; private set; }
///
/// The reason for device failure.
/// The failure reasons are defined as members of the FailureType enumeration.
///
/// @since 3.0
///
public FailureType Failure { get; private set; }
///
/// The errors that can cause a device to fail to properly connect to the service.
///
/// @since 3.0
///
public enum FailureType
{
///
/// The cause of the error is unknown.
///
FAIL_UNKNOWN,
///
/// The device has a bad calibration record.
///
FAIL_CALIBRATION,
///
/// The device firmware is corrupt or failed to update.
///
FAIL_FIRMWARE,
///
/// The device is unresponsive.
///
FAIL_TRANSPORT,
///
/// The service cannot establish the required USB control interfaces.
///
FAIL_CONTROl
}
}
}