MacAddress Class

class QKnxNetIpSrpProxy ::MacAddress

The QKnxNetIpSrpProxy::MacAddress class provides the means to create the Select By MAC Address SRP for the extended search request. 更多...

该类在 Qt 5.12 引入。

公共函数

MacAddress (const MacAddress & other )
MacAddress ()
MacAddress & operator= (const MacAddress & other )
~MacAddress ()
QKnxNetIpSrp create () const
MacAddress & setMac (const QKnxByteArray & macAdd )
MacAddress & setMandatory (bool value )

详细描述

The client includes this SRP to indicate that it is interested only in the response from the KNXnet/IP server with the given MAC address. If the KNXnet/IP server’s MAC address is different from the given MAC address, then it does not respond to this search request.

注意: By default the mandatory flag is set to true .

The common way to create this SRP is:

auto macAddress = QKnxByteArray::fromHex("4CCC6AE40000");
auto srpMac = QKnxNetIpSrpProxy::macAddressBuilder()
    .setMac(macAddress)
    .create();
					

另请参阅 QKnxNetIpSearchRequestProxy .

成员函数文档编制

MacAddress:: MacAddress (const MacAddress & other )

构造副本为 other .

MacAddress:: MacAddress ()

Constructs a builder for a Select By MAC Address SRP.

MacAddress &MacAddress:: operator= (const MacAddress & other )

赋值 other to this MAC Address builder and returns a reference.

MacAddress:: ~MacAddress ()

销毁对象并释放任何分配资源。

QKnxNetIpSrp MacAddress:: create () const

Creates a Select By MAC Address SRP.

MacAddress &MacAddress:: setMac (const QKnxByteArray & macAdd )

Sets the MAC address macAdd to be used by the builder.

MacAddress &MacAddress:: setMandatory ( bool value )

Sets the mandatory flag bit to value .

注意: The mandatory bit is the first significant bit of the Type Code field.