OSDP.Net
5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
ExtendedDeviceIdentificationBuilder.cs
1
using
System.Collections.Generic;
2
3
namespace
OSDP.Net.Model.ReplyData
4
{
9
public
class
ExtendedDeviceIdentificationBuilder
10
{
11
private
readonly List<ExtendedIdEntry> _entries =
new
();
12
18
public
ExtendedDeviceIdentificationBuilder
WithManufacturer
(
string
manufacturer)
19
{
20
return
WithEntry
(
ExtendedIdTag
.Manufacturer, manufacturer);
21
}
22
28
public
ExtendedDeviceIdentificationBuilder
WithProductName
(
string
productName)
29
{
30
return
WithEntry
(
ExtendedIdTag
.ProductName, productName);
31
}
32
38
public
ExtendedDeviceIdentificationBuilder
WithSerialNumber
(
string
serialNumber)
39
{
40
return
WithEntry
(
ExtendedIdTag
.SerialNumber, serialNumber);
41
}
42
48
public
ExtendedDeviceIdentificationBuilder
WithFirmwareVersion
(
string
firmwareVersion)
49
{
50
return
WithEntry
(
ExtendedIdTag
.FirmwareVersion, firmwareVersion);
51
}
52
58
public
ExtendedDeviceIdentificationBuilder
WithHardwareDescription
(
string
hardwareDescription)
59
{
60
return
WithEntry
(
ExtendedIdTag
.HardwareDescription, hardwareDescription);
61
}
62
68
public
ExtendedDeviceIdentificationBuilder
WithUrl
(
string
url)
69
{
70
return
WithEntry
(
ExtendedIdTag
.Url, url);
71
}
72
78
public
ExtendedDeviceIdentificationBuilder
WithConfigurationReference
(
string
configurationReference)
79
{
80
return
WithEntry
(
ExtendedIdTag
.ConfigurationReference, configurationReference);
81
}
82
89
public
ExtendedDeviceIdentificationBuilder
WithEntry
(
ExtendedIdTag
tag,
string
value)
90
{
91
_entries.Add(
new
ExtendedIdEntry
(tag, value));
92
return
this
;
93
}
94
102
public
ExtendedDeviceIdentificationBuilder
WithCustomEntry
(
byte
tagByte,
string
value)
103
{
104
_entries.Add(
new
ExtendedIdEntry
(tagByte, value));
105
return
this
;
106
}
107
113
public
ExtendedDeviceIdentificationBuilder
WithEntry
(
ExtendedIdEntry
entry)
114
{
115
_entries.Add(entry);
116
return
this
;
117
}
118
123
public
ExtendedDeviceIdentification
Build
()
124
{
125
return
new
ExtendedDeviceIdentification
(_entries);
126
}
127
}
128
}
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder
Fluent builder for creating ExtendedDeviceIdentification instances.
Definition
ExtendedDeviceIdentificationBuilder.cs:10
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithSerialNumber
ExtendedDeviceIdentificationBuilder WithSerialNumber(string serialNumber)
Sets the serial number.
Definition
ExtendedDeviceIdentificationBuilder.cs:38
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.Build
ExtendedDeviceIdentification Build()
Builds the immutable ExtendedDeviceIdentification instance.
Definition
ExtendedDeviceIdentificationBuilder.cs:123
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithUrl
ExtendedDeviceIdentificationBuilder WithUrl(string url)
Sets the URL.
Definition
ExtendedDeviceIdentificationBuilder.cs:68
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithFirmwareVersion
ExtendedDeviceIdentificationBuilder WithFirmwareVersion(string firmwareVersion)
Adds a firmware version.
Definition
ExtendedDeviceIdentificationBuilder.cs:48
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithEntry
ExtendedDeviceIdentificationBuilder WithEntry(ExtendedIdTag tag, string value)
Adds a standard entry using a known tag.
Definition
ExtendedDeviceIdentificationBuilder.cs:89
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithHardwareDescription
ExtendedDeviceIdentificationBuilder WithHardwareDescription(string hardwareDescription)
Sets the hardware description.
Definition
ExtendedDeviceIdentificationBuilder.cs:58
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithEntry
ExtendedDeviceIdentificationBuilder WithEntry(ExtendedIdEntry entry)
Adds a pre-constructed ExtendedIdEntry.
Definition
ExtendedDeviceIdentificationBuilder.cs:113
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithConfigurationReference
ExtendedDeviceIdentificationBuilder WithConfigurationReference(string configurationReference)
Sets the configuration reference.
Definition
ExtendedDeviceIdentificationBuilder.cs:78
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithManufacturer
ExtendedDeviceIdentificationBuilder WithManufacturer(string manufacturer)
Sets the manufacturer name.
Definition
ExtendedDeviceIdentificationBuilder.cs:18
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithCustomEntry
ExtendedDeviceIdentificationBuilder WithCustomEntry(byte tagByte, string value)
Adds a custom/vendor-specific entry using a raw tag byte.
Definition
ExtendedDeviceIdentificationBuilder.cs:102
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentificationBuilder.WithProductName
ExtendedDeviceIdentificationBuilder WithProductName(string productName)
Sets the product name.
Definition
ExtendedDeviceIdentificationBuilder.cs:28
OSDP.Net.Model.ReplyData.ExtendedDeviceIdentification
The extended PD identification data sent as a reply to an osdp_ID command with data 0x01.
Definition
ExtendedDeviceIdentification.cs:15
OSDP.Net.Model.ReplyData.ExtendedIdEntry
Represents a single TLV (Tag-Length-Value) entry in the extended device identification response.
Definition
ExtendedIdEntry.cs:11
OSDP.Net.Model.ReplyData
Definition
Ack.cs:6
OSDP.Net.Model.ReplyData.ExtendedIdTag
ExtendedIdTag
Defines the tag types used in the extended device identification TLV stream.
Definition
ExtendedIdTag.cs:7
OSDP.Net
Model
ReplyData
ExtendedDeviceIdentificationBuilder.cs
OSDP.Net on z-bitco.com
Generated by
1.15.0