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

Add more control over address #6

Open
ambihelical opened this issue Apr 6, 2022 · 3 comments
Open

Add more control over address #6

ambihelical opened this issue Apr 6, 2022 · 3 comments

Comments

@ambihelical
Copy link

Is your feature request related to a problem? Please describe.
I have a payload to describe that has several fixed length arrays, of differing lengths, each of which I put in one or more rows. Currently I have a borderless box before each array to describe the array, and then call (def boxes-per-row xx)(draw-column-headers) to show byte offsets for the boxes in each row.

Unfortunately, the current address appears to be reset with (draw-column-headers), so there is no byte offset for each row. Also, there doesn't seem to be way to indicate that the descriptive text box should not be counted as field bytes.

Describe the solution you'd like

  1. Be able to tell draw-column-headers to not reset the address
  2. Be able to indicate that a box should not modify the address (i.e. is not a field)

Describe alternatives you've considered
I have made separate figures for each row, but this is awkward.
I have also tried without descriptive text, but there are many similar arrays and it is hard to describe them within each field box only.
I currently draw the row header manually to get around bytefield not updating or drawing the address. This is error prone but works.

Additional context
Add any other context or screenshots about the feature request here.

@brunchboy
Copy link
Member

I think this goes a bit far beyond the scope of what this is intended to offer. If you can find a clean way to implement this, I would consider a pull request, but I would worry it might complicate things too much. I think your solution of drawing your special-purpose headers yourself is the correct one, and you could provide a library function that does this exactly the way you want it in an include file.

@brunchboy
Copy link
Member

I should also say, thanks for using this, and for looking for ways to make it even better! 😄 But I should be clear that I’d consider a PR for drawing new column headers without changing the address. I don’t think having boxes within the diagram that do not increment the address would be a good idea, that breaks the entire conceptual model of the byte field grid.

@ambihelical
Copy link
Author

I understand. Thanks for the fast feedback.

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