The configuration file is a XML file. A DTD (or better a schema) is not yet formally defined. A simple tool to generate (not edit!) can be found here.
<?xml version="1.0"?>
Now the main facts
<srcpd version="2.0">
Bus 0 is always the server itself. It will never be real hardware
<bus>
<server>
<tcp-port>12345</tcp-port>
<pid-file>/var/run/srcpd.pid</pid-file>
<username>nobody</username>
<groupname>nogroup</groupname>
</server>
<verbosity>0</verbosity>
</bus>
This entry has to be defined. Most of the settings are covered by default values, it is recommended to define them anyway.
Bus 1 and above are real drivers. The should connect to real hardware.
The DDL S88 comes from the DDL project daemon erddcd. A detailed description can be found at the DDL Homepage.
<bus>
<ddl-s88>
<ioport>0x278</ioport>
<number_fb_1>1</number_fb_1>
<number_fb_2>0</number_fb_2>
<number_fb_3>0</number_fb_3>
<number_fb_4>0</number_fb_4>
</ddl-s88>
<use_watchdog>no</use_watchdog>
<verbosity>4</verbosity>
<auto_pwer_on>yes</auto_pwer_on>
</bus>
The driver uses always 4 Busses. In the example above are 16 ports at bus 1, the other 3 busses are empty. In this case, a simple layout can be used to connect the S88 bus directly with the parallel port:
| PC Pin(SubD25) | S88 Pini (pin 6 the most outside) |
|---|---|
| 2 | 3 (clock) |
| 3 | 4 (load) |
| 4 | 5 (reset) |
| 10 | 1 (data) |
| 18 | 2 (ground) |
| 6 (external +5V) |
Since the DDL S88 bus occupies 4 busses, the next bus will be number 5 in this example. It is an Marklin Interface (catalog number 6051) at /dev/ttyS1.
<bus>
<m605x>
<number_fb>2</number_fb>
</m605x>
<device>/dev/ttyS1</device>
<use_watchdog>yes</use_watchdog>
<restore_device_settings>no</restore_device_settings>
<verbosity>1</verbosity>
<auto_power_on>yes</auto_power_on>
</bus>
The interface module is connected with two S88 modules. Note, that these modules are completly independet from the S88 busses of the first bus!
This driver supports the intellibox from uhlenbrock/modeltreno.
<bus>
<intellibox>
<number_fb>16</number_fb>
<number_ga>200</number_ga>
<number_gl>255</number_gl>
</intellibox>
<device>/dev/ttyS1</device>
<use_watchdog>yes</use_watchdog>
<verbosity>1</verbosity>
<auto_power_on>yes</auto_power_on>
</bus>
Since srcpd 2.0B5 there is no need for an additional linux kernel module.
The loopback driver is a special one. It does not connect to any hardware but reflects any commands. You can define any device to simulate there behavior. This bus type was originally developed for off-site development. Together with recent changes of the SRCP protocol it can be used to maintain virtual feedbackers. Every FB device can be assigned any (32bit) integer value.
<bus> <loopback> <number_ga>256</number_ga> <number_fb>1024</number_fb> <number_gl>17</number_gl> </loopback> </bus>
The i2c-dev driver is based on the i2c-dev-interface of the
Linux-kernel.
A detailled description can be found at
http://www.matronix.de
<bus>
<i2c-dev>
<number_ga>64</number_ga>
</i2c-dev>
<device>/dev/i2c-0</device>
<use_watchdog>no</use_watchdog>
<restore_device_settings>no</restore_device_settings>
<verbosity>1</verbosity>
</bus>
Following the convention for XML files, the last bytes contain the closing tag </srcpd>
© by srcpd team