Hi, On Sat, Nov 28, 2009 at 09:17:57PM +0100, Wolfgang Grandegger wrote: > It would also be nice to allow: > > $ canconfig can0 bitrate 125000 restart-ms 100 start >
I hacked up canconfig a little bit, now it allows different configuration tasks in the parameter at one time. e.g. canconfig can0 stop bitrate restart-ms 3000 start parameters will be scanned from left to right. This way we can put together sequences in the parameter of canconfig. If there's no following subparameters to a single configuration option, the current configuration will be shown, otherwise the following subparameter will be used to setup the can controller. In the example above following tasks will be done: stop the can controller -> show current bitrate -> set up restart-ms to 3000ms -> start the can controller. The parser is still quite inflexible, like it still awaits the devicename always as the first parameter and there're not much automagic checking for errorneous parameter line. However it works well so far. The update is now only in GIT HEAD of our canutils. Tests, reports or patches are like always highly welcome. cheers Luotao Fu -- Pengutronix e.K. | Dipl.-Ing. Luotao Fu | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
signature.asc
Description: Digital signature
_______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
