@@ -17,13 +17,21 @@ Bau091A::Bau091A(Platform& platform)
1717 : BauSystemBCoupler(platform),
1818 _routerObj(memory(), 0x200, 0x2000), // the Filtertable of 0x091A IP Routers is fixed at 0x200 and 0x2000 long
1919 _ipParameters(_deviceObj, platform),
20- _dlLayerPrimary(_deviceObj, _ipParameters, _netLayer.getPrimaryInterface(), _platform, *this, (DataLinkLayerCallbacks*) this),
20+ _dlLayerPrimary(_deviceObj, _ipParameters, _netLayer.getPrimaryInterface(), _platform, *this,
21+ #ifdef KNX_TUNNELING
22+ _ipTunnelServer,
23+ #endif
24+ (DataLinkLayerCallbacks*) this ),
2125 _dlLayerSecondary (_deviceObj, _netLayer.getSecondaryInterface(), platform, *this, (ITpUartCallBacks&) *this, (DataLinkLayerCallbacks*) this),
2226 DataLinkLayerCallbacks()
2327#ifdef USE_CEMI_SERVER
2428 ,
2529 _cemiServer (*this )
2630#endif
31+ #ifdef KNX_TUNNELING
32+ ,
33+ _ipTunnelServer (_deviceObj, _ipParameters, platform, _cemiServer)
34+ #endif
2735{
2836 // Before accessing anything of the router object they have to be initialized according to the used medium
2937 // Coupler model 1.x
@@ -159,6 +167,7 @@ void Bau091A::loop()
159167 _dlLayerPrimary.loop ();
160168 _dlLayerSecondary.loop ();
161169 BauSystemBCoupler::loop ();
170+ _ipTunnelServer.loop ();
162171}
163172
164173TPAckType Bau091A::isAckRequired (uint16_t address, bool isGrpAddr)
@@ -195,7 +204,7 @@ TPAckType Bau091A::isAckRequired(uint16_t address, bool isGrpAddr)
195204 }
196205 }
197206#ifdef KNX_TUNNELING
198- if (_dlLayerPrimary .isSentToTunnel (address, isGrpAddr))
207+ if (_ipTunnelServer .isSentToTunnel (address, isGrpAddr))
199208 ack = TPAckType::AckReqAck;
200209#endif
201210 }
@@ -212,7 +221,7 @@ TPAckType Bau091A::isAckRequired(uint16_t address, bool isGrpAddr)
212221 ack = TPAckType::AckReqNone;
213222
214223#ifdef KNX_TUNNELING
215- if (_dlLayerPrimary .isSentToTunnel (address, isGrpAddr))
224+ if (_ipTunnelServer .isSentToTunnel (address, isGrpAddr))
216225 ack = TPAckType::AckReqAck;
217226#endif
218227
0 commit comments