Interface IDeviceCompat
Interface describing the supported properties and methods for a Nix device. IDeviceCompat objects are found nearby using the DeviceScanner. See IDeviceCompatExtensions for extension methods.
Inherited Members
Namespace: NixUniversalSDK
Assembly: NixUniversalSDK.dll
Syntax
public interface IDeviceCompat : IDeviceCompatEvents, IComparable
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.
Declaration
int? BatteryLevel { get; }
Property Value
| Type | Description |
|---|---|
| int? |
ExtPowerState
External power connection state for this device. The value is valid only after a connection has successfully been opened.
Declaration
bool ExtPowerState { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
bool FieldCalibrationDue { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
bool FieldCalibrationEnabled { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
double FieldCalibrationMaxDelta { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
FirmwareVersion
Firmware version of this device. The value is valid only after a connection has successfully been opened.
Declaration
DeviceVersion FirmwareVersion { get; }
Property Value
| Type | Description |
|---|---|
| DeviceVersion |
HapticFeedbackEnabled
Flag to indicate if device haptic feedback is enabled.
Declaration
bool HapticFeedbackEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HardwareVersion
Hardware version of this device. The value is valid only after a connection has successfully been opened.
Declaration
DeviceVersion HardwareVersion { get; }
Property Value
| Type | Description |
|---|---|
| DeviceVersion |
Id
Unique identifier for this device
Declaration
string Id { get; }
Property Value
| Type | Description |
|---|---|
| string |
InterfaceType
Interface / connection type for this device
Declaration
InterfaceType InterfaceType { get; }
Property Value
| Type | Description |
|---|---|
| InterfaceType |
Name
Name for this device
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Note
Factory note for this device, containing allocation code. The value is valid only after a connection has successfully been opened.
Declaration
string Note { get; }
Property Value
| Type | Description |
|---|---|
| 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)
Declaration
bool PowerState { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ProvidesDensity
Flag to indicate if this device type provides density information in its supplied IMeasurementData results.
Declaration
bool ProvidesDensity { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ProvidesSpectral
Flag to indicate if this device type provides spectral information in its supplied IMeasurementData results.
Declaration
bool ProvidesSpectral { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ReferenceDate
Date that the last in-field normalization was last performed, or null if this device does not support this feature.
Declaration
DateTime? ReferenceDate { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
float? ReferenceTemperature { get; }
Property Value
| Type | Description |
|---|---|
| float? |
RgbFeedbackEnabled
Flag to indicate if device RGB feedback is enabled.
Declaration
bool RgbFeedbackEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Rssi
Signal strength for this device
Declaration
int Rssi { get; }
Property Value
| Type | Description |
|---|---|
| int |
ScanCount
Lifetime scan count for this device, or null if this device does not support this feature.
Declaration
uint? ScanCount { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
float? ScanTemperature { get; }
Property Value
| Type | Description |
|---|---|
| float? |
SdkId
Build ID for this NixUniversalSDK binary
Declaration
string SdkId { get; }
Property Value
| Type | Description |
|---|---|
| string |
SerialNumber
Serial number for this device. The value is valid only after a connection has successfully been opened.
Declaration
string SerialNumber { get; }
Property Value
| Type | Description |
|---|---|
| string |
SoftwareVersion
Software version of this device. The value is valid only after a connection has successfully been opened.
Declaration
DeviceVersion SoftwareVersion { get; }
Property Value
| Type | Description |
|---|---|
| DeviceVersion |
State
Current state of this device
Declaration
DeviceState State { get; }
Property Value
| Type | Description |
|---|---|
| DeviceState |
SupportedModes
List of scan modes that are supported by this device. The list is valid only after a connection has successfully been opened.
Declaration
IEnumerable<ScanMode> SupportedModes { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ScanMode> |
SupportedReferences
List of supported reference white points for the colorimetry data available from the IMeasurementData results provided by this device.
Declaration
IEnumerable<ReferenceWhite> SupportedReferences { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ReferenceWhite> |
SupportsFieldCalibration
Flag to indicate if this device supports in-field calibration using the provided reference tile.
Declaration
bool SupportsFieldCalibration { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsHapticFeedback
Flag to indicate if the device supports built-in haptic feedback.
Declaration
bool SupportsHapticFeedback { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsRgbFeedback
Flag to indicate if the device supports built-in RGB feedback.
Declaration
bool SupportsRgbFeedback { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SupportsTemperatureCompensation
Flag to indicate if this device supports automatic temperature compensation to correct for small changes in ambient temperature.
Declaration
bool SupportsTemperatureCompensation { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
bool TemperatureCompensationEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Type
Type for this device
Declaration
DeviceType Type { get; }
Property Value
| Type | Description |
|---|---|
| DeviceType |
Methods
ConnectAsync()
Open a connection to this Nix device. A connection in progress can be cancelled by calling Disconnect().
Declaration
Task<DeviceStatus> ConnectAsync()
Returns
| Type | Description |
|---|---|
| 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.
Declaration
void Disconnect()
InvalidateFieldCalibrationAsync()
Invalidates current field calibration date, so that FieldCalibrationDue is reported as true, if supported by the device.
Declaration
Task<DeviceResult> InvalidateFieldCalibrationAsync()
Returns
| Type | Description |
|---|---|
| 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.
Declaration
bool? IsTileStringValid(string tileString)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tileString | String value decoded from the reference tile QR code |
Returns
| Type | Description |
|---|---|
| bool? | Returns |
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.
Declaration
Task<DeviceResult> LedTestAsync()
Returns
| Type | Description |
|---|---|
| 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.
Declaration
Task<DeviceResult> MeasureAsync(params ScanMode[] modes)
Parameters
| Type | Name | Description |
|---|---|---|
| ScanMode[] | modes | Scan modes to select. If omitted, the device will measure for all supported modes |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
Task<DeviceResult> RunFieldCalibrationAsync(string tileString)
Parameters
| Type | Name | Description |
|---|---|---|
| string | tileString | String value decoded from the reference tile QR code |
Returns
| Type | Description |
|---|---|
| Task<DeviceResult> | DeviceResult containing the status code of the completed operation and measurement data, if applicable. |
SetFieldCalibrationEnabledAsync(bool)
Set the value for FieldCalibrationEnabled.
Declaration
Task<DeviceResult> SetFieldCalibrationEnabledAsync(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | New state for this option |
Returns
| Type | Description |
|---|---|
| Task<DeviceResult> | DeviceResult containing status code of the completed operation |
SetHapticFeedbackEnabledAsync(bool)
Set the value for HapticFeedbackEnabled.
Declaration
Task<DeviceResult> SetHapticFeedbackEnabledAsync(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | New state for this option |
Returns
| Type | Description |
|---|---|
| Task<DeviceResult> | DeviceResult containing status code of the completed operation |
SetRgbFeedbackEnabledAsync(bool)
Set the value for RgbFeedbackEnabled.
Declaration
Task<DeviceResult> SetRgbFeedbackEnabledAsync(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | New state for this option |
Returns
| Type | Description |
|---|---|
| Task<DeviceResult> | DeviceResult containing status code of the completed operation |
SetTemperatureCompensationEnabledAsync(bool)
Set the value for TemperatureCompensationEnabled.
Declaration
Task<DeviceResult> SetTemperatureCompensationEnabledAsync(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | New state for this option |
Returns
| Type | Description |
|---|---|
| Task<DeviceResult> | DeviceResult containing status code of the completed operation |