Platform Monitor User's Guide

Introduction


Welcome

The Platform Monitor is a tool designed to demonstrate usage of the Platform Awareness Service API for gathering and displaying MID platform information. The tool and source code provide a reference as well as an example of how these API could be used. Platform Monitor consists of a GDK notebook GUI containing 8 pages. The first page is an introductory page and all of the other pages utilize the method calls from each of the seven different information modules: Display, Location, Power, Connectivity, Processor, Storage, and Input.

Key Features

  • Displays platform information gathered from the device itself and refreshes the displayed information at regular intervals. Most of the pages refresh the information every second. One page (Processor) has a 3 second refresh due to a built-in 1 second delay in the method call.
  • Change pages to display a different area of information. There are 7 different modules or categories: Display, Location, Power, Connectivity, Processor, Storage and Input.
  • Close the application from any of the 8 different pages. Each page has a close button for user ease.

Requirements

The following are requirements for compiling and using Platform Monitor (as tested). Other configurations may also work, but have not been verified.

Hardware:

  • Compal* MID

Operating Systems:

  • Moblin UME Jax 10 build 4026
  • MIDinux* build 4006

Organization of This Manual

This manual is organized in three sections:

  1. "Introduction"
  2. "Getting Started" discusses how to compile and run the tool.
  3. "Features" describing the primary functions.

Acronyms and Abbreviations

The following table provides a list and definitions of the acronyms and abbreviations used in this document.

Term Description
MID Mobile Internet Device
GTK+ A library to build graphical user interfaces (GUIs). Used primarily in Linux* Operating Systems

Getting Started


Follow the steps below to compile and run Platform Manager for the first time.

  1. Download the source code to your development machine.

    This should be a Linux* based machine. The code was originally compiled on an Ubuntu* 8.04 desktop system using Anjuta* 2.4.1 IDE. It successfully transferred to several MID Linux based systems, including MIDinux*. No other combinations have been officially tested, but the expectation is that other Linux distributions will work.
  2. Install the following packages:
    • dbus-1
    • dbus-glib-1
    • gthread-2.0
    • gtkmm-2.4
    • libglade-2.0
    • libglademm-2.4
    If you try to compile before installing these packages you will get errors.
  3. Compile the Platform Monitor application.

    Anjuta 2.4.1 IDE was the tool originally used to compile, but any IDE/compiler that compiles C / C++ code should work.
  4. Create a Linux distribution.

    The method used can be determined by the user.
  5. Transfer the Linux distribution to your MID.
  6. Install the Platform Monitor application on to your MID

    Use whatever method the distribution mechanism requires or recommends. Normally this involves using the "./autogen.sh", "./configure" and/ or "./install" commands before finishing the installation with "make install".
  7. Launch the Platform Monitor.

    You can launch the program from the command line of a terminal by using the "./platformmonitor" command.

  8. Choose the tab that represents the information you want.



    The information displayed will refresh itself every 1 – 3 seconds, depending on what page you are on.
  9. Click the "Close" Button on any page to exit the program.

Features


The Different Modules

There are seven different modules. Within each module, there are methods that can be used to retrieve MID hardware attributes. Here is the list of each module and the respective methods that are enabled within this application:



Information Refresh

In order to keep the user informed on the status of the information, Platform Monitor refreshes each page of information every 1 to 3 seconds while that page is displayed. Once a new page is selected, a new set of methods are called. It is possible that the information on the previous page may be updated once after you leave due to the method response delay of 1 to 3 seconds.

All pages are set to refresh every second with the exception of the Processor page. One of the methods that is called on that page has a built-in 1 second delay. Waiting 3 seconds allows enough time for the call to return properly with new information. Removing this delay allows the GUI to freeze or stick on that page during operation and is not recommended.

Log Files

Every time you run the Platform Monitor a log file is created in the same directory as the executable file. The file name for these files follows the format:

dd_Month_yyyy_hh_mm_ss_ptfm_monitor.log



where the "Month" is the three letter contraction for the month. For instance, "January" is "jan." Although relatively small, these files can take up significant space over time. You can eliminate these files as you go, or you may turn off the logging feature by modifying one line in the global.h file.

If you would like to turn off the logging feature, change line 112 of global.h to the following:

#define LOG_LEVEL 0



The comments in global.h above the line describe other levels of log usage you can choose to utilize if you desire.

Be sure to re-compile after the change. If you have already created the distribution, then you will need to create a new distribution and move that to your MID device as well. Deleting the old executable before installing the new application is a good way to avoid confusion.

Categories:
For more complete information about compiler optimizations, see our Optimization Notice.