I was testing a logging system, where you would be able to log data to a logfile on the cRIO, and then FTP to it to see what happened. I used a modified simpleRobot, and added a streambuf* to the variable list, a ofstream, initialized to "cRIOUserLog.log", and then rdbuf to clog. but clog<<"Logging Test"<<endl; (which should also flush) does not appear to do anything. I FTP'd to the cRIO, and looked in most of the directories, but I cannot find cRIOUserLog.log. Is there something I need to do? I remember someone somewhere in some thread somewhile ago saying something about a write flag, but I was able to use IMAQ_write_png (don't think this is the actual name) to write PNG's to the cRIO.
Relevant code:
PHP Code:
class SuperSimpleRobot
{
streambuf* ofsTclog;
ofstream UserLog;
//...
public:
SuperSimpleRobot():
UserLog("cRIOUserLog.log")//...
{
ofsTclog=UserLog.rdbuf();
clog.rdbuf(ofTclog);
//...
clog<<"Logging Test"<<endl;
}
//...
};