Builder Class

class QKnxNetIpCurrentConfigDibProxy::Builder

The QKnxNetIpCurrentConfigDibProxy::Builder class creates a KNXnet/IP current IP configuration DIB structure. More...

Public Functions

QKnxNetIpDib create() const
Builder &setAssignmentMethod(QKnxNetIp::AssignmentMethod method)
Builder &setDefaultGateway(const QHostAddress &gateway)
Builder &setDhcpOrBootP(const QHostAddress &dhcpBootP)
Builder &setIpAddress(const QHostAddress &ipAddress)
Builder &setSubnetMask(const QHostAddress &subnetMask)

Detailed Description

A KNXnet/IP current IP configuration DIB structure contains a set of values currently used on the device for IP communication.

The common way to create such a DIB structure is:

// setup the IP configuration values

auto dib = QKnxNetIpCurrentConfigDibProxy::builder()
    .setIpAddress(address)
    .setSubnetMask(subnetMask)
    .setDefaultGateway(gateway)
    .setDhcpOrBootP(dhcp)
    .setAssignmentMethod(QKnxNetIp::AssignmentMethod::Dhcp)
    .create();

Member Function Documentation

QKnxNetIpDib Builder::create() const

Creates and returns a QKnxNetIpDib.

Note: The returned structure may be invalid depending on the values used during setup.

See also isValid().

Builder &Builder::setAssignmentMethod(QKnxNetIp::AssignmentMethod method)

Sets the currently employed IP address assignment method to method if the passed argument is valid and returns a reference to the builder.

Note: Only one method can be set at a time.

Builder &Builder::setDefaultGateway(const QHostAddress &gateway)

Sets the currently used default gateway to gateway if the passed argument is a valid QHostAddress and returns a reference to the builder.

Builder &Builder::setDhcpOrBootP(const QHostAddress &dhcpBootP)

Sets the IP address of the DHCP/BootP server the KNXnet/IP device last received its IP address from to dhcpBootP if the passed argument is a valid QHostAddress and returns a reference to the builder.

Builder &Builder::setIpAddress(const QHostAddress &ipAddress)

Sets the currently used IP address to ipAddress if the passed argument is a valid QHostAddress and returns a reference to the builder.

Builder &Builder::setSubnetMask(const QHostAddress &subnetMask)

Sets the currently used subnet mask to subnetMask if the passed argument is a valid QHostAddress and returns a reference to the builder.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.