13using VirtualConnection = std::pair<uint16_t, AmsAddr>;
16 const VirtualConnection connection;
23 : connection({__port, __amsAddr}),
30 header->cbSampleSize = length;
33 void Notify(uint64_t timestamp,
RingBuffer& ring)
const
36 uint8_t* data =
reinterpret_cast<uint8_t*
>(header + 1);
37 for (
size_t i = 0; i < header->cbSampleSize; ++i) {
38 data[i] = ring.ReadFromLittleEndian<uint8_t>();
40 header->nTimeStamp = timestamp;
41 callback(&connection.second, header, hUser);
50 void hNotify(uint32_t value)
58 const std::shared_ptr<uint8_t> buffer;
void(* PAdsNotificationFuncEx)(const AmsAddr *pAddr, const AdsNotificationHeader *pNotification, uint32_t hUser)
Type definition of the callback function required by the AdsSyncAddDeviceNotificationReqEx() function...
Definition: AdsDef.h:363
The complete address of an ADS device can be stored in this structure.
Definition: AdsDef.h:237
Definition: AdsNotification.h:15
Definition: RingBuffer.h:12