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 .
Creates a device management connection with the KNXnet/IP client address localAddress , port number localPort , and parent parent .
Creates a device management connection with the KNXnet/IP client address localAddress 和父级 parent .
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.
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.