Builder Class

class QKnxNetIpDeviceDibProxy ::Builder

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

公共函数

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 )

详细描述

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

成员函数文档编制

QKnxNetIpDib Builder:: create () const

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

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

另请参阅 isValid ().

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

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

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

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

注意: The serial number must contain exactly 6 bytes.