I was looking through the Javadocs and couldn’t find any class that mentions non-volatile memory on the robot. I’m not even sure if the cRIO has a filesystem that the user programs can access.
Anyone know if there’s any way for a robot Java program to read and write values to any form of non-volatile memory?
As I am not too familiar with Java but am trying to do file io to the crio’s non-volatile memory using C++. In the 2011 wplib I simply do not see an equivalent class as fileconnector, as suggested by Ron in the Java suggestion. Therefore does anyone have sample code that could write something to the crio in c++ . Perhaps I simply need to include stdio.h or a basic library, but then I must as the question of whether writing to the filesystem is allowed or if there are certain FRC restrictions on methods regarding this.
Thanks to, and thoughts from everyone are welcomed.
In C++ you can use the typical file i/o library functions to access the disk. There are no limitations related to FRC. It is a flash disk, though, so very high numbers of writes will damage the flash.
Do you have a ballpark figure of what this number tends to be? We have, in the past, written logger classes that make several writes to “disk” per second. Sounds like a longer buffer might be in order to preserve our cRIOs…
Typical flash memories are on the order of 100,000 to 1 million writes. I’m not sure if the cRIO does wear leveling, but that could extend it by another order of magnitude or more.