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

Function testPortOpen

AdsLibTestRef/main.cpp:81–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81long testPortOpen(std::ostream &out)
82{
83 long port = AdsPortOpenEx();
84 if (!port) {
85 return 0;
86 }
87
88 AmsAddr addr;
89 if (AdsGetLocalAddressEx(port, &addr)) {
90 AdsPortCloseEx(port);
91 return 0;
92 }
93 out << "Port: " << port << ' ';
94 print(addr, out);
95 return port;
96}
97
98struct TestAds : test_base<TestAds> {
99 static const int NUM_TEST_LOOPS = 10;

Callers 1

testAdsPortOpenExMethod · 0.70

Calls 4

AdsPortOpenExFunction · 0.85
AdsGetLocalAddressExFunction · 0.85
AdsPortCloseExFunction · 0.85
printFunction · 0.70

Tested by

no test coverage detected