| 15 | using ExampleDatatype = uint8_t; |
| 16 | |
| 17 | static void NotifyCallback(const AmsAddr *pAddr, |
| 18 | const AdsNotificationHeader *pNotification, |
| 19 | uint32_t hUser) |
| 20 | { |
| 21 | ExampleDatatype data{}; |
| 22 | std::memcpy(&data, pNotification + 1, |
| 23 | std::min<size_t>(sizeof(data), |
| 24 | pNotification->cbSampleSize)); |
| 25 | std::cout << std::setfill('0') << "NetId: " << pAddr->netId |
| 26 | << " hUser 0x" << std::hex << hUser |
| 27 | << " sample time: " << std::dec << pNotification->nTimeStamp |
| 28 | << " sample size: " << std::dec << pNotification->cbSampleSize |
| 29 | << " value:" << " 0x" << std::hex << +data << '\n'; |
| 30 | } |
| 31 | |
| 32 | static void notificationExample(std::ostream &out, const AdsDevice &route) |
| 33 | { |
nothing calls this directly
no outgoing calls
no test coverage detected