EDIT:
PLC: Use a persistant variable list:
Own App: You can create shared_retain data that will be stored in a non volatile area. These will keep their value through reboot.
std::shared_ptr<comm::datalayer::IMemoryOwner> sharedRetain;
result = datalayer.factory()->createMemorySync(sharedRetain, "example/rt/sharedRetain", provider, MEM_SIZE, comm::datalayer::MemoryType_SharedRetain);
if (comm::datalayer::STATUS_FAILED(result))
std::cout << "creation of shared retain failed with: " << result.toString() << std::endl;
result = sharedRetain->setMemoryMap(memMap);
if (comm::datalayer::STATUS_FAILED(result))
std::cout << "Set shared retain memMap failed with: " << result.toString() << std::endl;
... View more