Builder Class

class QKnxNetIpCurrentConfigDibProxy ::Builder

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

公共函数

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 )

详细描述

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();
					

成员函数文档编制

QKnxNetIpDib Builder:: create () const

创建并返回 QKnxNetIpDib .

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

另请参阅 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.

注意: 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.