Alban’s blog

March 29, 2008

DBusMessagesBox.py

Filed under: Uncategorized — alban @ 7:44 pm

DBusMessagesBox.py can monitor messages going through a D-Bus message bus and display message sequence chart with Mscgen. It connects to dbus-daemon with dbus-python.

Example of PNG output

When Rhythmbox plays a song, it prevents the power manager to suspend or hibernate (method call #13). The user is notified (method call #14). See GNOME Power Management Specification.

Rhythmbox D-Bus messages

Example of HTML output

A video conference with Empathy involves several Telepathy components. They communicates together via D-Bus messages.

Telepathy D-Bus messages when starting a video conference

How to try it

Features

  • Call the dbus-daemon to know the names of connections (GetNameOwner).
  • PNG and HTML/javascript output.
  • Filter the connections to display (see skip_entities in the source).
  • Method calls and returns are linked together in the HTML version.
  • When connections want to receive signals from dbus-daemon, DBusMessagesBox.py knows it and displays which connections receives the signal.

Bugs

  • Most bugs are silently ignored because of Bug fd.o #9980.
  • When there is several recipients for a signal, there are not displayed correctly. Mscgen needs a patch for that.
  • The code needs clean up and a better API to use DBusMessagesBox.py in other python programs.

API

The class DBusMessagesBox has some functions like start_recording(), stop_recording(), parse_to_mscfile(). But a lot is hardcoded and need clean up.

See also

1 Comment »

  1. […] started a page for my DBusMessagesBox.py tool. So now you can generate beautiful D-Bus diagrams like this […]

    Pingback by Alban’s blog » Blog Archive » How to make a D-Bus diagram with DBusMessagesBox.py — March 29, 2008 @ 8:02 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress