From 2fbb76efbdc7edfe536a53f75c4dd20972ed00da Mon Sep 17 00:00:00 2001 From: nanosonde <2073569+nanosonde@users.noreply.github.com> Date: Thu, 5 Dec 2019 19:13:16 +0100 Subject: [PATCH] Fix compilation of bau57b0 class --- src/knx/bau57B0.cpp | 25 +++++++++++++++++++++++++ src/knx/bau57B0.h | 1 + 2 files changed, 26 insertions(+) diff --git a/src/knx/bau57B0.cpp b/src/knx/bau57B0.cpp index 648d777..a97e320 100644 --- a/src/knx/bau57B0.cpp +++ b/src/knx/bau57B0.cpp @@ -47,6 +47,31 @@ InterfaceObject* Bau57B0::getInterfaceObject(uint8_t idx) } } +InterfaceObject* Bau57B0::getInterfaceObject(ObjectType objectType, uint8_t objectInstance) +{ + // We do not use it right now. + // Required for coupler mode as there are multiple router objects for example + (void) objectInstance; + + switch (objectType) + { + case OT_DEVICE: + return &_deviceObj; + case OT_ADDR_TABLE: + return &_addrTable; + case OT_ASSOC_TABLE: + return &_assocTable; + case OT_GRP_OBJ_TABLE: + return &_groupObjTable; + case OT_APPLICATION_PROG: + return &_appProgram; + case OT_IP_PARAMETER: + return &_ipParameters; + default: + return nullptr; + } +} + uint8_t* Bau57B0::descriptor() { return _descriptor; diff --git a/src/knx/bau57B0.h b/src/knx/bau57B0.h index 8835150..5490b37 100644 --- a/src/knx/bau57B0.h +++ b/src/knx/bau57B0.h @@ -11,6 +11,7 @@ class Bau57B0 : public BauSystemB protected: InterfaceObject* getInterfaceObject(uint8_t idx); + InterfaceObject* getInterfaceObject(ObjectType objectType, uint8_t objectInstance); uint8_t* descriptor(); DataLinkLayer& dataLinkLayer();