how is it possible to create a non-volatile variable to the datalayer? The value of the variable shouldn't be deleted, if the ctrlX Core is rebooted.
Go to Solution.
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.
result = datalayer.factory()->createMemorySync(sharedRetain, "example/rt/sharedRetain", provider, MEM_SIZE, comm::datalayer::MemoryType_SharedRetain);
std::cout << "creation of shared retain failed with: " << result.toString() << std::endl;
result = sharedRetain->setMemoryMap(memMap);
std::cout << "Set shared retain memMap failed with: " << result.toString() << std::endl;