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

Extension methods for helping with binary conversion. More...

Static Public Member Functions

static byte ReverseBits (this byte value)
 Reverse the bits of a single byte.
static bool IsHex (this char c)
 Tests to see if character is a valid hex digit.
static int HexToInt (this char value)
 Converts a single hex digit character to its integer representation.

Detailed Description

Extension methods for helping with binary conversion.

Definition at line 8 of file BinaryExtensions.cs.

Member Function Documentation

◆ HexToInt()

int OSDP.Net.Utilities.BinaryExtensions.HexToInt ( this char value)
static

Converts a single hex digit character to its integer representation.

Parameters
valueCharacter to be converted
Returns
Integer representation of the input character
Exceptions
InvalidOperationException

◆ IsHex()

bool OSDP.Net.Utilities.BinaryExtensions.IsHex ( this char c)
static

Tests to see if character is a valid hex digit.

Parameters
cvalue to be tested
Returns
true if valid hex; false otherwise

◆ ReverseBits()

byte OSDP.Net.Utilities.BinaryExtensions.ReverseBits ( this byte value)
inlinestatic

Reverse the bits of a single byte.

Parameters
valuebyte to be converted
Returns
Same byte with its bits reversed

Definition at line 15 of file BinaryExtensions.cs.


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