Sometimes we want to have access to the options of an Orocos program.
I have added the __os_main_argc() and __os_main_argv() functions that return
the options that were passed to __os_init().
For OCL, I have adapted the deployers such that they pass all options after
'--' to the __os_init() function, such that transports/plugins/etc can read
these options (and the deployer ignores them).
This was already present for TAO, for example:
deployer-gnulinux Foo -- -ORBInitRef NameService=corbaname::myhost.example.com
Then only -ORBInitRef.... is being passed to __os_init().
Similar:
deployer-gnulinux Bar -- __name:=baz
Everything after -- will be passed to __os_init()
Any remarks ?
Peter
Attachment | Size |
---|---|
0001-os-provide-argc-argv-api-in-order-to-allow-lookup-of.patch | 1.89 KB |
0001-deployer-Don-t-pass-parse-arguments-behind-the-mark.patch | 2.87 KB |
Patch for storing/reading argv/argc
On Wednesday 15 December 2010 23:43:32 Peter Soetens wrote:
> Sometimes we want to have access to the options of an Orocos program.
> I have added the __os_main_argc() and __os_main_argv() functions that
> return the options that were passed to __os_init().
>
> For OCL, I have adapted the deployers such that they pass all options after
> '--' to the __os_init() function, such that transports/plugins/etc can read
> these options (and the deployer ignores them).
>
> This was already present for TAO, for example:
>
> deployer-gnulinux Foo -- -ORBInitRef
> NameService=corbaname::myhost.example.com
>
> Then only -ORBInitRef.... is being passed to __os_init().
>
> Similar:
>
> deployer-gnulinux Bar -- __name:=baz
>
> Everything after -- will be passed to __os_init()
>
> Any remarks ?
+1 ;)
> Peter
Patch for storing/reading argv/argc
On Thu, Dec 16, 2010 at 09:07:33AM +0100, Ruben Smits wrote:
> On Wednesday 15 December 2010 23:43:32 Peter Soetens wrote:
> > Sometimes we want to have access to the options of an Orocos program.
> > I have added the __os_main_argc() and __os_main_argv() functions that
> > return the options that were passed to __os_init().
> >
> > For OCL, I have adapted the deployers such that they pass all options after
> > '--' to the __os_init() function, such that transports/plugins/etc can read
> > these options (and the deployer ignores them).
> >
> > This was already present for TAO, for example:
> >
> > deployer-gnulinux Foo -- -ORBInitRef
> > NameService=corbaname::myhost.example.com
> >
> > Then only -ORBInitRef.... is being passed to __os_init().
> >
> > Similar:
> >
> > deployer-gnulinux Bar -- __name:=baz
> >
> > Everything after -- will be passed to __os_init()
> >
> > Any remarks ?
> +1 ;)
+1, but don't forget to add it to scripting too... Lua already
supports this ;-)
Markus
Patch for storing/reading argv/argc
On Thursday 16 December 2010 09:27:05 Markus Klotzbuecher wrote:
> On Thu, Dec 16, 2010 at 09:07:33AM +0100, Ruben Smits wrote:
> > On Wednesday 15 December 2010 23:43:32 Peter Soetens wrote:
> > > Sometimes we want to have access to the options of an Orocos program.
> > > I have added the __os_main_argc() and __os_main_argv() functions that
> > > return the options that were passed to __os_init().
> > >
> > > For OCL, I have adapted the deployers such that they pass all options
> > > after '--' to the __os_init() function, such that
> > > transports/plugins/etc can read these options (and the deployer
> > > ignores them).
> > >
> > > This was already present for TAO, for example:
> > >
> > > deployer-gnulinux Foo -- -ORBInitRef
> > > NameService=corbaname::myhost.example.com
> > >
> > > Then only -ORBInitRef.... is being passed to __os_init().
> > >
> > > Similar:
> > >
> > > deployer-gnulinux Bar -- __name:=baz
> > >
> > > Everything after -- will be passed to __os_init()
> > >
> > > Any remarks ?
> >
> > +1 ;)
>
> +1, but don't forget to add it to scripting too... Lua already
> supports this ;-)
:-D !
Peter