This HOWTO tells you what to do if you want to connect LEDs in a different way 
than implemented in this plugin. 


1) Create device class
----------------------

Create a class descending from SerLEDDevice (e.g. SerLEDDevideMydevice). The constructor of your class
should look like this:

SerLEDDeviceMydevice(const std::vector<std::string> &items)

items is the line in the setup file starting your deice section. It is broken up
in seperate strings. The forst element of the vector item[0] is always "DEVICE",
item[1] is always the device type (e.g. "mydevice"). You can demand additional
entries stating with item[2] for additional configuration arguments (e.g. the
device file).

Additionally you will have to implement three functions:

int SerLEDDeviceMydevice :: GetLEDNumber(const std::vector<std::string> & items)

This gets as an argument the setup line starting an led section, again broken up
into its elements. The first, items[0] tells you which led is ment. The number
GetLEDNumber returns should depend on this. If it is unknown the function should
return -1. Here an example: Your device supports 3 LEDs called X1, X2 and X3. So
if items[0]=="X1" your function should return 0, 1 for "X2 and 2 for "X3". here
also you can demand additional arguments.

void On(int led)

This should turn on the LED indicated with led number. The number is the same
that the function GetLEDNumber returned.

void Off(int led)


Turns off the led.


2) Register your device
-----------------------

Edit the file include/devices_reg.H. Include the header file of your class here.
Additionally add a line:

CREATE_DEVICE("mydevice", SerLEDDeviceMydevice)


3) be a nice
------------

If you want to let other profit from your work, write a little hardware
description (how your LEDs are to be connected) into the README file, and mail
the files you created/modified to me (felix@rauscher-muenchen.de).
