Builder Class

class QKnxNetIpDeviceDibProxy::Builder

The QKnxNetIpDeviceDibProxy::Builder class creates a KNXnet/IP device information DIB structure. More...

Public Functions

QKnxNetIpDib create() const
Builder &setDeviceName(const QByteArray &deviceName)
Builder &setDeviceStatus(QKnxNetIp::ProgrammingMode mode)
Builder &setIndividualAddress(const QKnxAddress &address)
Builder &setMacAddress(const QKnxByteArray &macAddress)
Builder &setMediumType(QKnx::MediumType mediumType)
Builder &setMulticastAddress(const QHostAddress &multicastAddress)
Builder &setProjectInstallationId(quint16 projectId)
Builder &setSerialNumber(const QKnxByteArray &serialNumber)

Detailed Description

A KNXnet/IP device information DIB structure contains specific information about a KNXnet/IP device.

The common way to create such a DIB structure is:

// setup the device information

auto dib = QKnxNetIpDeviceDibProxy::builder()
   .setMediumType(mediumType)
   .setDeviceStatus(programmingMode);
   .setIndividualAddress(individualAddress)
   .setProjectInstallationId(projectId)
   .setSerialNumber(serialNumber)
   .setMulticastAddress(multicastAddress)
   .setMacAddress(macAddress)
   .setDeviceName(deviceName)
   .create();

Member Function Documentation

QKnxNetIpDib Builder::create() const

Creates and returns a generic QKnxNetIpDib containing the specific device information of a KNXnet/IP device.

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

See also isValid().

Builder &Builder::setDeviceName(const QByteArray &deviceName)

Sets the device name to deviceName and returns a reference to the builder.

Note: The size of the device name may not contain more than 30 characters.

Builder &Builder::setDeviceStatus(QKnxNetIp::ProgrammingMode mode)

Sets the device status to mode if the passed argument is a valid QKnx::NetIp::ProgrammingMode and returns a reference to the builder.

Builder &Builder::setIndividualAddress(const QKnxAddress &address)

Sets the individual address to address if the passed argument is a valid QKnxAddress and of type QKnxAddress::Individual and returns a reference to the builder.

Builder &Builder::setMacAddress(const QKnxByteArray &macAddress)

Sets the MAC address to macAddress and returns a reference to the builder. By default it is set to the KNXnet/IP System Setup Multicast Address.

Note: The MAC address must contain exactly 6 bytes.

Builder &Builder::setMediumType(QKnx::MediumType mediumType)

Sets the medium type to mediumType if the passed argument is a valid QKnx::MediumType and returns a reference to the builder.

Builder &Builder::setMulticastAddress(const QHostAddress &multicastAddress)

Sets the multicast address to multicastAddress if the passed argument is a valid QHostAddress and returns a reference to the builder.

Builder &Builder::setProjectInstallationId(quint16 projectId)

Sets the KNX project installation ID to projectId and returns a reference to the builder.

Builder &Builder::setSerialNumber(const QKnxByteArray &serialNumber)

Sets the serial number to serialNumber and returns a reference to the builder.

Note: The serial number must contain exactly 6 bytes.

© 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.