Closed pylipp closed 3 years ago
The unittest failing on Travis locally passes; not sure how to do more inspection here.
The approach of having to pass the structure definitions in and use it to unpack the bytes is the first approach I pondered about when the question first came up in #183. As has been mentioned I also don't think ADS has native support for structures as the symbol info just tells you it's a structure, (which is how the read_struct_by_name code came about and annoyingly having to know the structure definition up front), so to me this looks like a good "workaround" to allow you to mix the read_list and read_struct fucntionality. I'm quite busy on projects at the minute but I may be able to test at some point.
However if you do have the time, you do not neccesarily need a PLC to test it. If you have a windows laptop or can spin up a Windows virtual machine, you can install TwinCAT 3 on that and test it by pointing the target system to local / or the VM.
I don't know why the CR fails, though. It might be some issue related to adslib which is used on Linux only.
Will update this after the changes of #200 and #202 !
Will update this after the changes of #200 and #202 !
sorry, I knew that #200 would mean that this would need rewoking. But I thought it to be a sensible addition to add in.
Will update this after the changes of #200 and #202 !
sorry, I knew that #200 would mean that this would need rewoking. But I thought it to be a sensible addition to add in.
Totally! Was straightforward to update the present branch :)
Totals | |
---|---|
Change from base Build 639: | 0.04% |
Covered Lines: | 1143 |
Relevant Lines: | 1209 |
Totals | |
---|---|
Change from base Build 639: | 0.04% |
Covered Lines: | 1143 |
Relevant Lines: | 1209 |
Great work @pylipp 👍. I'll merge it right away.
Acc. to discussion in #183.
For support in
write_list_by_name
I'd open a separate PR.I could not test it with a PLC yet.