|
||
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.
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.
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:
The output plug-in interface using
MOutputPlugin
, which is declared in the
epoc32/include/uloggeroutputplugin.h
file.
The input plug-in interface using
MInputPlugin
, which is declared in the
epoc32/include/uloggerinputplugin.h
file.
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.
If both interfaces are implemented in separate plug-ins, then the ULogger configuration file can be configured by a Trace Collector to output the trace data through one plug-in, and use the second to communicate with the host (receiving configuration and run commands).
For example, if the Trace Collector has two plugins; such as, file output plug-in for output trace data and USB plug-in for input data, which are implemented as separated binaries, then they can send trace data to a file and configure ULogger through USB.
If the Trace Environment Developer implements only one plug-in for output and input in a single binary.
For example, the Trace Collector can use only the USB plug-in to both send data and configure ULogger through the single communication channel.
The Trace Environment Developer has to perform the following steps to complete the ECom plug-in:
Implement the ImplementationGroupProxy
function.
Specify the correct TARGETTYPE
in the MMP
file of the plug-in.
Provide an ECom resource (.rss) file for the plug-in. This resource file should contain the following details:
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_registry
line. The declaration of this
structure can be found in the RegistryInfo.rh
header file.
The interface UID for ULogger ECom plug-ins. This is 0x102836C9 for both input and output plug-ins.
The implementation UID. This is different for each plug-in and must be allocated by Symbian Ltd.
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.
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.
An input plug-in is a polymorphic library, which implements
the MInputPlugin
interface.
Note: Only one of these can be installed at any time.
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.