[ag-automation] configuration concept for fieldbus stack

Robert Schwebel r.schwebel at pengutronix.de
Tue Jul 10 17:11:21 CEST 2007


On Tue, Jul 10, 2007 at 10:45:51AM +0200, Dieter Hess wrote:
> here are a general XML-schema for a configuration of a fddi driver, a
> example for modbus and a description of the modbus profile.

Great, thanks a lot! :-) However, in order to make it readable, here's
the result of running pretty.xsl over the file:

----------8<----------8<----------8<----------8<----------8<----------8<----------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!--Sample XML file generated by XMLSPY v2004 rel. 4 U (http://www.xmlspy.com)-->

<FddiDevice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="C:\Dokumente und Einstellungen\d.hess\Desktop\fddi\fddiconfig.xsd">

   <Id>0</Id>
   <Name>ModbusMaster</Name>

   <FddiDevice>
      <Id>1</Id>
      <Name>ModbusSlave1</Name>
      <FddiParam Id="1" Name="ParamAddress" Type="int">14</FddiParam>
      <FddiParam Id="2" Name="ParamValue" Type="int">0</FddiParam>
      <FddiParam Id="11" Name="ParamAddress" Type="int">22</FddiParam>
      <FddiParam Id="12" Name="ParamValue" Type="int">17</FddiParam>
      <FddiParam Id="1001" Name="TpuAdress" Type="int">64</FddiParam>
      <FddiParam Id="1002" Name="TpuSize" Type="int">8</FddiParam>
      <FddiParam Id="1003" Name="TpuGranularity" Type="int">1</FddiParam>
      <FddiParam Id="1004" Name="TpuUpdateRate" Type="int">100</FddiParam>
      <FddiParam Id="1004" Name="TpuDirectionWrite" Type="bool">false</FddiParam>
      <FddiParam Id="1011" Name="TpuAdress" Type="int">72</FddiParam>
      <FddiParam Id="1012" Name="TpuSize" Type="int">12</FddiParam>
      <FddiParam Id="1013" Name="TpuGranularity" Type="int">2</FddiParam>
      <FddiParam Id="1014" Name="TpuUpdateRate" Type="int">100</FddiParam>
      <FddiParam Id="1014" Name="TpuDirectionWrite" Type="bool">true</FddiParam>
   </FddiDevice>

   <FddiDevice>
      <Id>2</Id>
      <Name>ModbusSlave2</Name>
      <FddiParam Id="1" Name="ParamAddress" Type="int">4</FddiParam>
      <FddiParam Id="2" Name="ParamValue" Type="int">11</FddiParam>
      <FddiParam Id="1011" Name="TpuAdress" Type="int">20</FddiParam>
      <FddiParam Id="1012" Name="TpuSize" Type="int">4</FddiParam>
      <FddiParam Id="1013" Name="TpuGranularity" Type="int">1</FddiParam>
      <FddiParam Id="1014" Name="TpuUpdateRate" Type="int">50</FddiParam>
      <FddiParam Id="1014" Name="TpuDirectionWrite" Type="bool">true</FddiParam>
   </FddiDevice>

   <FddiParam Id="1" Name="TCPIP-Port" Type="int">1010</FddiParam>

</FddiDevice>
----------8<----------8<----------8<----------8<----------8<----------8<----------

Why are these "Id" attributes necessary? For the initialization params,
the order in the xml file should be enough to specify the order the
params have to be written into the bus.

Regarding the types, I'd suggest to directly map to the stdint types,
also in order to avoid 32/64 bit interpretation problems.

Regards,
Robert Schwebel
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9



More information about the ag-automation mailing list