re-organizing the smm

M

Thread Starter

Mario de Sousa

Hello all,

With the addition of the conffile (linuxplc.conf file parser) and the log (message logging library) the architecture of the smm is becoming a little strange.

I would like to raise the conffile and log 'modules' to the level of the smm 'module'. In order to do this I am considering creating a plc.h file that will include every other 'module'

plc.h
#include "smm.h"
#include "conffile.h"
#include "log.h"

Programs needing access to the 'plc' will then only need to include the plc.h file.

The plc_init() and plc_done() functions will call
the initialization/closing functions of each
'module'.

The only drawback with all this (that I can think of) is that the 'plc' name might be required for some totally different functionality. I can't think of any at the moment, but maybe some of you can.

If anybody objects to the use of the 'plc'
name for what I have just explained, could they please put forward their objections?

Thanks,

Mario.

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


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

Johan Bengtsson

Could it not be done in any way not requiring the
re-compile of the smm when something is added?
I think it would be a lot better if new things
(I/O, solvers, controllers, HMI, etc) could be
added without knowing about them at compile time
of the smm.
Am I missing something or would that not be quite
easy to implement?


/Johan Bengtsson

----------------------------------------
P&L, the Academy of Automation
Box 252, S-281 23 H{ssleholm SWEDEN
Tel: +46 451 49 460, Fax: +46 451 89 833
E-mail: [email protected]
Internet: http://www.pol.se/
----------------------------------------

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

Mario de Sousa

Sorry if I didn't make myself completely explicit.

When I referred to 'modules' I didn't mean
i/o, logic, HMI, etc modules. Before the change
those modules needed to include smm.h, log.h
and conffile.h, and then linked with the
linuxplc.o library.
With the change they will continue to be linked
with linuxplc.o, but will only have to include
plc.h. Like this, any further changes will be reflected in the plc.h file and will not require changing the source code of the i/o, HMI, etc modules.

When I refered to 'modules' I meant sub-modules
within the smm universe. What is happening is that
the smm is becoming much more than a shared
memory manager. I want to make this explicit and divide it into sub-modules to make further
expansion of the smm universe easier and keep the architecture of the smm universe cleaner.

To do this I used the 'plc' name. I was just afraid somebody was saving this name for some other completely different functionality.

I have already started commiting the changes to
the cvs.


Mario.

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




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