Ulogger::MInputPlugin Class Reference

class Ulogger::MInputPlugin

A ULogger input plug-in listens for ULogger commands on some communication medium, such as serial, usb or a TCP socket. Whenever a command is received by the input plug-in, it passes this command to ULogger, which then interprets the command, acts on it, and returns a response to the input plug-in. The input plug-in sends any response coming from ULogger back to the client that sent the command in the first place.

All input plug-ins must derive from this class in order to be compatible with ULogger. They must also derive from ULogger::CPlugin (whose header is already included by this header, for convenience) in order to be compatible with the ECom framework, which ULogger uses to load its input plug-ins.

Constructor & Destructor Documentation

~MInputPlugin()

~MInputPlugin()[inline, virtual]

Virtual destructor.

Member Functions Documentation

CancelReadData()

voidCancelReadData()[pure virtual]

Cancels asynchronous operation issued by ReadData method.

CloseInputPlugin()

voidCloseInputPlugin()[pure virtual]

Called by ULogger to indicate that the input plug-in must flush all buffers and release any locked resources. Any resources may be locked only after any other method is called.

ConfigureInputPlugin(const RPointerArray< TPluginConfiguration > &)

TInt ConfigureInputPlugin(const RPointerArray< TPluginConfiguration > &aConfigs)[pure virtual]

Called by ULogger as first method after construction or after changes in config file. This allows the input plug-in to initialize itself with its private settings.

Parameters

const RPointerArray< TPluginConfiguration > & aConfigsactual configurations valid for this instance

ReadData(TRequestStatus &, TDes8 &)

TInt ReadData(TRequestStatus &aStatus,
TDes8 &aData
)[pure virtual]

Asynchronous method that reads command data from the input medium. ULogger calls this when it's ready to receive command data from the input plug-in. When the input plug-in completes the read operation it notifies the caller via the TRequestStatus that is passed into this method by reference. It provides the command data that has been received in the descriptor that is passed into this method by reference. Input plug-ins typically implement this method by simply passing the TRequestStatus and descriptor arguments on to another asynchronous method, such as for example a socket's ReadOneOrMore method.

Parameters

TRequestStatus & aStatusThe request status used to contain completion information for the function. On completion, contains a system-wide error code.
TDes8 & aDataA descriptor reference to store data obtained from input channel.

SendAcknowledgment(const TDesC8 &)

TInt SendAcknowledgment(const TDesC8 &aData)[pure virtual]

Synchronous Method that sends the given acknowledgment data back to the client that is sending command data to the input plug-in. ULogger calls this method whenever it needs to send a response to a previously received command.

Parameters

const TDesC8 & aDataA descriptor which contains error code or other results, for example, array of filters. Format of this data depends on previously obtained command.

Member Data Documentation

const CPlugin::TPluginInterface iInterfaceId

const CPlugin::TPluginInterfaceiInterfaceId[static]

Input plug-in interface id. This is for ULogger to distinguish between the different types of plug-ins (e.g. Intput vs Output plug-ins).