Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: VB Macro to display complex variable values in Rhapsody
Topic Summary:
Created On: 23-Nov-2006 16:42
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 23-Nov-2006 16:42
User is offline View Users Profile Print this message


Brian Regan

Posts: 8
Joined: 27-May-2005

A while ago I wrote a VB macro that that displays the values of complex variables while running in Rhapsody.

The intent was to work around the rather severe limitation of Rhapsodys native animation capability that can only display base type values (e.g. float, int, boolean). [At least in the Rhapsody in Ada product] The macro decodes the variables type information and breaks down arrays and structures until it gets to a base type that can be decoded and displayed. I have done some limited testing for arrarys, records, arrays of records, records of arrarys, records of arrarys of records, and so on.

Note that this was done as just an exercise only, so the comments and formatting are poor. Also it does not handle bit-fields yet (but certainly could be extended to deal with them). It also tries to kludge a sort of display box notion (using a comment achored to the variable) as a means of selecting the variable to display (emulating the sort of think you would see in Matlab's Simulink when you run a simulation).

The macro pulls the symbol information directly from the executable's debug information (make sure debug information is turned on when you compile) rather than instrumented source code. It uses the DBGHELP DLL that is distibuted as part of Microsoft's Platform SDK to do mosts of the work (requires the compile/link to use the Codeview debug info format). There should be very few issues getting it to work for C (the CV format and the DBGHELP are not language dependent).

Other notes: I am using Rhapsody in Ada 7.0mr1. The Ada compiler I used was ObjectAda from Aonix.

Hopefully someone else finds this useful and can polish it up a bit to be a more functional addon. (And maybe get some juices flowing in Ilogix for future Rhapsody enhancements.)

vb_files.zip
vb_files.zip  (6 KB)
model.zip
model.zip  (1107 KB)

Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.