|
AdsLib
|
#include <AmsRouter.h>
Public Member Functions | |
| AmsRouter (AmsNetId netId=AmsNetId {}) | |
| uint16_t | OpenPort () |
| long | ClosePort (uint16_t port) |
| long | GetLocalAddress (uint16_t port, AmsAddr *pAddr) |
| void | SetLocalAddress (AmsNetId netId) |
| long | GetTimeout (uint16_t port, uint32_t &timeout) |
| long | SetTimeout (uint16_t port, uint32_t timeout) |
| long | AddNotification (AmsRequest &request, uint32_t *pNotification, std::shared_ptr< Notification > notify) |
| long | DelNotification (uint16_t port, const AmsAddr *pAddr, uint32_t hNotification) |
| long | AddRoute (AmsNetId ams, const IpV4 &ip) |
| long | AddRoute (AmsNetId ams, const std::string &host) |
| void | DelRoute (const AmsNetId &ams) |
| AmsConnection * | GetConnection (const AmsNetId &pAddr) |
| long | AdsRequest (AmsRequest &request) |
| virtual long | GetLocalAddress (uint16_t port, AmsAddr *pAddr)=0 |
Additional Inherited Members | |
Static Public Attributes inherited from Router | |
| static const size_t | NUM_PORTS_MAX = 128 |
| static const uint16_t | PORT_BASE = 30000 |
Copyright (c) 2015 - 2022 Beckhoff Automation GmbH & Co. KG
Copyright (c) 2015 - 2022 Beckhoff Automation GmbH & Co. KG
We keep this madness only for backwards compatibility, to give downstream projects time to migrate to the much saner interface.
| long AmsRouter::AddRoute | ( | AmsNetId | ams, |
| const std::string & | host | ||
| ) |
DNS lookups are pretty time consuming, we shouldn't do them with a looked mutex! So instead we do the lookup first and use the results, later.
There is already a route for this AmsNetId, but with a different IP. The old route has to be deleted, first!
in case no local AmsNetId was set previously, we derive one