8211514fe3
- Added support for OAM router configuration in app_main, allowing the IP interface individual address to be set based on the OAM router's individual address. - Updated GatewayBridgeService to validate IP interface addresses only when OAM router is disabled, ensuring proper address management. - Introduced KnxResponseDeduplicator to prevent duplicate responses in KNX communication. - Enhanced ETS device runtime to handle bus frames and set up frame receivers for OAM router. - Improved GatewayKnxTpIpRouter to manage OAM router interactions, including handling tunnel frames and bus frames. - Updated CMakeLists to include new knx_device_broker source file. - Refined logging messages to provide clearer context regarding the IP interface being used. - Added methods to retrieve IP interface names and friendly names based on the OAM router configuration. Signed-off-by: Tony <tonylu@tony-cloud.com>
38 lines
763 B
C++
38 lines
763 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace gateway {
|
|
|
|
enum class KnxPortKind : uint8_t {
|
|
kIpTunnel,
|
|
kIpRouting,
|
|
kTpUart,
|
|
kCloud,
|
|
kRfReserved,
|
|
};
|
|
|
|
struct KnxIngressContext {
|
|
KnxPortKind port{KnxPortKind::kIpTunnel};
|
|
bool oam_persona_hint{false};
|
|
bool broadcast_management{false};
|
|
};
|
|
|
|
class KnxResponseDeduplicator {
|
|
public:
|
|
KnxResponseDeduplicator() = default;
|
|
KnxResponseDeduplicator(const uint8_t* original, size_t len);
|
|
|
|
bool remember(const uint8_t* data, size_t len);
|
|
bool remember(const std::vector<uint8_t>& data);
|
|
size_t suppressedCount() const;
|
|
|
|
private:
|
|
std::vector<uint8_t> original_;
|
|
std::vector<std::vector<uint8_t>> sent_;
|
|
size_t suppressed_count_{0};
|
|
};
|
|
|
|
} // namespace gateway
|