MCPcopy Create free account
hub / github.com/Beckhoff/ADS / Read

Method Read

AdsLibTestRef/main.cpp:900–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898 }
899
900 void Read(const size_t numLoops)
901 {
902 const long port = AdsPortOpenEx();
903 fructose_assert(0 != port);
904
905 unsigned long bytesRead;
906 uint32_t buffer;
907 do {
908 for (size_t i = 0; i < numLoops; ++i) {
909 fructose_loop_assert(
910 i, 0 == AdsSyncReadReqEx2(
911 port, &server, 0x4020,
912 0, sizeof(buffer),
913 &buffer, &bytesRead));
914 fructose_loop_assert(i, sizeof(buffer) ==
915 bytesRead);
916 fructose_loop_assert(i, 0 == buffer);
917 }
918 } while (runEndurance);
919 fructose_assert(0 == AdsPortCloseEx(port));
920 }
921};
922
923int main()

Callers

nothing calls this directly

Calls 3

AdsPortOpenExFunction · 0.85
AdsPortCloseExFunction · 0.85
AdsSyncReadReqEx2Function · 0.50

Tested by

no test coverage detected