FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO DIP switch and NetConsole status?

Is there a way for C++ code to read the status of the cRIO DIP switches?  How can the code determine if NetConsole is enabled when the cRIO was last formated?  It would be great to check the 'console out' DIP switch (or NetConsole enabled) before writing to 'cout/cerr'.  Does VxWorks have access that info?  If so, could the C++ program call VxWorks to get it?

0 Kudos
Message 1 of 2
(4,331 Views)

The "Console Out" dip switch enables the console on the serial port.  The NetConsole is enabled by loading NetConsole.out.

To tell if the NetConsole is loaded, you can call moduleFindByName("NetConsole.out"); and check for NULL (not found) return value.  This is defined in <moduleLib.h>.

0 Kudos
Message 2 of 2
(2,764 Views)