Class DeviceEndpoint

Namespace
ProtoTest.Devices
Assembly
ProtoTest.Devices.dll

Where a device lives: its id, the address its transport connects to, and the per-client settings the registration filled for it (device model, credentials, transport keys). A transport reads the keys it owns through Setting(string); a value that must not reach the trace - a credential - belongs here rather than in the address.

public sealed record DeviceEndpoint : IEquatable<DeviceEndpoint>
Inheritance
DeviceEndpoint
Implements
Inherited Members
Extension Methods

Constructors

DeviceEndpoint(string, string, IReadOnlyDictionary<string, string?>?)

Where a device lives: its id, the address its transport connects to, and the per-client settings the registration filled for it (device model, credentials, transport keys). A transport reads the keys it owns through Setting(string); a value that must not reach the trace - a credential - belongs here rather than in the address.

public DeviceEndpoint(string DeviceId, string Address, IReadOnlyDictionary<string, string?>? Settings = null)

Parameters

DeviceId string
Address string
Settings IReadOnlyDictionary<string, string>

Properties

Address

public string Address { get; init; }

Property Value

string

DeviceId

public string DeviceId { get; init; }

Property Value

string

Framer

Gets how a stream transport cuts bytes into frames, as the client declared it with WithFramer; null when the client declared none. Message transports (WebSocket, MQTT) ignore it.

public IDeviceFramer? Framer { get; init; }

Property Value

IDeviceFramer

Settings

public IReadOnlyDictionary<string, string?>? Settings { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Methods

Setting(string)

Gets a transport setting, or null when the registration did not fill it.

public string? Setting(string key)

Parameters

key string

Returns

string