It has been a while since our last KNX development blog post, so we would like to give you a quick glance into some of the updates in QtKNX that are coming with the 5.11 release.
One of the main improvements in this update was making Qt KNX's object introspection and construction more intuitive. To deal with the high number of specializations needed for the KNXnet/IP frame, we've included the proxy pattern. For example, the information carried by a KNXnet/IP connection request frame can be accessed by the QKnxNetIpConnectRequestProxy class.
Here is an example of how to use it while implementing the KNXnet/IP server side receiving a connection request frame:
QKnxNetIpFrame frame = //...;
auto ctrlEndpoint = request.controlEndpoint();
auto dataEndpoint = request.dataEndpoint();
auto cri = request.requestInformation();
Because the frame is a structure that has many fields, having to know the exact order of parameters that can be passed to the constructor makes it difficult to use correctly. To make this easier, we have introduced the builder pattern. It allows us to encapsulate the construction and thus provide a more flexible solution.
auto frame = QKnxNetIpConnectRequestProxy::builder()
The proxy and builder patterns have been included in most of the QtKNX classes.
ETS KNX project file parsing
Another interesting functionality that we will now support is the ability to extract information from an ETS KNX project file, specifically the group addresses and its associated data point types (DPT). For those not so familiarized with the KNX world, ETS stands for Engineering Tool Software, it's a tool for the design and the commissioning of KNX installations.
Here is an example of how to use the functionality and request the parsing of an ETS KNX project file: