Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   NetConsole cout vs. printf on Old/New CRIO (http://www.chiefdelphi.com/forums/showthread.php?t=100477)

makahn64 17-01-2012 13:15

NetConsole cout vs. printf on Old/New CRIO
 
Just a heads up that wasted a bit of my time...

It seems our new CRIO (4 slot) can print to the Net Console using cout without a namespace qualifier:

cout << "In autonomous mode";

Works fine. The exact same code on our old CRIO (8 slot) does not print to the screen. But printf works fine. Both have been 2012 re-imaged.

Not a big deal, but does anyone know why? Is there a magic namespace qualifier I can stick in front of cout to make it work for both?

netconsole::cout << "yada yada";

byteit101 17-01-2012 22:18

Re: NetConsole cout vs. printf on Old/New CRIO
 
cerr (not cout) worked on the 8 slot one, try it on the 4 slot one, or redirect cout to cerr

emusteve 20-01-2012 01:54

Re: NetConsole cout vs. printf on Old/New CRIO
 
We have an 8-slot unit, and we get all the vxWorks startup output on NetConsole, but nothing from either a printf or cout. Tried the cerr suggestion as well, but nada!

We're trying to embed a simple text message (like printf("I'm Alive!\n"); )in the teleop section of the Simple Robot Template as a test case. Tried adding an Include# "stdio.h", but that didn't help either. No errors show up in the Build.

Anyone have an idea what I'm doing wrong?

Thanks,
Steve

Bryscus 21-01-2012 22:35

Re: NetConsole cout vs. printf on Old/New CRIO
 
Quote:

Originally Posted by emusteve (Post 1109583)
We have an 8-slot unit, and we get all the vxWorks startup output on NetConsole, but nothing from either a printf or cout. Tried the cerr suggestion as well, but nada!

We're trying to embed a simple text message (like printf("I'm Alive!\n"); )in the teleop section of the Simple Robot Template as a test case. Tried adding an Include# "stdio.h", but that didn't help either. No errors show up in the Build.

Anyone have an idea what I'm doing wrong?

Thanks,
Steve

You may need to check the box when you flash the cRIO with the imaging tool. It has to be enabled and is not by default.

- Bryce

emusteve 23-01-2012 16:52

Re: NetConsole cout vs. printf on Old/New CRIO
 
We did that (checked the NetConsole box when imaging), and it does give us all the vxWorks system messages, just nothing from our code.

Too much broken...switching to Java for this season.


All times are GMT -5. The time now is 03:44.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi