[etherlab-users] example for pdserv_config_file ?

Richard Hacker ha at igh-essen.com
Tue Jul 31 14:58:30 CEST 2012


On Tuesday, July 31, 2012 01:00:00 pm Sebastien Blanchet wrote:
> Hi,
> 
> I am writing a program that use pdserv library.
Very good, you're brave ;)

pdserv is still developing, a stable version is expected by end of September. 
For you, though, the interface in pdserv.h is not expected to change any more. 
There are still some small issues that I have not yet had time to finish right 
now. So, keep on looking...

> In pdserv.h there is an undocumented function pdserv_config_file
> When browsing the code, I guess that it is used to read a YAML
> configuration file.
Documentation is lagging a bit behind. 

You are quite right, the configuration is a YAML Document.

> 
> I have found a configuration example file for etherlab_buddy in
> /opt/etherlab/etc/pdserv.conf.
> but it is still unclear for me:
>    What is it for etherlab_buddy and what is it for pdserv ?
etherlab_buddy is a relict from back then when we were using it to communicate 
with kernel real time tasks. You do not need it - just ignore it ;)

>    What should I do with alias, lan, msr ?
"alias" and "msr" are keywords, where "alias" is deprecated
"lan" is the name of the real time task, see below.

> 
> Indeed, I hope that someone can provide me an example code and config file
> for pdserv_config_file.
You probably need the config file only to put pdserv into a traditional mode 
when using current versions of msr_testmanager to connect to your task. In 
future this will not be necessary any more
Your config will then look like
---
<task_name>:
	msr:
		traditional: 1
		port: 2345

where <task_name> is the name you used when calling pdserv_create().

For an example, look at test/test1.cpp. It is quite messy because I use it for 
testing backwards and forwards. It should work out of the box. You being a 
keen programmer (otherwise you would not look at the code!) you should be able 
to make sense of the key objects, along with pdserv.h.

When cleaning up, I will place a better looking example, promise!

I just pushed the current tree to sourceforge. Please use revision 
7e4bb00eec65 instead of tip (although tip should work), I am still busy with 
something.
        
> 
> best regards,

Mit freundlichem Gruß

Richard Hacker

-- 
------------------------------------------------------------------------

Richard Hacker M.Sc. 
richard.hacker at igh-essen.com
Tel.: +49 201 / 36014-16

Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Heinz-Bäcker-Str. 34
D-45356 Essen
Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung: 
- Dr.-Ing. S. Rotthäuser, 
- Dr.-Ing. T. Finke, 
- Dr.-Ing. W. Hagemeister
Tel.: +49 201 / 360-14-0
http://www.igh-essen.com

------------------------------------------------------------------------



More information about the Etherlab-users mailing list