[ag-automation] configuration concept for fieldbus stack

Robert Schwebel r.schwebel at pengutronix.de
Thu Jul 5 12:45:36 CEST 2007


On Thu, Jul 05, 2007 at 12:25:00PM +0200, Dieter Hess wrote:
> It is a good idea to use a real-life fieldbus for validating the fddi
> and Modbus/TCP is a good start, because it is really simple and
> requires no low level driver, because it can directly use sockets.

Yup :-)

> Unfortunatly there is no description format for Modbus (not for the
> devices and not for the configuration) and we at 3S have right now
> also no definition. But we want to develop a configuration for modbus
> anyway, so I can define a configuration schema.

Can you provide an example or docs for your config format in general? If
we see the overall design, it might happen to find a natural way how
modbus fits the scheme.

> As you might recognize the configuration is passed to the fddi as
> datastructure (a device object with hierachical childs and each with a
> list of parameters).

In general yes - a fddi_iface class wants to get initialized by an
according config class - which may get it's content either manually, by
reading a fieldbus-card-manufacturer-specific config file or a generic
xml file (which is surely preferred).

> So I propose to define a general XML schema to describe a
> configuration and there is a fieldbus independent code to read a
> configuration stored in such a XML-file into a configuraion data
> structure.
> 
> So what I will do next is to define a general XML schema for
> fddi-configurations and Modbus "profile" for it.

Great! Before spending much work, could you provide an example?

> I would also write some code to read it into a data structure, but I
> don't know which XML-parser (just a simpe one) to use for this task.

I'd prefer libxml2 here, because it has a C interface, is more or less
feature complete and it is able to do validation against schemata. The
design should be done in a way that the parsing classes are generic, to
make it later possible to add a --with-xml={libxml2,expat,no} config
switch; small systems with fixed configurations might decide to
instanciate the config objects manually in code, and medium sized
systems might have no need for validation.

Robert
-- 
 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