QKnxNetIpTunnelingSlotInfo Class

The QKnxNetIpTunnelingSlotInfo class contains information about the individual address that is currently assigned to the tunneling slot as well as the current state of the tunneling slot. 更多...

頭: #include <QKnxNetIpTunnelingSlotInfo>
qmake: QT += knx
Since: Qt 5.12

該類在 Qt 5.12 引入。

公共類型

enum State { NotAvailable, Free, Authorized, Usable, Available }
flags Status

公共函數

QKnxNetIpTunnelingSlotInfo (QKnxNetIpTunnelingSlotInfo && other )
QKnxNetIpTunnelingSlotInfo (const QKnxNetIpTunnelingSlotInfo & other )
QKnxNetIpTunnelingSlotInfo (const QKnxAddress & ia , QKnxNetIpTunnelingSlotInfo::Status status )
QKnxNetIpTunnelingSlotInfo (const QKnxAddress & ia )
QKnxNetIpTunnelingSlotInfo ()
QKnxNetIpTunnelingSlotInfo & operator= (QKnxNetIpTunnelingSlotInfo && other )
QKnxNetIpTunnelingSlotInfo & operator= (const QKnxNetIpTunnelingSlotInfo & other )
~QKnxNetIpTunnelingSlotInfo ()
QKnxByteArray bytes () const
QKnxAddress individualAddress () const
bool isValid () const
void setIndividualAddress (const QKnxAddress & ia )
void setStatus (QKnxNetIpTunnelingSlotInfo::Status status )
QKnxNetIpTunnelingSlotInfo::Status status () const
void swap (QKnxNetIpTunnelingSlotInfo & other )
bool operator!= (const QKnxNetIpTunnelingSlotInfo & other ) const
bool operator== (const QKnxNetIpTunnelingSlotInfo & other ) const

靜態公共成員

QKnxNetIpTunnelingSlotInfo fromBytes (const QKnxByteArray & data , quint16 index )

詳細描述

If a KNXnet/IP server supports tunneling, it can send more detailed information about the supported tunnel connections. The tunneling slot info class can be used to represent this information. Usually it includes the individual addresses used for the connection once it has been established and whether the connection slot is available at all.

另請參閱 QKnxNetIpTunnelingInfoDibProxy , Qt KNX Tunneling Classes ,和 Qt KNXnet/IP Connection Classes .

成員類型文檔編製

enum QKnxNetIpTunnelingSlotInfo:: State
flags QKnxNetIpTunnelingSlotInfo:: Status

This enumeration describes the current state of the tunneling slot. Only if all values are set, the slot is available for a KNXnet/IP client connection.

常量 描述
QKnxNetIpTunnelingSlotInfo::NotAvailable 0x00000000 Indicates that the slot is not available for a KNXnet/IP client connection.
QKnxNetIpTunnelingSlotInfo::Free 0x00000001 Indicates whether this tunneling slot is currently free or not.
QKnxNetIpTunnelingSlotInfo::Authorized 0x00000002 Indications about the authorization of this tunneling slot.
QKnxNetIpTunnelingSlotInfo::Usable 0x00000004 Indicates whether this tunneling slot is currently usable or not.
QKnxNetIpTunnelingSlotInfo::Available Free | Authorized | Usable Indicates that the slot is available for a KNXnet/IP client connection.

The Status type is a typedef for QFlags <State>。它存儲 State 值的 OR (或) 組閤。

成員函數文檔編製

QKnxNetIpTunnelingSlotInfo:: QKnxNetIpTunnelingSlotInfo ( QKnxNetIpTunnelingSlotInfo && other )

Move-constructs an object instance, making it point to the same object that other 所指嚮的。

QKnxNetIpTunnelingSlotInfo:: QKnxNetIpTunnelingSlotInfo (const QKnxNetIpTunnelingSlotInfo & other )

構造副本為 other .

QKnxNetIpTunnelingSlotInfo:: QKnxNetIpTunnelingSlotInfo (const QKnxAddress & ia , QKnxNetIpTunnelingSlotInfo::Status status )

Creates a tunneling slot information object with the individual address set to ia and the status field set to status .

QKnxNetIpTunnelingSlotInfo:: QKnxNetIpTunnelingSlotInfo (const QKnxAddress & ia )

Creates a tunneling slot information object with the individual address set to ia and the status field set to NotAvailable .

QKnxNetIpTunnelingSlotInfo:: QKnxNetIpTunnelingSlotInfo ()

Creates a new empty invalid tunneling slot information object.

QKnxNetIpTunnelingSlotInfo &QKnxNetIpTunnelingSlotInfo:: operator= ( QKnxNetIpTunnelingSlotInfo && other )

移動賦值 other to this object instance.

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

賦值指定 other 到此對象。

QKnxNetIpTunnelingSlotInfo:: ~QKnxNetIpTunnelingSlotInfo ()

銷毀對象並釋放任何分配資源。

QKnxByteArray QKnxNetIpTunnelingSlotInfo:: bytes () const

Returns an array of data that represents the tunneling information slot object.

[static] QKnxNetIpTunnelingSlotInfo QKnxNetIpTunnelingSlotInfo:: fromBytes (const QKnxByteArray & data , quint16 index )

Constructs the tunneling information slot object from the byte array data starting at the position index inside the array.

QKnxAddress QKnxNetIpTunnelingSlotInfo:: individualAddress () const

Returns the individual address of the tunneling information slot object.

另請參閱 setIndividualAddress ().

bool QKnxNetIpTunnelingSlotInfo:: isValid () const

返迴 true if the tunneling slot information is valid; otherwise returns false . The object is considered valid if the individual address is valid and the status field is properly set.

void QKnxNetIpTunnelingSlotInfo:: setIndividualAddress (const QKnxAddress & ia )

Sets the individual address of the tunneling information slot object to ia if the passed argument is a valid QKnxAddress and of type QKnxAddress::Individual .

另請參閱 individualAddress ().

void QKnxNetIpTunnelingSlotInfo:: setStatus ( QKnxNetIpTunnelingSlotInfo::Status status )

Sets the status of the tunneling information slot object to status if the passed argument is a valid.

另請參閱 status ().

QKnxNetIpTunnelingSlotInfo::Status QKnxNetIpTunnelingSlotInfo:: status () const

Returns the status of the tunneling information slot object.

另請參閱 setStatus ().

void QKnxNetIpTunnelingSlotInfo:: swap ( QKnxNetIpTunnelingSlotInfo & other )

交換 other 與此對象。此操作很快且從不失敗。

bool QKnxNetIpTunnelingSlotInfo:: operator!= (const QKnxNetIpTunnelingSlotInfo & other ) const

返迴 true if this object and the given other 不相等;則返迴 false .

bool QKnxNetIpTunnelingSlotInfo:: operator== (const QKnxNetIpTunnelingSlotInfo & other ) const

返迴 true if this object and the given other 相等;否則返迴 false .