2024-12-03 10:36:06 +08:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
/**
|
|
|
|
Copyright (c) 2015 - 2022 Beckhoff Automation GmbH & Co. KG
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AdsDef.h"
|
|
|
|
|
|
|
|
struct Router {
|
|
|
|
static const size_t NUM_PORTS_MAX = 128;
|
|
|
|
static const uint16_t PORT_BASE = 30000;
|
|
|
|
static_assert(NUM_PORTS_MAX + PORT_BASE <= UINT16_MAX, "Port limit is out of range");
|
|
|
|
virtual ~Router() {}
|
|
|
|
|
2024-12-05 11:04:47 +08:00
|
|
|
virtual long GetLocalAddress(uint16_t port, AmsAddr* pAddr) = 0;
|
2024-12-03 10:36:06 +08:00
|
|
|
};
|