Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to Extend the Unified Trace Solution

This section provides guidelines on extending or modifying the Unified Trace solution to suit the Trace Collector’s specific requirements. Specifically, Trace Environment Developers extend this solution by writing new input and output plug-ins.

[Top]


Writing a new client

Before writing a new client, the Trace Environment Developer must understand the ULogger framework and the UTrace architecture described in the RULogger client API and Architecture of the Unified Trace Solution sections. For detailed information on the API, see Namespace Ulogger in the uloggerclient.h file.

[Top]


Writing a new plug-in

The ULogger plug-ins are implemented using ECom and must derive from CPlugin, which is declared in epoc32/include/uloggerplugin.h file. One or both of the following interfaces can be implemented:

Note: To avoid problems with late binding, the CPlugin class must be the first base class in the inheritance hierarchy as it is derived from CBase. The CPlugin class wraps the functionality of ECom framework to minimise effort during implementation of a new plug-in.

Use case scenarios


Writing the ECom plug-in

The Trace Environment Developer has to perform the following steps to complete the ECom plug-in:

  1. Implement the ImplementationGroupProxy function.

  2. Specify the correct TARGETTYPE in the MMP file of the plug-in.

  3. Provide an ECom resource (.rss) file for the plug-in. This resource file should contain the following details:

    1. The definition of the required ECom resource structure (REGISTRY_INFO) which is used to install the plug-in. Include the RegistryInfo.rh file in the plugin resource file (.rss) and the RESOURCE REGISTRY_INFO r_registryline. The declaration of this structure can be found in the RegistryInfo.rh header file.

    2. The interface UID for ULogger ECom plug-ins. This is 0x102836C9 for both input and output plug-ins.

    3. The implementation UID. This is different for each plug-in and must be allocated by Symbian Ltd.

  4. Include the following capabilities in the MMP file for all ECom plug-ins: CommDD NetworkControl LocalServices ProtServ

For more information on MMP file syntax and ECom resources, see Symbian OS documentation.

[Top]


Writing an output plug-in

An output plug-in is a polymorphic library, which implements the MOutputPlugin interface.

Note: Currently, only nine output plug-ins in the ULogger configuration file can be installed.

[Top]


Writing an input plug-in

An input plug-in is a polymorphic library, which implements the MInputPlugin interface.

Note: Only one of these can be installed at any time.

[Top]


Writing a duplex plug-in

A duplex plug-in (mixed interfaces) will be responsible for sending the trace data, and for communicating with the host machine using both interfaces.

It is important to return the correct interface from the GetInterfaceL method (derived from the CPlugin class), when the plug-in implements both interfaces. In order to obtain the desired interface, both output and input frameworks must be implemented to pass the correct interface ID number to the GetInterfaceL method.

See also

Architecture of the Unified Trace Solution