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

Represents the Client Unique Identifier (cUID) used during an OSDP secure channel establishment. More...

Public Member Functions

 ClientIdentification (byte[] vendorCode, uint serialNumber)
 Creates a new ClientIdentification instance.
byte[] ToBytes ()
 Converts the client identification to an 8-byte array for use in the secure channel protocol.
override string ToString ()
 Returns a string representation of the client identification.

Properties

byte[] VendorCode [get]
 Vendor code assigned by the Security Industry Association (SIA).
uint SerialNumber [get]
 Device serial number.

Detailed Description

Represents the Client Unique Identifier (cUID) used during an OSDP secure channel establishment.

The cUID is an 8-byte value composed of the vendor code and serial number.

Definition at line 9 of file ClientIdentification.cs.

Constructor & Destructor Documentation

◆ ClientIdentification()

OSDP.Net.Model.ClientIdentification.ClientIdentification ( byte[] vendorCode,
uint serialNumber )
inline

Creates a new ClientIdentification instance.

Parameters
vendorCodeVendor code (must be exactly 3 bytes)
serialNumberDevice serial number
Exceptions
ArgumentNullExceptionThrown when vendorCode is null
ArgumentExceptionThrown when vendorCode is not exactly 3 bytes

Definition at line 29 of file ClientIdentification.cs.

References SerialNumber, and VendorCode.

Member Function Documentation

◆ ToBytes()

byte[] OSDP.Net.Model.ClientIdentification.ToBytes ( )
inline

Converts the client identification to an 8-byte array for use in the secure channel protocol.

Format: Vendor Code (3 bytes) + Serial Number (4 bytes, little-endian) + Padding (1 byte)

Returns
8-byte array representing the cUID

Definition at line 45 of file ClientIdentification.cs.

References SerialNumber, and VendorCode.

◆ ToString()

override string OSDP.Net.Model.ClientIdentification.ToString ( )
inline

Returns a string representation of the client identification.

Definition at line 66 of file ClientIdentification.cs.

Property Documentation

◆ SerialNumber

uint OSDP.Net.Model.ClientIdentification.SerialNumber
get

Device serial number.

Stored as a 32-bit unsigned integer (4 bytes).

Definition at line 20 of file ClientIdentification.cs.

Referenced by ClientIdentification(), and ToBytes().

◆ VendorCode

byte [] OSDP.Net.Model.ClientIdentification.VendorCode
get

Vendor code assigned by the Security Industry Association (SIA).

Must be exactly 3 bytes.

Definition at line 15 of file ClientIdentification.cs.

Referenced by ClientIdentification(), and ToBytes().


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