common/module.h File Reference

Provides the interface to which a plugin module writer should conform. More...

#include "lcd.h"

Go to the source code of this file.

Classes

struct  _tag_module_func_array
struct  _tag_module

Defines

#define __MODULE_H__

Typedefs

typedef _tag_moduleLPMODULE
typedef _tag_module_func_arrayLPMODULE_FN_ARRAY
typedef int(* pfnModuleCreate )(int moduleHandle, void **context, LPMODULE_FN_ARRAY pFnArray)
typedef int(* pfnModuleDestroy )(void *context)
typedef void(* pfnTemperatureReport )(void *context, unsigned int sensor_id, double degrees_c, const char *pszName)
typedef void(* pfnFanSpeedReport )(void *context, unsigned int fan_id, unsigned int rpm, const char *pszName)
typedef int(* pfnGetTextData )(void *context, int nRow, int nWidth, char *buf)
typedef _tag_module_func_array MODULE_FN_ARRAY
typedef _tag_module MODULE

Functions

int moduleInit (const char *moduleName, LPMODULE *ppModule)
int moduleGetLEDStatus (LPMODULE pModule, unsigned int led_id, LPCOLOUR pColourOn, LPCOLOUR pColourOff, unsigned int *dutyCycle, unsigned int *freq)
int moduleGetFanPower (LPMODULE pModule, int fan_id, unsigned int *pFanPower)
int moduleRender (LPMODULE pModule, int nRow, int nWidth, char *pBuffer)


Detailed Description

Provides the interface to which a plugin module writer should conform.

Plugins using this interface are guaranteed that no two functions defined within this file will be called concurrently for the same instance. This should avoid the requirement for non-global data to hold locks or require synchronisation primitives to prevent contention between instance-level data.

If a module has been loaded multiple times as wishes to share data across instances, however, then shared data must be protected in the usual manner.

Definition in file module.h.


Typedef Documentation

typedef int(* pfnGetTextData)(void *context, int nRow, int nWidth, char *buf)
 

This function is called once during the initialisation stage of the module to obtain a list of pointers to the various buffers required to be rendered by the display.

Parameters:
context The context data which this module supplied during the call to Create().
pScreen The screen object which contains information about the display the text will be rendered to.
buf Pointer to a list of (char *) which should be populated by the function to contain

Definition at line 126 of file module.h.


Generated on Mon Jul 17 01:36:12 2006 for IILC by  doxygen 1.4.6