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 .
注意: The returned structure may be invalid depending on the values used during setup.
另请参阅 isValid ().
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.
Sets the currently used default gateway to gateway if the passed argument is a valid QHostAddress and returns a reference to the builder.
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.
Sets the currently used IP address to ipAddress if the passed argument is a valid QHostAddress and returns a reference to the builder.
Sets the currently used subnet mask to subnetMask if the passed argument is a valid QHostAddress and returns a reference to the builder.