Hardware Resource Manager Overview

Introduction to topic for overview page or search

Hardware Resource Manager (HWRM) is a client-server solution, which utilizes ECom plug-ins to achieve device independency. ECom plug-ins convert the client requests into the hardware control commands.

Purpose

HWRM performs the following functions:

  • Provide client APIs to control lights, vibra.

  • Retrieve battery information of the device.

  • Publish certain power-state related Publish and Subscribe properties.

  • Enable clients to retrieve status information on the hardware elements such as light, vibration, power.

Required background

Knowledge of the client-server architecture, asynchronous processing, and active objects feature of the Symbian system model architecture.

HWRM architecture

HWRM is made up of the following components:

  • Client APIs

  • HWRM Server

Figure 1. Hardware Resource Manager's Architectural Relationships

Client APIs

HWRM provides client APIs that can control various hardware elements. It also provides callback pointers, so that the client applications can register to receive notification on the hardware status changes. Refer to the tutorials for information on how to use client APIs. Client APIs are useful for both application developers and the handset manufacturers.

HWRM server

HWRM server uses plug-in handlers to forward the client API requests to appropriate plug-ins. The client application communicates with HWRM server through the client APIs (Light API, Vibra API, and Power API). HWRM server defines the observer classes, which provide the callback pointers.

The server calls CHWRMPluginService::ProcessCommandL() function to forward the client requests to plug-ins. An ongoing ProcessCommandL() is cancelled by HWRM server using CHWRMPluginService::CancelCommandL() . The plug-ins process the server's request and pass the response by calling CHWRMPluginCallback::ProcessResponseL() function. The MHWRMPluginCallback::EventL() method is used to communicate various events that takes place in the plug-ins.

HWRM uses the central repository to store the various values and settings such as the light intensity, duration and delays.

APIs

The HWRM provides the following client APIs and plug-in APIs:

Class Description

CHWRMLight

Abstract class defining Lights client API.

CHWRMExtendedLight

Abstract class defining Extended Lights client API.

CHWRMVibra

Abstract class defining Vibra client API.

CHWRMPower

Class defining Power client API.

Typical use cases

HWRM is used for the following:

  • Used to configure a plug-in.

  • Start/stop device vibra.

  • Release the reserved lights

  • Retrieve the supported light targets of the device, current light status, vibra settings and status.

  • Reserve light targets, device vibra.

  • Switch ON/OFF the lights.

  • Request for tactile vibration pulse.