By ugly I was talking about setting up shared memory communications
simply to pass config values once at startup. It is also untidy from
the user's viewpoint. They need to load two modules even though one is
going to simply read from a file, squirt those values to the HAL
module then exit.
After looking though the docs I found this in comp:
/option userinit yes/ - (default: no) This option is ignored if the
option /userspace/ (see above) is set to /no/. If /userinit/ is
specified, the function /userinit(argc,argv)/ is called before
/rtapi_app_main()/ (and thus before the call to /hal_init()/ ). This
function may process the commandline arguments or take other actions.
Its return type is /void/; it may call /exit()/ if it wishes to
terminate rather than create a HAL component (for instance, because the
commandline arguments were invalid).
This is exactly what I am after. It runs in user space so I can grab the
table from a file before the module starts running in HAL space. I was
sure something like that had to exist internally but it is nice to know
it is easily available.
Les
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users