Main Page | Class Hierarchy | Class List | File List | Class Members

MipLogInterface Class Reference

Receiver of log messages from the MipManager object and the attached MipBus objects. More...

#include <MipLogInterface.h>

List of all members.

Public Member Functions

 MipLogInterface (MipManager *mipmanager)
 Constructor.
void SetMipManager (MipManager *mipmanager)
 Sets the MipManager. This method is automatically invoked when mipmanager->SetLogInterface is called.
MipManagerGetMipManager ()
 Returns the MipManager.
virtual void OnDataReceived (MipBus *mipbus, unsigned char *data, int len)=0
 (abstract) Called when data is received.
virtual void OnUnexpectedDataReceived (MipBus *mipbus, unsigned char *data, int len)=0
 (abstract) Called when unexpected data is received. That means, some data is received without having issued a command. This may happen if another device is on the same bus or if a Mip is executing some command when it is plugged in.
virtual void OnSendPacket (MipBus *mipbus, const unsigned char *data, int len)=0
 (abstract) Called before a packet is sent.
virtual void OnBeforeClose (MipBus *mipbus)=0
 (abstract) Called before the serial port of a MipBus is closed.
virtual void OnAfterOpen (MipBus *mipbus)=0
 (abstract) Called right after opening the serial port of a MipBus.
virtual void OnAfterOpenError (MipBus *mipbus)=0
 (abstract) Called if an error occured when opening a serial port.

Protected Member Functions

std::string DataToString (unsigned char *packet, int len)
 Turns a piece of data (e.g. a packet) into hexadecimal representation.

Protected Attributes

MipManagermMipManager
 The associated MipManager object.


Detailed Description

Receiver of log messages from the MipManager object and the attached MipBus objects.

This is an abstract interface intended for logging. It allows to catch various internal events of the MipManager and the MipBus objects.

To use this interface, create a subclass of it and implement its abstract methods. Attach your class to the MipManager using:


The documentation for this class was generated from the following file:
Generated on Wed Jun 1 09:19:08 2005 for libmip by doxygen 1.3.8