| 52 | |
| 53 | static size_t g_NumNotifications = 0; |
| 54 | static void __stdcall NotifyCallback(AmsAddr *pAddr, |
| 55 | AdsNotificationHeader *pNotification, |
| 56 | unsigned long hUser) |
| 57 | { |
| 58 | #if 0 |
| 59 | static std::ostream& notificationOutput = std::cout; |
| 60 | #else |
| 61 | static std::ostream notificationOutput(0); |
| 62 | #endif |
| 63 | ++g_NumNotifications; |
| 64 | notificationOutput |
| 65 | << std::setfill('0') << "NetId 0x" << pAddr->netId << "hUser 0x" |
| 66 | << std::hex << std::setw(4) << hUser |
| 67 | << " sample time: " << std::dec << pNotification->nTimeStamp |
| 68 | << " sample size: " << std::dec << pNotification->cbSampleSize |
| 69 | << " value: 0x" << std::hex << (int)pNotification->data[0] |
| 70 | << '\n'; |
| 71 | } |
| 72 | |
| 73 | void print(const AmsAddr &addr, std::ostream &out) |
| 74 | { |
nothing calls this directly
no outgoing calls
no test coverage detected