Table of Contents

Interface IDeviceCompat

Namespace
NixUniversalSDK
Assembly
NixUniversalSDK.dll

Interface describing the supported properties and methods for a Nix device. IDeviceCompat objects are found nearby using the DeviceScanner. See IDeviceCompatExtensions for extension methods.

public interface IDeviceCompat : IDeviceCompatEvents, IComparable
Inherited Members
Extension Methods

Properties

BatteryLevel

Current battery level for this device (0 - 100), or null if not available. The value is valid only after a connection has successfully been opened.

int? BatteryLevel { get; }

Property Value

int?

ExtPowerState

External power connection state for this device. The value is valid only after a connection has successfully been opened.

bool ExtPowerState { get; }

Property Value

bool

FieldCalibrationDue

Flag to indicate if in-field calibration is recommended for this device at this time (if supported). This value is only valid after opening a connection and is a function of both time and ambient temperature. This value also updates each time a measurement is completed.

bool FieldCalibrationDue { get; }

Property Value

bool

FieldCalibrationEnabled

Flag to indicate if in-field calibration results are applied (true) or bypassed (false) when evaluating the final calibrated measurement result. Value is true by default if supported by the device. It is recommended to leave this set to true if supported.

bool FieldCalibrationEnabled { get; }

Property Value

bool

FieldCalibrationMaxDelta

Maximum Delta E threshold used when performing in-field calibration (if supported), or NaN if the device does not support this operation. If a difference from the reference greater than this value is detected during RunFieldCalibrationAsync(string), the command will fail with status ErrorScanDelta.

double FieldCalibrationMaxDelta { get; set; }

Property Value

double

FirmwareVersion

Firmware version of this device. The value is valid only after a connection has successfully been opened.

DeviceVersion FirmwareVersion { get; }

Property Value

DeviceVersion

HapticFeedbackEnabled

Flag to indicate if device haptic feedback is enabled.

bool HapticFeedbackEnabled { get; }

Property Value

bool

HardwareVersion

Hardware version of this device. The value is valid only after a connection has successfully been opened.

DeviceVersion HardwareVersion { get; }

Property Value

DeviceVersion

Id

Unique identifier for this device

string Id { get; }

Property Value

string

InterfaceType

Interface / connection type for this device

InterfaceType InterfaceType { get; }

Property Value

InterfaceType

Name

Name for this device

string Name { get; }

Property Value

string

Note

Factory note for this device, containing allocation code. The value is valid only after a connection has successfully been opened.

string Note { get; }

Property Value

string

PowerState

Flag: true if sufficient power is available to complete a measurement, false if a measurement will be aborted (function of external power connection and battery level)

bool PowerState { get; }

Property Value

bool

ProvidesDensity

Flag to indicate if this device type provides density information in its supplied IMeasurementData results.

bool ProvidesDensity { get; }

Property Value

bool

ProvidesSpectral

Flag to indicate if this device type provides spectral information in its supplied IMeasurementData results.

bool ProvidesSpectral { get; }

Property Value

bool

ReferenceDate

Date that the last in-field normalization was last performed, or null if this device does not support this feature.

DateTime? ReferenceDate { get; }

Property Value

DateTime?

ReferenceTemperature

Baseline temperature for this device. Corresponds to in-field normalization temperature for Spectro2 and Mini3, or factory temperature for others. Value is null if the device does not support this feature. The value is valid only after a connection has successfully been opened.

float? ReferenceTemperature { get; }

Property Value

float?

RgbFeedbackEnabled

Flag to indicate if device RGB feedback is enabled.

bool RgbFeedbackEnabled { get; }

Property Value

bool

Rssi

Signal strength for this device

int Rssi { get; }

Property Value

int

ScanCount

Lifetime scan count for this device, or null if this device does not support this feature.

uint? ScanCount { get; }

Property Value

uint?

ScanTemperature

Last known temperature of the device, corresponding to the most recently completed scan since the device was connected. Value is null if the device does not support this feature. This value is only valid if the device is connected and a measurement has completed.

float? ScanTemperature { get; }

Property Value

float?

SdkId

Build ID for this NixUniversalSDK binary

string SdkId { get; }

Property Value

string

SerialNumber

Serial number for this device. The value is valid only after a connection has successfully been opened.

string SerialNumber { get; }

Property Value

string

SoftwareVersion

Software version of this device. The value is valid only after a connection has successfully been opened.

DeviceVersion SoftwareVersion { get; }

Property Value

DeviceVersion

State

Current state of this device

DeviceState State { get; }

Property Value

DeviceState

SupportedModes

List of scan modes that are supported by this device. The list is valid only after a connection has successfully been opened.

IEnumerable<ScanMode> SupportedModes { get; }

Property Value

IEnumerable<ScanMode>

SupportedReferences

List of supported reference white points for the colorimetry data available from the IMeasurementData results provided by this device.

IEnumerable<ReferenceWhite> SupportedReferences { get; }

Property Value

IEnumerable<ReferenceWhite>

SupportsFieldCalibration

Flag to indicate if this device supports in-field calibration using the provided reference tile.

bool SupportsFieldCalibration { get; }

Property Value

bool

SupportsHapticFeedback

Flag to indicate if the device supports built-in haptic feedback.

bool SupportsHapticFeedback { get; }

Property Value

bool

SupportsRgbFeedback

Flag to indicate if the device supports built-in RGB feedback.

bool SupportsRgbFeedback { get; }

Property Value

bool

SupportsTemperatureCompensation

Flag to indicate if this device supports automatic temperature compensation to correct for small changes in ambient temperature.

bool SupportsTemperatureCompensation { get; }

Property Value

bool

TemperatureCompensationEnabled

Flag to indicate if ambient temperature compensation / correction is applied (true) or bypassed (false) when evaluating the final calibrated measurement. Value is true by default if supported by the device. It is recommended to leave this set to true if supported.

bool TemperatureCompensationEnabled { get; }

Property Value

bool

Type

Type for this device

DeviceType Type { get; }

Property Value

DeviceType

Methods

ConnectAsync()

Open a connection to this Nix device. A connection in progress can be cancelled by calling Disconnect().

Task<DeviceStatus> ConnectAsync()

Returns

Task<DeviceStatus>

DeviceStatus indicating success or failure of the connection operation

Disconnect()

Disconnect from this Nix device, or cancel a connection attempt currently in progress.

void Disconnect()

InvalidateFieldCalibrationAsync()

Invalidates current field calibration date, so that FieldCalibrationDue is reported as true, if supported by the device.

Task<DeviceResult> InvalidateFieldCalibrationAsync()

Returns

Task<DeviceResult>

DeviceResult containing status code of the completed operation

IsTileStringValid(string)

Used to check if a decoded string from the reference tile is valid.

bool? IsTileStringValid(string tileString)

Parameters

tileString string

String value decoded from the reference tile QR code

Returns

bool?

Returns null if the string is not in the expected format, false if the string is in a valid format but does not match this particular device, true if the string is valid.

LedTestAsync()

Manually run a LED test routine. On devices featuring RGB feedback, this will use the RGB LEDs. On other devices, this will flash the white LEDs.

Task<DeviceResult> LedTestAsync()

Returns

Task<DeviceResult>

DeviceResult containing status code of the completed operation

MeasureAsync(params ScanMode[])

Run a measurement for the specified scan modes, or all supported scan modes if none are specified. If unsupported modes are selected, the measurement will fail with status code ErrorNotSupported.

Task<DeviceResult> MeasureAsync(params ScanMode[] modes)

Parameters

modes ScanMode[]

Scan modes to select. If omitted, the device will measure for all supported modes

Returns

Task<DeviceResult>

DeviceResult containing the status code of the completed operation and measurement data, if applicable.

RunFieldCalibrationAsync(string)

Start field calibration using provided reference tile, if supported. Upon executing this command, the scan of the reference tile will begin immediately. The user MUST be prompted to place the device onto the reference tile BEFORE this method is executed. This method is asynchronous and will return immediately. This command requires data from the reference tile QR code. As the format varies between different device types, the string data should be provided exactly as decoded from the QR code.

Task<DeviceResult> RunFieldCalibrationAsync(string tileString)

Parameters

tileString string

String value decoded from the reference tile QR code

Returns

Task<DeviceResult>

DeviceResult containing the status code of the completed operation and measurement data, if applicable.

SetFieldCalibrationEnabledAsync(bool)

Set the value for FieldCalibrationEnabled.

Task<DeviceResult> SetFieldCalibrationEnabledAsync(bool enabled)

Parameters

enabled bool

New state for this option

Returns

Task<DeviceResult>

DeviceResult containing status code of the completed operation

SetHapticFeedbackEnabledAsync(bool)

Set the value for HapticFeedbackEnabled.

Task<DeviceResult> SetHapticFeedbackEnabledAsync(bool enabled)

Parameters

enabled bool

New state for this option

Returns

Task<DeviceResult>

DeviceResult containing status code of the completed operation

SetRgbFeedbackEnabledAsync(bool)

Set the value for RgbFeedbackEnabled.

Task<DeviceResult> SetRgbFeedbackEnabledAsync(bool enabled)

Parameters

enabled bool

New state for this option

Returns

Task<DeviceResult>

DeviceResult containing status code of the completed operation

SetTemperatureCompensationEnabledAsync(bool)

Set the value for TemperatureCompensationEnabled.

Task<DeviceResult> SetTemperatureCompensationEnabledAsync(bool enabled)

Parameters

enabled bool

New state for this option

Returns

Task<DeviceResult>

DeviceResult containing status code of the completed operation