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

Function runExample

example/example.cpp:112–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112static void runExample(std::ostream &out)
113{
114 static const AmsNetId remoteNetId{ 192, 168, 0, 231, 1, 1 };
115 static const char remoteIpV4[] = "ads-server";
116
117 // uncomment and adjust if automatic AmsNetId deduction is not working as expected
118 //bhf::ads::SetLocalAddress({192, 168, 0, 1, 1, 1});
119
120 AdsDevice route{ remoteIpV4, remoteNetId, AMSPORT_R0_PLC_TC3 };
121 notificationExample(out, route);
122 notificationByNameExample(out, route);
123 readExample(out, route);
124 readByNameExample(out, route);
125 readWriteExample(out, route);
126 readWriteArrayExample(out, route);
127 readStateExample(out, route);
128}
129
130int main()
131{

Callers 1

mainFunction · 0.85

Calls 7

notificationExampleFunction · 0.85
readExampleFunction · 0.85
readByNameExampleFunction · 0.85
readWriteExampleFunction · 0.85
readWriteArrayExampleFunction · 0.85
readStateExampleFunction · 0.85

Tested by

no test coverage detected