Table of Contents

Class DeviceSamples

Namespace
Tudormobile.Airthings.Service
Assembly
Airthings.Service.dll

Represents a sensor within an Airthings device.

public sealed record DeviceSamples : IEquatable<DeviceSamples>
Inheritance
DeviceSamples
Implements
Inherited Members

Constructors

DeviceSamples()

public DeviceSamples()

Properties

BatteryPercentage

Gets or sets the battery percentage of the device.

public int BatteryPercentage { get; set; }

Property Value

int

Recorded

Gets or sets the date and time when the event was recorded by the device.

public DateTime Recorded { get; set; }

Property Value

DateTime

Samples

Gets or sets the collection of sensor responses associated with the current device.

public List<DeviceSample> Samples { get; set; }

Property Value

List<DeviceSample>

SerialNumber

Associated device serial number. This is the unique identifier for the device, and can be used to correlate sensor data with devices from the devices endpoint.

public string SerialNumber { get; set; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(DeviceSamples?)

public bool Equals(DeviceSamples? other)

Parameters

other DeviceSamples

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(DeviceSamples?, DeviceSamples?)

public static bool operator ==(DeviceSamples? left, DeviceSamples? right)

Parameters

left DeviceSamples
right DeviceSamples

Returns

bool

operator !=(DeviceSamples?, DeviceSamples?)

public static bool operator !=(DeviceSamples? left, DeviceSamples? right)

Parameters

left DeviceSamples
right DeviceSamples

Returns

bool