map/das-dn/third_party/AdsLib/Router.h
2024-12-09 09:41:04 +08:00

24 lines
469 B
C++

// SPDX-License-Identifier: MIT
/**
Copyright (c) 2015 - 2022 Beckhoff Automation GmbH & Co. KG
*/
#pragma once
#include "AdsDef.h"
namespace Beckhoff
{
namespace Ads
{
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() {}
virtual long GetAmsAddr(uint16_t port, AmsAddr* pAddr) = 0;
};
}
}