Arendi.BleLibrary  4.5.1.999
Core-Library (PCL)
Arendi.BleLibrary.Uuid Class Reference

Class representing a bluetooth UUID. More...

Public Member Functions

 Uuid (byte[] uuid)
 Create a UUID. More...
 
 Uuid (UInt16 uuid)
 Create a UUID. More...
 
 Uuid (UInt32 uuid)
 Create a UUID. More...
 
 Uuid (ulong uuid)
 Create a UUID. More...
 
 Uuid (string uuid)
 Create a UUID. More...
 
bool IsSigShortService ()
 Checks if the uuid is defined by Bluetooth SIG as a GATT service More...
 
bool IsSigShortDeclaration ()
 Checks if the uuid is defined by Bluetooth SIG as a GATT declaration More...
 
bool IsSigShortDescriptor ()
 Checks if the uuid is defined by Bluetooth SIG as a GATT descriptor More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
override int GetHashCode ()
 Serves as the default hash function. More...
 
override string ToString ()
 Returns a string that represents the current object. More...
 
string ToStringUpper ()
 Convert UUID to an upper cased string. More...
 
string ToStringLower ()
 Convert UUID to an lower cased string. More...
 

Static Public Member Functions

static Uuid ConvertTo128BitBluetoothUuid (Uuid uuid)
 Convert a UUID to a 128 bit Bluetooth UUID. More...
 
static bool operator== (Uuid a, Uuid b)
 Implementation for the == operator. More...
 
static bool operator!= (Uuid a, Uuid b)
 Implementation for the != operator. More...
 
static operator UInt16 (Uuid uuid)
 Define explicit converter for Uuid to UInt16 conversion. More...
 
static operator Uuid (UInt16 val)
 Define explicit converter for UInt16 to Uuid conversion. More...
 

Properties

byte [] Data [get]
 Get the binary UUID data. More...
 
int Length [get]
 Get the length of the UUID. More...
 

Detailed Description

Class representing a bluetooth UUID.

Constructor & Destructor Documentation

§ Uuid() [1/5]

Arendi.BleLibrary.Uuid.Uuid ( byte []  uuid)

Create a UUID.

Parameters
uuidByte array with the UUID.

§ Uuid() [2/5]

Arendi.BleLibrary.Uuid.Uuid ( UInt16  uuid)

Create a UUID.

Parameters
uuidUInt16 value with the UUID.

§ Uuid() [3/5]

Arendi.BleLibrary.Uuid.Uuid ( UInt32  uuid)

Create a UUID.

Parameters
uuidUInt32 value with the UUID.

§ Uuid() [4/5]

Arendi.BleLibrary.Uuid.Uuid ( ulong  uuid)

Create a UUID.

Parameters
uuidUlong with the UUID.

§ Uuid() [5/5]

Arendi.BleLibrary.Uuid.Uuid ( string  uuid)

Create a UUID.

Parameters
uuidString with the UUID.

Member Function Documentation

§ ConvertTo128BitBluetoothUuid()

static Uuid Arendi.BleLibrary.Uuid.ConvertTo128BitBluetoothUuid ( Uuid  uuid)
static

Convert a UUID to a 128 bit Bluetooth UUID.

If the given UUID is already 128 bits a copy of this object is returned. If the given UUID has a length of 16 or 32 bits it will be converted to a Bluetooth SIG UUID with length of 128 bits. This is done by inserting the short UUID in the Bluetooth base UUID YYYYXXXX-0000-1000-8000-00805f9b34fb.

Parameters
uuidUUID to be converted to a 128-Bit UUID.
Returns
Created UUID with 128Bit width.

§ Equals()

override bool Arendi.BleLibrary.Uuid.Equals ( object  obj)

Determines whether the specified object is equal to the current object.

Returns
true if the specified object is equal to the current object; otherwise, false.
Parameters
objThe object to compare with the current object.

§ GetHashCode()

override int Arendi.BleLibrary.Uuid.GetHashCode ( )

Serves as the default hash function.

Returns
A hash code for the current object.

§ IsSigShortDeclaration()

bool Arendi.BleLibrary.Uuid.IsSigShortDeclaration ( )

Checks if the uuid is defined by Bluetooth SIG as a GATT declaration

Returns
Returns true if the uuid is in the GATT declaration range from 0x2800 to 0x28FF

§ IsSigShortDescriptor()

bool Arendi.BleLibrary.Uuid.IsSigShortDescriptor ( )

Checks if the uuid is defined by Bluetooth SIG as a GATT descriptor

Returns
Returns true if the uuid is in the GATT descriptor range from 0x2900 to 0x29FF

§ IsSigShortService()

bool Arendi.BleLibrary.Uuid.IsSigShortService ( )

Checks if the uuid is defined by Bluetooth SIG as a GATT service

Returns
Returns true if the uuid is in the GATT service range from 0x1800 to 0x18FF

§ operator UInt16()

static Arendi.BleLibrary.Uuid.operator UInt16 ( Uuid  uuid)
explicitstatic

Define explicit converter for Uuid to UInt16 conversion.

Parameters
uuidUUID to convert to an UInt16 value.

§ operator Uuid()

static Arendi.BleLibrary.Uuid.operator Uuid ( UInt16  val)
explicitstatic

Define explicit converter for UInt16 to Uuid conversion.

Parameters
valUInt16 value to convert to an UUID.

§ operator!=()

static bool Arendi.BleLibrary.Uuid.operator!= ( Uuid  a,
Uuid  b 
)
static

Implementation for the != operator.

Parameters
aFirst UUID.
bSecond UUID.
Returns
true if the UUIDs are not equal, false if they are.

§ operator==()

static bool Arendi.BleLibrary.Uuid.operator== ( Uuid  a,
Uuid  b 
)
static

Implementation for the == operator.

Parameters
aFirst UUID.
bSecond UUID.
Returns
true if the UUIDs are equal, false if not.

§ ToString()

override string Arendi.BleLibrary.Uuid.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

§ ToStringLower()

string Arendi.BleLibrary.Uuid.ToStringLower ( )

Convert UUID to an lower cased string.

Returns
Lower cased string of this UUID.

§ ToStringUpper()

string Arendi.BleLibrary.Uuid.ToStringUpper ( )

Convert UUID to an upper cased string.

Returns
Upper cased string of this UUID.

Property Documentation

§ Data

byte [] Arendi.BleLibrary.Uuid.Data
get

Get the binary UUID data.

§ Length

int Arendi.BleLibrary.Uuid.Length
get

Get the length of the UUID.