OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.Model.ReplyData.ExtendedIdEntry Class Reference

Represents a single TLV (Tag-Length-Value) entry in the extended device identification response. More...

Public Member Functions

 ExtendedIdEntry (ExtendedIdTag tag, string value)
 Creates a new instance of ExtendedIdEntry.
 ExtendedIdEntry (byte tagByte, string value)
 Creates a new instance of ExtendedIdEntry with a raw tag byte.
byte[] BuildData ()
 Builds the TLV byte array for this entry.
override string ToString ()

Static Public Member Functions

static ExtendedIdEntry ParseData (ReadOnlySpan< byte > data, out int bytesConsumed)
 Parses a TLV entry from the given data span.

Properties

ExtendedIdTag Tag [get]
 Gets the tag type for this entry.
byte TagByte [get]
 Gets the raw tag byte value.
string Value [get]
 Gets the UTF-8 string value for this entry.
bool IsKnown [get]
 Gets whether this tag is a known/defined tag in the OSDP specification.

Detailed Description

Represents a single TLV (Tag-Length-Value) entry in the extended device identification response.

Definition at line 10 of file ExtendedIdEntry.cs.

Constructor & Destructor Documentation

◆ ExtendedIdEntry() [1/2]

OSDP.Net.Model.ReplyData.ExtendedIdEntry.ExtendedIdEntry ( ExtendedIdTag tag,
string value )
inline

Creates a new instance of ExtendedIdEntry.

Parameters
tagThe tag type for this entry.
valueThe UTF-8 string value for this entry.

Definition at line 17 of file ExtendedIdEntry.cs.

References Tag, and Value.

Referenced by ParseData().

◆ ExtendedIdEntry() [2/2]

OSDP.Net.Model.ReplyData.ExtendedIdEntry.ExtendedIdEntry ( byte tagByte,
string value )
inline

Creates a new instance of ExtendedIdEntry with a raw tag byte.

Parameters
tagByteThe raw tag byte value.
valueThe UTF-8 string value for this entry.

Definition at line 28 of file ExtendedIdEntry.cs.

References TagByte, and Value.

Member Function Documentation

◆ BuildData()

byte[] OSDP.Net.Model.ReplyData.ExtendedIdEntry.BuildData ( )
inline

Builds the TLV byte array for this entry.

Returns
The TLV byte array: 1-byte tag, 2-byte length (LSB/MSB), N-byte UTF-8 data.

Definition at line 62 of file ExtendedIdEntry.cs.

References TagByte, and Value.

◆ ParseData()

ExtendedIdEntry OSDP.Net.Model.ReplyData.ExtendedIdEntry.ParseData ( ReadOnlySpan< byte > data,
out int bytesConsumed )
inlinestatic

Parses a TLV entry from the given data span.

Parameters
dataThe data span containing the TLV entry.
bytesConsumedThe number of bytes consumed from the span.
Returns
The parsed ExtendedIdEntry, or null if there is insufficient data.

Definition at line 82 of file ExtendedIdEntry.cs.

References ExtendedIdEntry().

Referenced by OSDP.Net.Model.ReplyData.ExtendedDeviceIdentification.ParseData().

◆ ToString()

override string OSDP.Net.Model.ReplyData.ExtendedIdEntry.ToString ( )
inline

Definition at line 106 of file ExtendedIdEntry.cs.

References IsKnown.

Property Documentation

◆ IsKnown

bool OSDP.Net.Model.ReplyData.ExtendedIdEntry.IsKnown
get

Gets whether this tag is a known/defined tag in the OSDP specification.

Definition at line 56 of file ExtendedIdEntry.cs.

Referenced by ToString().

◆ Tag

ExtendedIdTag OSDP.Net.Model.ReplyData.ExtendedIdEntry.Tag
get

Gets the tag type for this entry.

Definition at line 37 of file ExtendedIdEntry.cs.

Referenced by ExtendedIdEntry().

◆ TagByte

byte OSDP.Net.Model.ReplyData.ExtendedIdEntry.TagByte
get

Gets the raw tag byte value.

Definition at line 46 of file ExtendedIdEntry.cs.

Referenced by BuildData(), and ExtendedIdEntry().

◆ Value

string OSDP.Net.Model.ReplyData.ExtendedIdEntry.Value
get

Gets the UTF-8 string value for this entry.

Definition at line 51 of file ExtendedIdEntry.cs.

Referenced by BuildData(), ExtendedIdEntry(), and ExtendedIdEntry().


The documentation for this class was generated from the following file: