Ulogger::RULogger Class Reference

class Ulogger::RULogger : public RSessionBase

Client-side session to the ULogger server. This class should be used to configure ULogger server.

Inherits from

Public Member Functions
RULogger ()
~RULogger ()
IMPORT_C TInt ActivateInputPlugin (const TDesC8 &)
IMPORT_C TInt ActivateOutputPlugin (const TDesC8 &)
IMPORT_C TInt Connect ()
IMPORT_C TInt DeActivateInputPlugin ()
IMPORT_C TInt GetActiveInputPlugin ( TDes8 &)
IMPORT_C TInt GetActiveOutputPlugin ( TDes8 &)
IMPORT_C TInt GetBufferMode ( TInt &)
IMPORT_C TInt GetBufferSize ( TInt &)
IMPORT_C TInt GetInstalledInputPlugins ( CArrayPtrFlat < HBufC8 > &)
IMPORT_C TInt GetInstalledOutputPlugins ( CArrayPtrFlat < HBufC8 > &)
IMPORT_C TInt GetNotificationSize ( TInt &)
IMPORT_C TInt GetPluginConfigurations (const TDesC8 &, RPointerArray < TPluginConfiguration > &)
IMPORT_C TInt GetPrimaryFiltersEnabled ( CArrayFixFlat < TUint8 > &)
IMPORT_C TInt GetSecondaryFilteringEnabled ( TBool &)
IMPORT_C TInt GetSecondaryFiltersEnabled ( RArray < TUint32 > &)
IMPORT_C TInt RemovePluginConfigurations (const TDesC8 &)
IMPORT_C TInt Restart ()
IMPORT_C TInt RunAsService ( TBool )
IMPORT_C TInt SetBufferMode ( TInt )
IMPORT_C TInt SetBufferSize ( TInt )
IMPORT_C TInt SetNotificationSize ( TInt )
IMPORT_C TInt SetPluginConfigurations (const TDesC8 &, const TPluginConfiguration &)
IMPORT_C TInt SetPrimaryFiltersEnabled (const CArrayFixFlat < TUint8 > &, TBool )
IMPORT_C TInt SetSecondaryFilteringEnabled ( TBool )
IMPORT_C TInt SetSecondaryFiltersEnabled (const RArray < TUint32 > &, TBool )
IMPORT_C TInt Start ()
IMPORT_C TInt Stop ()
IMPORT_C TVersion Version ()
Private Member Functions
TInt StartServer ()
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TUint32 iReserved1
TUint32 iReserved2
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RULogger()

IMPORT_C RULogger ( )

~RULogger()

IMPORT_C ~RULogger ( )

Member Functions Documentation

ActivateInputPlugin(const TDesC8 &)

IMPORT_C TInt ActivateInputPlugin ( const TDesC8 & aPluginName )

Sets which input plug-in is to be used for sending messages to ULogger from a remote machine. This is only relevant for the remote control functionality of ULogger, which allows a remote machine to control the operation of ULogger, instead of a client on the device using RULogger . The plug-in that is passed to this method needs to be one of the plug-ins reported by GetInstalledInputPlugins.

Parameters

const TDesC8 & aPluginName The name of the input plug-in to be activated.

ActivateOutputPlugin(const TDesC8 &)

IMPORT_C TInt ActivateOutputPlugin ( const TDesC8 & aPluginName )

Sets which output plug-in is to be used for outputting trace packets. The plug-in that is passed to this method needs to be one of the plug-ins reported by InstalledOutputPlugins();

Parameters

const TDesC8 & aPluginName The name of the plug-in to be used, needs to be one of the names returned by InstalledOutputPlugins()

Connect()

IMPORT_C TInt Connect ( )

Connects a client to the ULogger server. If the server isn't already running it will be started. To end the server session, use Close() .

DeActivateInputPlugin()

IMPORT_C TInt DeActivateInputPlugin ( )

Deactivates the currently active input plug-in.

GetActiveInputPlugin(TDes8 &)

IMPORT_C TInt GetActiveInputPlugin ( TDes8 & aPluginName )

Gets the active input plug-in.

Parameters

TDes8 & aPluginName The 8-bit descriptor to be populated with the name of the active plug-in (max length: KMaxPath).

GetActiveOutputPlugin(TDes8 &)

IMPORT_C TInt GetActiveOutputPlugin ( TDes8 & aPluginName )

Gets the active output plug-in.

Parameters

TDes8 & aPluginName The 8-bit descriptor to be populated with the name of the active output plug-in (max length: KMaxPath).

GetBufferMode(TInt &)

IMPORT_C TInt GetBufferMode ( TInt & aMode )

Gets the trace buffer mode.

Parameters

TInt & aMode The TInt to be populated with the buffer mode: 1 if Straight 0 if Circular

GetBufferSize(TInt &)

IMPORT_C TInt GetBufferSize ( TInt & aSize )

Gets the size of the trace buffer in KB. See SetBufferSize() for an explanation of the trace buffer size.

Parameters

TInt & aSize The TInt to be populated with the trace buffer size in KB.

GetInstalledInputPlugins(CArrayPtrFlat< HBufC8 > &)

IMPORT_C TInt GetInstalledInputPlugins ( CArrayPtrFlat < HBufC8 > & aPluginNames )

Gets all installed input plug-ins.

Parameters

CArrayPtrFlat < HBufC8 > & aPluginNames The array to be populated with the installed input plug-in names.

GetInstalledOutputPlugins(CArrayPtrFlat< HBufC8 > &)

IMPORT_C TInt GetInstalledOutputPlugins ( CArrayPtrFlat < HBufC8 > & aPluginNames )

Gets all the installed output plug-ins.

Parameters

CArrayPtrFlat < HBufC8 > & aPluginNames The array to be populated with the installed plug-in filename and plug-in names.

GetNotificationSize(TInt &)

IMPORT_C TInt GetNotificationSize ( TInt & aSize )

Gets the data notification size. See SetNotificationSize() for an explanation of the data notification size.

Parameters

TInt & aSize The TInt to be populated with the data notification size in KB.

GetPluginConfigurations(const TDesC8 &, RPointerArray< TPluginConfiguration > &)

IMPORT_C TInt GetPluginConfigurations ( const TDesC8 & aPluginName,
RPointerArray < TPluginConfiguration > & aConfigurations
)

Gets all configurationas for the specified plug-in (output or input).

Parameters

const TDesC8 & aPluginName The name of the plug-in. This is mapped to the plug-in file name, it can be retrieved by calling GetInstalledOutputPlugins and GetInstalledInputPlugins
RPointerArray < TPluginConfiguration > & aConfigurations The array that is to be populated with plug-in configuration items. Ownership of any objects appended to this array is passed to the caller.

GetPrimaryFiltersEnabled(CArrayFixFlat< TUint8 > &)

IMPORT_C TInt GetPrimaryFiltersEnabled ( CArrayFixFlat < TUint8 > & aFilters )

Gets all enabled primary filters.

Parameters

CArrayFixFlat < TUint8 > & aFilters The array to be populated with enabled filters

GetSecondaryFilteringEnabled(TBool &)

IMPORT_C TInt GetSecondaryFilteringEnabled ( TBool & aEnabled )

Gets secondary filtering enabled value.

Parameters

TBool & aEnabled The boolean to be populated with the secondary filtering enabled value

GetSecondaryFiltersEnabled(RArray< TUint32 > &)

IMPORT_C TInt GetSecondaryFiltersEnabled ( RArray < TUint32 > & aFilters )

Gets all enabled secondary filters.

Parameters

RArray < TUint32 > & aFilters The array to be populated with enabled filters

RemovePluginConfigurations(const TDesC8 &)

IMPORT_C TInt RemovePluginConfigurations ( const TDesC8 & aPluginName )

Removes all the configurations of the specified plug-in

Parameters

const TDesC8 & aPluginName The plug-in name whose settings are to be removed

Restart()

IMPORT_C TInt Restart ( )

Restarts server.

RunAsService(TBool)

IMPORT_C TInt RunAsService ( TBool aRunAsService )

Not yet supported, does nothing and returns KErrNotSupported.

Starts/stops running ULogger as a service. Running ULogger as a service means that ULogger is always active in the background, which is necessary if the objective is to connect to ULogger from a remote machine, so that ULogger is then listening for remote connections. If ULogger is not running as a service, it is only active when it is handling a client request or it is currenty logging traces (i.e. the Start() function was called).

Parameters

TBool aRunAsService The flag to indicate whether the server should run as a service or not

SetBufferMode(TInt)

IMPORT_C TInt SetBufferMode ( TInt aMode )

Sets the trace buffer mode.

Parameters

TInt aMode The buffer mode: 1 if Straight 0 if Circular

SetBufferSize(TInt)

IMPORT_C TInt SetBufferSize ( TInt aSize )

Sets the size of the trace buffer, specified in KB (default: 1024KB). The trace buffer is the buffer that UTrace uses to hold the trace packets before they are output (using the currently active output plug-in). See also the documentation of SetNotificationSize() .

Parameters

TInt aSize The desired new trace buffer size in KB

SetNotificationSize(TInt)

IMPORT_C TInt SetNotificationSize ( TInt aSize )

Sets the data notification size, specified in KB (default: 512KB). The data notification size is a threshold on the trace buffer usage, above which the trace buffer is flushed, i.e. all the trace packets in the trace buffer are output using the active output plug-in. See also the documentation of SetBufferSize() .

Parameters

TInt aSize The desired new data notification size in KB

SetPluginConfigurations(const TDesC8 &, const TPluginConfiguration &)

IMPORT_C TInt SetPluginConfigurations ( const TDesC8 & aPluginName,
const TPluginConfiguration & aConfiguration
)

Adds a configuration to a plug-in (output or input). This is specific to the plug-in.

Example1: aPluginName="uloggerfileplugin", aConfiguration.SetKey("output_path"), aConfiguration.SetValue(_L("c:\\logs\\ulogger\\tracelogs.btl")) Example2: aPluginName="uloggerserialplugin", aConfiguration.SetKey("baudrate") , aConfiguration.SetValue("115200")

Parameters

const TDesC8 & aPluginName The plug-in name (without the .dll extension)
const TPluginConfiguration & aConfiguration TPluginConfiguration (key-value type configuration)

SetPrimaryFiltersEnabled(const CArrayFixFlat< TUint8 > &, TBool)

IMPORT_C TInt SetPrimaryFiltersEnabled ( const CArrayFixFlat < TUint8 > & aFilters,
TBool aEnabled
)

Enables/disables the specified primary filters. This allows output of trace packets containing primary filter identifiers that match the enabled primary filters. Note: If a trace packet contains a secondary filter identifier, and secondary filtering is enabled, the matching secondary filter must also be enabled to allow this packet to be output.

Parameters

const CArrayFixFlat < TUint8 > & aFilters The primary filters to enable/disable
TBool aEnabled The boolean to specify the action. ETrue to enable and EFalse to disable.

SetSecondaryFilteringEnabled(TBool)

IMPORT_C TInt SetSecondaryFilteringEnabled ( TBool aEnabled )

Enables/disables filtering on secondary filters. When secondary filtering is enabled, only those trace packets containing a secondary filter identifier matching an enabled secondary filter are output (see SetSecondaryFiltersEnabled() ). Note that trace packets must also contain a primary filter identifier matching an enabled primary filter in order to be output (see SetPrimaryFilterEnabled()).

Parameters

TBool aEnabled The boolean to specify the action. ETrue to enable and EFalse to disable.

SetSecondaryFiltersEnabled(const RArray< TUint32 > &, TBool)

IMPORT_C TInt SetSecondaryFiltersEnabled ( const RArray < TUint32 > & aFilters,
TBool aEnabled
)

Enables/disables the specified secondary filters. This allows output of trace packets containing secondary filter identifiers that match the enabled secondary filters. Note1: Secondary filters are only relevant when secondary filtering is enabled (see SetSecondaryFilteringEnabled() ). If secondary filtering is disabled, trace packets are logged regardless of any secondary filter identifiers. Note2: Enabling secondary filters will automatically enable secondary filtering. Note3: Primary filtering is always enabled and therefore there is no equivalent method for enabling/disabling primary filtering.

Parameters

const RArray < TUint32 > & aFilters The secondary filters to enable/disable
TBool aEnabled The boolean to specify the action. ETrue to enable and EFalse to disable.

Start()

IMPORT_C TInt Start ( )

Starts outputting trace packets. Pre-requisite: This will only output trace packets containing filter identifers that match enabled filters. Use SetPrimaryFiltersEnabled() , SetSecondaryFiltersEnabled() and SetSecondaryFilteringEnabled() to enable the relevant filters.

StartServer()

TInt StartServer ( ) [private]

Internal Function - Starts the server

Stop()

IMPORT_C TInt Stop ( )

Stops outputting trace packets.

Version()

IMPORT_C TVersion Version ( )

Gets the client side version number.

Member Data Documentation

TUint32 iReserved1

TUint32 iReserved1 [private]

TUint32 iReserved2

TUint32 iReserved2 [private]