map/das-dn/third_party/AdsLib/Router.h

24 lines
469 B
C
Raw Normal View History

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"
2024-12-09 09:41:04 +08:00
namespace Beckhoff
{
namespace Ads
{
2024-12-03 10:36:06 +08:00
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-09 09:41:04 +08:00
virtual long GetAmsAddr(uint16_t port, AmsAddr* pAddr) = 0;
2024-12-03 10:36:06 +08:00
};
2024-12-09 09:41:04 +08:00
}
}