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.
- 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.
The following are requirements for compiling and using Platform Monitor (as tested). Other configurations may also work, but have not been verified.
- Compal* MID
- Moblin UME Jax 10 build 4026
- MIDinux* build 4006
Organization of This Manual
This manual is organized in three sections:
- "Getting Started" discusses how to compile and run the tool.
- "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.
|MID||Mobile Internet Device|
|GTK+||A library to build graphical user interfaces (GUIs). Used primarily in Linux* Operating Systems|
Follow the steps below to compile and run Platform Manager for the first time.
- 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.
- Install the following packages:
- 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.
- Create a Linux distribution.
The method used can be determined by the user.
- Transfer the Linux distribution to your MID.
- 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".
- Launch the Platform Monitor.
You can launch the program from the command line of a terminal by using the "./platformmonitor" command.
- 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.
- Click the "Close" Button on any page to exit the program.
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:
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.
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:
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.