Chris Morley wrote: > > >> Date: Fri, 21 Nov 2008 16:27:25 -0700 >> From: [EMAIL PROTECTED] >> To: [email protected] >> Subject: Re: [Emc-developers] (no subject) >> >> Chris Morley wrote: >>> Gentlemen (Iuse the term loosely :): >>> >>> I am using HAL without EMC and want to be able to read >>> messages that are wrapped in rtapi_print_msg >>> such as: >>> >>> rtapi_print_msg(RTAPI_MSG_DBG, "INFO CLASSICLADDER--\n"); >>> >>> How do I set the message level? >> echo 4 >| /proc/rtapi/debug > > Seb I don't have a rtapi folder in proc. > > I am using simulator on ubuntu 8.04. >
Unfortunately the msg_level stuff predates sim by quite a bit. When you are running a realtime kernel, the message level value can be set by writing to /proc/rtapi (and other info about rtapi can be seen by catting /proc/*). But in sim, components aren't kernel modules, and the /proc filesystem isn't available. Instead, each component has its own copy of msg_level (IIRC), and each component must set its own level. There are rtapi calls to get and set the level, and for debug purposes you could easily do something like this at init or right before the chunk of code you want to debug: static int old_level = rtapi_get_msg_level(); rtapi_set_msg_level(RTAPI_MSG_ALL); and do this after that chunk of code: rtapi_set_msg_level(old_level); For both rtapi and hal, the complete API is documented in the .h file, look there for more details. Regards, John Kasunich ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
