Monitoring applications running on target

When using target monitoring, the Rhapsody® animation controls only serve to control the display of incoming information; you cannot provide input for the application.

About this task

When using target monitoring, keep in mind that Rhapsody does not control the running application in any way, so any of the animation controls provided only serve to control the display of incoming information. For example, you can pause the display of status information and then resume the display of the incoming information, even though the application itself keeps running on the target. The only way to control the running of the application itself is to use the debugger that is controlling the application on the target.

To use the target monitoring feature:

Procedure

  1. Set up Rhapsody to generate the appropriate instrumentation code:
    1. Open the Features window for the appropriate configuration.
    2. On the Settings tab, set the Instrumentation Mode to Animation.
    3. Use the Advanced button to open the Advanced Instrumentation Settings window.
    4. When the window opens, set Target Monitoring to On.
  2. Configure the communication between Rhapsody and the application running on the target. To receive updates from the application running on the target, set the following properties to the appropriate values for your target:
    1. TargetProtocolBuildFlag - the protocol used by the target to send messages to Rhapsody (for example, RS232 on Star12, RS232 on Windows, TCP on Windows)
    2. OnHostMessageReaderDLL - the message reader to be used by Rhapsody for listening to messages from the target. For listening on RS232 port, ($OMROOT)\DLLs\SerialMessageReader.Dll. For TCP/IP protocol, ($OMROOT)\DLLs\TcpMessageReader.Dll.
    3. OnHostMessageReaderArguments - string of arguments for reading of messages by the host running Rhapsody . For SerialMessageReader.Dll, the argument format is DeviceName:,BaudRate,DataBits,Parity,StopBits (for example, com1:,9600,8,n,1). For TcpMessageReader.Dll, the string consists only of a single integer indicating the port to listen on (if no changes were made to the file TargetMonitor.c, the default port is 24816)
  3. To have the application pause at specific junctures, set breakpoints using the debugger controlling the application.
  4. On the Start Target Monitoring toolbar, click the Start Target Monitoring button. This selection starts the translation proxy and puts Rhapsody into animation mode. For animation to function properly, you must click this button before starting the application on the target using a debugger or other control.
  5. To have Rhapsody pause the display of incoming information at specific junctures (regardless of the progress of the application), use the Breakpoints button on the Animation toolbar.
  6. Use the following buttons as required to control the display of data from the application:
    • Animation Break—to pause the display of information coming from the target
    • Go—after pause, you can resume updating of information display
    • Go Step—after pause, you can resume updating of information display, one step at a time (using the standard Rhapsody definition of "step")
    • Stop Target Monitoring—instructs Rhapsody to exit animation mode.