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>. It stores an OR combination of State values.

成员函数文档编制

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 .