Skip to content

Commit

Permalink
wip TunnelOpti
Browse files Browse the repository at this point in the history
  • Loading branch information
Ing-Dom committed Jun 3, 2024
1 parent c98ccf4 commit fc69f08
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/knx/data_link_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,22 @@ void DataLinkLayer::dataRequestFromTunnel(CemiFrame& frame)

frame.messageCode(L_data_ind);

// Send to local stack
// Send to local stack ( => cemiServer for potential other tunnel and network layer for routing)
frameReceived(frame);

// TunnelOpti
if(frame.addressType() == AddressType::IndividualAddress && frame.destinationAddress() == _deviceObject.individualAddress())
{
// don't Send to KNX medium because its only for us (Tunnel-Server)
return;
}

//if(frame.addressType() == AddressType::IndividualAddress && frame.destinationAddress() one_of(tunnel-Addresses))
//{
// // don't Send to KNX medium because its only for us (Tunnel-Server)
// return;
//}

// Send to KNX medium
sendFrame(frame);
}
Expand Down Expand Up @@ -197,6 +210,12 @@ bool DataLinkLayer::sendTelegram(NPDU & npdu, AckType ack, uint16_t destinationA
// frame.apdu().printPDU();
// }

// TunnelOpti
//if(_networkLayerEntity.getEntityIndex() == 1 && frame.addressType() == AddressType::IndividualAddress && frame.destinationAddress() one_of(tunnel-Addresses))
{
// don't Send to KNX medium because its only for the Tunnel-Client)
}

// The data link layer might be an open media link layer
// and will setup rfSerialOrDoA, rfInfo and rfLfn that we also
// have to send through the cEMI server tunnel
Expand Down

0 comments on commit fc69f08

Please sign in to comment.