launching modules...

M

Thread Starter

Mario de Sousa

Hi all,

I took some time off during lunch to code the launching of modules by the smm-mgr.

smm-mgr -l

The linuxplc.conf file should have
[PLC]
launch command_line_to_launch_module

This is just a quick hack. This still needs some further work, so as to pass command line arguments. Maybe later...

The config file parser also does not seem to allow slashes (/) in the table values, nor does it seem to allow values to be enclosed within ".
Maybe the config file parser will have to be augmented to allow this.
Jiri, what do you think?

Jiri, please go ahead and break up the smm-mgr if you see fit. You can also change the section and table name. They were the first names that
occurred to me.

If you think we need a init style functionality, then that will have to be done later...


Mario.



--
----------------------------------------------------------------------------
Mario J. R. de Sousa [email protected]
----------------------------------------------------------------------------


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
M

Mario de Sousa

Mario de Sousa wrote:

> Hi all,
>
> I took some time off during lunch to code the launching of modules bby
> the smm-mgr.
>
> smm-mgr -l
>
> The linuxplc.conf file should have
> [PLC]
> launch command_line_to_launch_module command_line_option_1
> command_line_option_2 ....
>
> This is just a quick hack. This still needs some further work, so as to
> pass command line arguments. Maybe later...
>

OK. This is now supported.

Mario.

----------------------------------------------------------------------------
Mario J. R. de Sousa [email protected]
----------------------------------------------------------------------------


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Mario de Sousa:
> I took some time off during lunch to code the launching of modules bby
> the smm-mgr.

> smm-mgr -l

I'll have a look at it tonight.

> The config file parser also does not seem to allow slashes (/) in the
> table values, nor does it seem to allow values to be enclosed within ".

It certainly *should* allow quote-marks! I'll have to have a look at that.

OK, what happens is that it can't handle a quote mark in the first column.
I'll fix that. Done.

It also doesn't allow a slash (or dot) as the first character of the *first* column only. Probably the best way to fix that is to use the first column for the module name and put the pathname in the second column, which is an ordinary `value' with no funny stuff.

The first column is special because we have to check for an equals sign or a colon; at that stage the parser doesn't know yet that it's a table entry.

> Jiri, please go ahead and break up the smm-mgr if you see fit. You can
> also change the section and table name. They were the first names that
> ocurred to me.

I'd probably go: module module_name pathname special_arguments...

The module_name will be transformed into a --PLCmodule argument; most of the other --PLC... arguments would be also supplied automagically.

> If you think we need a init style functionality, then that will have to
> be done later...

I think we'll gradually grow it, if we start with a simple one and add options as we need them. Like logging when a module dies unexpectedly and
then taking some action. Neat shutdown will also be a good trick. Etc.


Jiri
--
Jiri Baum <[email protected]>
What we do Every Night! Take Over the World! Step 1 - bid for SMOFcon

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
M

Mario de Sousa

Curt Wuollet wrote:

> Hmmmmm........
>

;-)

Yes, it's just the first thing that crossed my mind during lunch time. Throw the code away if you wish...


Cheers,

Mario.


----------------------------------------------------------------------------
Mario J. R. de Sousa [email protected]
----------------------------------------------------------------------------

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
C

Curt Wuollet

Hi Mario

You guys are writing the code so.............
But I was just thinking that without a lot of attention to signal handling, etc. that the process trees, and parentage considerations could get kinda confusing. An init type thing might be better, at least till the debugging is done.
Eventually, some kind of process monitor?

regards

cww


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top