QKnxNetIpDeviceManagement Class

The QKnxNetIpDeviceManagement class enables the opening and handling of a device management connection from a KNXnet/IP client to a KNXnet/IP server. 更多...

头: #include <QKnxNetIpDeviceManagement>
qmake: QT += knx
继承: QKnxNetIpEndpointConnection

公共函数

QKnxNetIpDeviceManagement (const QHostAddress & localAddress , quint16 localPort , QObject * parent = nullptr)
QKnxNetIpDeviceManagement (const QHostAddress & localAddress , QObject * parent = nullptr)
QKnxNetIpDeviceManagement (QObject * parent = nullptr)
bool sendFrame (const QKnxDeviceManagementFrame & frame )

信号

void frameReceived (QKnxDeviceManagementFrame frame )

详细描述

A device management connection is established from a KNXnet/IP client to a KNXnet/IP server endpoint to access management functionalities on the server. The IP address of the client must be set. The client uses the connection to send device configuration request frames to the server.

The following code sample illustrates how to connect to the server, request a data connection, and use the connection:

QKnxNetIpDeviceManagement connection;
QHostAddress clientLocalAddress = ...
connection.setLocalAddress(clientLocalAddress);
QHostAddress knxNetIpServerAddress = ...
quint16 knxNetIpServerDataEndPointPort = ...
connection.connectToHost(knxNetIpServerAddress, knxNetIpServerDataEndPointPort);
QKnxDeviceManagementFrame frame = ...
connection.sendFrame(frame);
					

另请参阅 QKnxDeviceManagementFrame , Qt KNX Device Management Classes ,和 Qt KNXnet/IP Connection Classes .

成员函数文档编制

QKnxNetIpDeviceManagement:: QKnxNetIpDeviceManagement (const QHostAddress & localAddress , quint16 localPort , QObject * parent = nullptr)

Creates a device management connection with the KNXnet/IP client address localAddress , port number localPort , and parent parent .

QKnxNetIpDeviceManagement:: QKnxNetIpDeviceManagement (const QHostAddress & localAddress , QObject * parent = nullptr)

Creates a device management connection with the KNXnet/IP client address localAddress 和父级 parent .

QKnxNetIpDeviceManagement:: QKnxNetIpDeviceManagement ( QObject * parent = nullptr)

Creates a device management connection with the parent parent .

[signal] void QKnxNetIpDeviceManagement:: frameReceived ( QKnxDeviceManagementFrame frame )

This signal is emitted when the KNXnet/IP client receives data (with the link layer frame frame as payload) from the KNXnet/IP server.

bool QKnxNetIpDeviceManagement:: sendFrame (const QKnxDeviceManagementFrame & frame )

Inserts the device management frame frame into a request that is sent to a KNXnet/IP server.

If no connection is currently established, returns false and does not send the frame.

另请参阅 QKnxNetIpEndpointConnection::State .