Capture Engine

Steve Holle sholle at link-comm.com
Thu Dec 9 14:51:45 UTC 2004


At 02:38 PM 12/8/2004, Chris Johns wrote:
>Steve Holle wrote:
>>I'm trying to use the Capture Engine and the rtems monitor and am having 
>>some trouble.  I've reviewed the document on the wiki and added the lines 
>>recommended but am unable to get a prompt.  As a matter of fact, when I 
>>include the rtems_monitor_init and rtems_capture_cli_init I loose serial 
>>communications.
>
>The RTEMS monitor will block on stdin. The capture engine's CLI registers 
>commands with the RTEMS monitor. The CLI uses stdin and stdout.
>
>If you have 2 tasks blocking on the stdin the IO will become confused.

I think I have a workaround for this.


>>I am unfamiliar with the rtems monitor.
>>Can it be redirected to a telnet port?
>
>I am not sure the RTEMS monitor can be redirected. I do not know the RTEMS 
>telnet server that well to be sure.
>
>>Where is it documented?
>
>Not sure about the RTEMS monitor, but the wiki is the best place for 
>the  Capture Engine.
>
>>How is it configured?
>
>The Capture Engine is a generic layer with an API defined in capture.h. 
>The CLI is an interface to the Capture Engine using this API.
>
>The design allows you to embedded capture engine commands in your 
>application so you can create a user interface that suits you.
>
>The CLI takes care of the initialisation, how-ever sometime you wish to 
>have the capture engine run from the start. This is an example is C++ that 
>initialise the CLI, opens the engine, turns it on, sets a global watch 
>(trace all events), and then sets a trigger from my init task called 'main':
>
>void
>setup_capture_engine ()
>{
>   rtems_status_code sc;
>
>   rtems_capture_cli_init (0);
>
>   sc = rtems_capture_open (500, 0);
>
>   if (sc != RTEMS_SUCCESSFUL)
>   {
>     std::cout << "capture error: open failed: "
>               << rtems_status_text (sc) << std::endl;
>     return;
>   }
>
>   sc = rtems_capture_control (1);
>
>   if (sc != RTEMS_SUCCESSFUL)
>   {
>     std::cout << "capture error: enable failed: "
>               << rtems_status_text (sc) << std::endl;
>     return;
>   }
>
>   sc = rtems_capture_watch_global (1);
>
>   if (sc != RTEMS_SUCCESSFUL)
>   {
>     std::cout << "capture error: enable global watch failed: "
>               << rtems_status_text (sc) << std::endl;
>     return;
>   }
>
>   sc = rtems_capture_set_trigger (rtems_build_name ('m', 'a', 'i', 'n'),
>                                   0, 0, 0, rtems_capture_to_any);
>
>   if (sc != RTEMS_SUCCESSFUL)
>   {
>     std::cout << "capture error: set trigger failed: "
>               << rtems_status_text (sc) << std::endl;
>     return;
>   }
>
>   std::cout << "capture engine opened and enabled." << std::endl;
>}
>
>To dump the trace I use the CLI, you could add code to perform this task 
>if you wish.
>
>>The document on the wiki does a good job of documenting the commands but 
>>a demo session would be very helpful.
>
>Are you after a demo of the CLI commands or a demo of using the Capture 
>Engine API to embedded it in your application ?

I think what you've given me above is a good example of the API.  If you 
could give me a demo of the CLI I'd appreciate that also.

Thanks.


>--
>  Chris Johns

Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT  59101
sholle at link-comm.com  




More information about the users mailing list