I did some more debugging of Crapahalic last night. So some brief overview of how it works so far. It uses halcmd show to generate output that is then parsed through to determine the loaded hal components, the pins for each component and the signals that are all loaded in the current configuration. I like this general methodology as it keeps from having to look up component definitions in the man pages to determine pins. It also solves the issues that have been brought up about components generating pins at run time.
The issue that I am having right now is that the parsing logic is barfing on the inconsistency of the "Loaded HAL Components:" section of the halcmd show output. Some lines have a PID value and others don't. Currently it is splitting each line into 5 variables but sometimes there are only 4 items in the split due to the missing PID value. This causes it to barf at the split command. Would it make more sense to modify halcmd show, actually the subfunction print_comp_info to add a placeholder for missing PID values such as a -1 or a "-" or some other value? Would modifying this output break other applications? Would it make sense to make additional functions for halcmd that would be specific for the Crapahalic? Or should I just update the parsing code to handle each condition separately? What is your opinion of this general method of working with a running HAL configuration? The only drawback that I see at the moment is that it would make editing a broken configuration with the tool impossible as it would not load properly and therefore you could not view or edit it with the tool. Finally, at this point I am liking the basic functionality of Crapahalic, as limited as it is. If I decide to continue with it as the basis of the new application would it be inappropriate to rename the application. I am not fond of the name for an implemented application. Thanks, Jim ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers