Virgil IoT KIT
Public Member Functions
VSQMac Class Reference

Virgil IoT Kit device MAC address. More...

#include <VSQMac.h>

Public Member Functions

 VSQMac ()
 Default MAC address constructor. More...
 
 VSQMac (const VSQMac &)=default
 MAC address copy constructor. More...
 
 VSQMac (const VirgilIoTKit::vs_mac_addr_t &mac)
 Initialize MAC address from VirgilIoTKit::vs_mac_addr_t. More...
 
 VSQMac (const QString &mac)
 Initialize MAC address from QString. More...
 
 VSQMac (const quint8 *bytes)
 Initialize MAC address from bytes array. More...
 
 VSQMac (quint8 b0, quint8 b1, quint8 b2, quint8 b3, quint8 b4, quint8 b5)
 Initialize MAC address by bytes. More...
 
VSQMacoperator= (const VirgilIoTKit::vs_mac_addr_t &mac)
 Assign MAC address. More...
 
VSQMacoperator= (const VSQMac &mac)
 Assign MAC address. More...
 
VSQMacoperator= (const QString &mac)
 Assign MAC address. More...
 
VSQMacoperator= (const quint8 *bytes)
 Assign MAC address. More...
 
bool operator== (const VSQMac &mac) const
 Compare MAC addresses. More...
 
QString description () const
 Describe MAC address. More...
 
bool equal (const VSQMac &mac) const
 Compare MAC addresses. More...
 
 operator VirgilIoTKit::vs_mac_addr_t () const
 Get current MAC address as vs_mac_addr_t. More...
 
 operator const char * () const
 Get current MAC address as bytes array. More...
 
 operator QString () const
 Get MAC address as string. More...
 

Detailed Description

Virgil IoT Kit device MAC address.

Constructor & Destructor Documentation

◆ VSQMac() [1/6]

VSQMac::VSQMac ( )
inline

Default MAC address constructor.

◆ VSQMac() [2/6]

VSQMac::VSQMac ( const VSQMac )
default

MAC address copy constructor.

◆ VSQMac() [3/6]

VSQMac::VSQMac ( const VirgilIoTKit::vs_mac_addr_t &  mac)
inline

Initialize MAC address from VirgilIoTKit::vs_mac_addr_t.

◆ VSQMac() [4/6]

VSQMac::VSQMac ( const QString &  mac)
inline

Initialize MAC address from QString.

Warning
String must be as "11:22:33:44:55:66". If it does not match this template, invalidMac will be copied

◆ VSQMac() [5/6]

VSQMac::VSQMac ( const quint8 *  bytes)
inline

Initialize MAC address from bytes array.

◆ VSQMac() [6/6]

VSQMac::VSQMac ( quint8  b0,
quint8  b1,
quint8  b2,
quint8  b3,
quint8  b4,
quint8  b5 
)
inline

Initialize MAC address by bytes.

Member Function Documentation

◆ description()

QString VSQMac::description ( ) const

Describe MAC address.

Call this function to receive text description.

Returns
MAC address text description
Here is the caller graph for this function:

◆ equal()

bool VSQMac::equal ( const VSQMac mac) const
inline

Compare MAC addresses.

Parameters
macMAC address to compare with the current one
Returns
true if they are equal
Here is the caller graph for this function:

◆ operator const char *()

VSQMac::operator const char * ( ) const
inline

Get current MAC address as bytes array.

◆ operator QString()

VSQMac::operator QString ( ) const
inline

Get MAC address as string.

Here is the call graph for this function:

◆ operator VirgilIoTKit::vs_mac_addr_t()

VSQMac::operator VirgilIoTKit::vs_mac_addr_t ( ) const

Get current MAC address as vs_mac_addr_t.

◆ operator=() [1/4]

VSQMac& VSQMac::operator= ( const QString &  mac)
inline

Assign MAC address.

Parameters
macMAC address as string
Returns
Reference to the VSQMac current instance

◆ operator=() [2/4]

VSQMac& VSQMac::operator= ( const quint8 *  bytes)
inline

Assign MAC address.

Parameters
macMAC address as bytes array
Returns
Reference to the VSQMac current instance

◆ operator=() [3/4]

VSQMac& VSQMac::operator= ( const VirgilIoTKit::vs_mac_addr_t &  mac)
inline

Assign MAC address.

Parameters
macMAC address to be copied
Returns
Reference to the VSQMac current instance

◆ operator=() [4/4]

VSQMac& VSQMac::operator= ( const VSQMac mac)
inline

Assign MAC address.

Parameters
macMAC address to be copied
Returns
Reference to the VSQMac current instance

◆ operator==()

bool VSQMac::operator== ( const VSQMac mac) const
inline

Compare MAC addresses.

Parameters
macMAC address to be compared with the current one
Returns
true if both MAC address are equal
Here is the call graph for this function:

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