forked from robincornelius/libedssharp
-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
So what i want to do is to expose a"array" of importers and exporters from libEDS that the GUI & CLI can use to list the exporters and importers
the array will be composed of classes that looks a little like this:
- string description ['Electronic Data Sheet (*.eds)']
- string type ['*.eds']
- enum{flag} [multi import/export,documentation-related, canopennode-related]
- func {like c++lambda} that can be called with a standard set of parameters and return a expected output type
So this is currently the import/export functions
Importers looks ready to use right now (ignoring experimental protobuffer)
List<EDSsharp> CanOpenXDD.readMultiXML(string file)
List<EDSsharp> CanOpenXDD_1_1.ReadMultiXML(string file)
EDSsharp CanOpenXDD.readXML(string file)
EDSsharp CanOpenXDD_1_1.readXML(string file)
EDSsharp CanOpenXDD_1_1.ReadXML(string file)
EDSsharp CanOpenXDD_1_1.ReadProtobuf(string file, bool json)
The problem with the exporters is the there are a lot of different parameters
Exporters
void DocumentationGen.genhtmldoc(string filepath, EDSsharp eds)
void DocumentationGen.genmddoc(string filepath, EDSsharp eds, string gitVersion)
void CanOpenXDD.writeXML(string file, EDSsharp eds)
void CanOpenXDD_1_1.WriteXML(string file, EDSsharp eds, string gitVersion, bool deviceCommissioning, bool stripped)
void CanOpenXDD_1_1.WriteProtobuf(string file, EDSsharp eds, bool json)
void CanOpenXDD.writeMultiXML(string file, List<EDSsharp> edss)
void CanOpenXDD_1_1.WriteMultiXML(string file, List<EDSsharp> edss, string gitVersion, bool deviceCommissioning)
So can we reduce the number of different parameters?
- string filepath,folderpath,file
suggestion: Use only filepath, folderpath can we get from filepath (like now) - string gitVersion
suggestion: move gitversion from gui to libEDS so it does not have to be sent with parameter. - string odname
suggestion: Remove it, it is just Path.GetFileNameWithoutExtension(FileName) so it can be moved into the function - bool json, deviceCommissioning,stripped
suggestion: expose multiple exporter with it false/true (almost like now) - InfoSection.Filetype ft (File_EDS, File_DCF)
suggestion: expose multiple exporter with it set to eds / dcf (like now)
- remove folderpath parameter in CanOpenNode exporters #124
- remove odname parameter in CanOpenNode exporters
- move gitversion from gui to libEDS #126
- expose importers from libEDS
- expose exporters from libEDS
Sounds good ?
@CANopenNode & @trojanobelix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels