Jump to main content | Jump to Primary Navigation | Jump to Sub Navigation
| Previous tutorial | Next tutorial |
This tutorial concerns creating a configuration file.
Alternatively it is possible to create applications without the need for an external file. This is covered in Tutorial 3: Creating devices programmatically
<?xml version="1.0" encoding="utf-8"?> <configuration> <host id="Default"> <device name="DevBot" driver="simple_driver"> <property name="Countdown">10</property> <property name="PollPeriod">100000</property> </device> </host> </configuration>
Another example is complex.xml which sets the values of the PollPeriod and DataLength properties for the "Complex" device.
<?xml version="1.0" encoding="utf-8"?> <configuration> <host id="Default"> <device name="Complex" driver="benchmark"> <property name="PollPeriod">100000</property> <property name="DataLength">1</property> </device> </host> </configuration>
<?xml version="1.0" encoding="utf-8"?> <configuration> <host id="Default"> <device name="Epuck" driver="epuck"> <property name="PollPeriod">250000</property> <property name="Camera">0</property> <property name="Device">/dev/rfcomm0</property> </device> <device name="Ifkit" driver="phidget_ifkit888"> <property name="Serial">28971</property> <property name="PollPeriod">80000</property> <property name="Sensor0-Bind">ConvertReal</property> <property name="Sensor1-Bind">ConvertReal</property> <property name="Sensor2-Bind">Rotation</property> </device> </host> </configuration>
<?xml version="1.0" encoding="utf-8"?> <configuration> <host id="Player1"> <device name="Client" driver="pong_client"> <property name="Dimension">6,25</property> </device> <device name="Ball" driver="pong_ball"> <property name="PollPeriod">50000</property> <property name="Range">320,240</property> <property name="Dimension">8,8</property> </device> </host> <host id="Player2"> <device name="Client" driver="pong_client"> <property name="Dimension">6,25</property> </device> </host> </configuration>
| Previous tutorial | Next tutorial |