Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Sub-index to 0x1016 max-subindex increment error #41

Closed
jimlittlefield opened this issue Dec 10, 2016 · 2 comments
Closed

Adding Sub-index to 0x1016 max-subindex increment error #41

jimlittlefield opened this issue Dec 10, 2016 · 2 comments

Comments

@jimlittlefield
Copy link

I just retrieved libedssharp sources and rebuilt (VS2013). Using the build result the Object Dictionary Editor is v0.5.

  1. Load the DS301_profile.xml into editor
  2. Select Object Dictionary 0x1016 Consumer heartbeat time. The max sub-index starts at 4 and there are 4 subindexs defined.
  3. Right click sub-index 0 and select "Add sub item". The max-subindex increments by 1 and the new items appears in the list. (all good!)
  4. Continue adding subitems until the max sub-index is at 10.
  5. Add one more sub-item : The max sub-item index changes from 10 to 17 even though only one additional sub-item was added to the subindex list. Perhaps the 10 displayed was interpreted somewhere as a hex value (16 + 1) = 17?
  6. If you keep on adding sub-items the max sub-item index will increment by larger amounts eventually exceeding the range of UNSIGNED8 and causing the editor to throw and exception.

The work around is to manually reset the max sub-item index value (Right click on sub-index 0 and select the option to change the max sub-index). I've fooled around with this a bit and I'm pretty sure one part of the editor code interprets the max sub-index as a hex value but other parts assume its decimal.

jl

@robincornelius
Copy link
Owner

Thanks, found the issue, it is a conversion issue as everything gets stored as strings internally because of the EDS/XML output formats and its also allowable to have any default value number in decimal, hex or octal. The max sub index value was not going through the correct converter.

Ideally the max subindex needs to be extracted by a function within libedssharp not in the GUI but that is for another day..

@jimlittlefield
Copy link
Author

Thanks Robin...I will rebuild using your latest.
jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants