AdsLib
Loading...
Searching...
No Matches
AmsPort.h
1// SPDX-License-Identifier: MIT
6#pragma once
7
8#include "NotificationDispatcher.h"
9
10struct AmsPort {
11 AmsPort();
12 void Close();
13 bool IsOpen() const;
14 uint16_t Open(uint16_t __port);
15 uint32_t tmms;
16 uint16_t port;
17
18 void AddNotification(AmsAddr ams, uint32_t hNotify, SharedDispatcher dispatcher);
19 long DelNotification(AmsAddr ams, uint32_t hNotify);
20
21private:
22 using NotifyUUID = std::pair<const AmsAddr, const uint32_t>;
23 static const uint32_t DEFAULT_TIMEOUT = 5000;
24 std::map<NotifyUUID, SharedDispatcher> dispatcherList;
25 std::mutex mutex;
26};
The complete address of an ADS device can be stored in this structure.
Definition: AdsDef.h:237
Definition: AmsPort.h:10