Writing configuration files

From The Player Project

Jump to: navigation, search
Line 1: Line 1:
-
==Overview==
+
>==Overview==
Player needs to know which drivers to instantiate and to which device addresses each should be bound. This information is usually specified in a Player configuration file (it can also be done directly from code by calling into [http://playerstage.sourceforge.net/doc/Player-cvs/player/group__libplayercore.html libplayercore]).
Player needs to know which drivers to instantiate and to which device addresses each should be bound. This information is usually specified in a Player configuration file (it can also be done directly from code by calling into [http://playerstage.sourceforge.net/doc/Player-cvs/player/group__libplayercore.html libplayercore]).
A Player configuration file is a text file that, by convention, has the extension .cfg. The file is composed of one or more driver sections, each of which instantiates and configures a single driver. Consider an example:
A Player configuration file is a text file that, by convention, has the extension .cfg. The file is composed of one or more driver sections, each of which instantiates and configures a single driver. Consider an example:
-
<pre>
+
&lt;pre&gt;
driver
driver
(
(
-
   name "sicklms200"
+
   name &quot;sicklms200&quot;
-
   provides ["laser:0"]
+
   provides [&quot;laser:0&quot;]
)
)
-
</pre>
+
&lt;/pre&gt;
This block instantiates the [http://playerstage.sourceforge.net/doc/Player-cvs/player/group__driver__sicklms200.html sicklms200] driver. The provides keyword is used to specify the device address to which the driver will be bound. Using this configuration, an instance of the [http://playerstage.sourceforge.net/doc/Player-cvs/player/group__driver__sicklms200.html sicklms200] driver will be available as laser :0.
This block instantiates the [http://playerstage.sourceforge.net/doc/Player-cvs/player/group__driver__sicklms200.html sicklms200] driver. The provides keyword is used to specify the device address to which the driver will be bound. Using this configuration, an instance of the [http://playerstage.sourceforge.net/doc/Player-cvs/player/group__driver__sicklms200.html sicklms200] driver will be available as laser :0.
 +
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ofysuzusys.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 +
----
 +
=[http://ofysuzusys.co.cc CLICK HERE]=
 +
----
 +
</div>
==Basic syntax==
==Basic syntax==

Revision as of 01:46, 18 November 2010

Personal tools