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

Function readWriteExample

example/example.cpp:78–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static void readWriteExample(std::ostream &out, const AdsDevice &route)
79{
80 AdsVariable<uint8_t> simpleVar{ route, "MAIN.byByte[0]" };
81 AdsVariable<uint8_t> validation{ route, "MAIN.byByte[0]" };
82
83 out << __FUNCTION__ << "():\n";
84 simpleVar = 0xA5;
85 out << "Wrote " << 0xA5 << " to MAIN.byByte and read "
86 << (uint32_t)validation << " back\n";
87 simpleVar = 0x5A;
88 out << "Wrote " << (uint32_t)simpleVar << " to MAIN.byByte and read "
89 << (uint32_t)validation << " back\n";
90}
91
92static void readWriteArrayExample(std::ostream &out, const AdsDevice &route)
93{

Callers 1

runExampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected