05-02-2018 09:10 AM
I'm jumping in to the DCAF, and working through the Hands On exercises. I was stymied yesterday when I kept getting an error upon opening the SimulatedSystem.pcfg file from the Configuration Editor. The error claimed that not all classes could be found, but IO was careful to add the search path. It turned out that the editor was not parsing the configuration file properly.
NISE_CEF_TreeSerializer.lvlib:get file data.vi takes the string produced by "read full file.vi" and splits it at an End Of Line (\r\n). The problem is that the file as read in by "read full file.vi" has linefeeds (\n) rather than EOLs (\r\n). The format cluster would then contain nothing in the second element and the entire file in the first element.
Changing the search string to \n seems to have fixed things.
I have not checked to see if the configuration files are being saved with EOLs after their version number.
Was there a change made regarding this recently?
Thanks!
Solved! Go to Solution.
05-02-2018 10:17 AM
if you look to "NISE_CEF_TreeSerializer.lvlib:save file data.vi" on your system, is a \r\n being added in between the version and data items? I don't know of any change that would have effected this and as you can see, CEF itself hasn't needed to be touched very much recently. The last change was a few months ago and was just adding data accessors to get some additional functionality in DCAF.
https://github.com/NISystemsEngineering/CEF/commits/master
If you create a new configuration file with a target, engine, and some modules, are you able to save and load that file?
05-02-2018 10:28 AM
Saving the configuration file does add the \r\n between the version and data items. It is just the initial load of the hands-on provided configuration file that fails. Making the change that I made in the search string (\n) leaves the \r after the version in the cluster, but only after the file has been saved.
It seems like the provided configuration file may have been created a while back and somehow there is only \n between version and data items.
05-02-2018 10:36 AM
Is that the example finder configuration or some other one? I just downloaded all of the DCAF packages from VIPM a week or so ago and was working with the example yesterday without any problems
05-02-2018 10:39 AM
It's the one on GitHub.
-> Documentation/Trunk/Getting Started Material/Hands On/Current/Exercises/Temperature Controller/
05-07-2018 11:46 AM
We see the same issue if we try to directly download that specific file from GitHub but if we download the entire documentation repo as a .zip or clone it locally the file will open properly so I would try that for now.
People around me said they have seen this issue with downloading .pcfg files from GitHub in the past. They thought they had resolved this problem previously but since it is coming up again they are looking for better ways to handle this in the future.
06-01-2018 01:01 AM
Perhaps the file reader should be agnostic of this issue and just load the file regardless. Then silently fix the file on the next save.