Replies: 7 comments 4 replies
-
Well, the main purpose of templates is that you can set whatever color you like to whatever field through the template .json file.
Will think about that.
You can set whatever size of the data you like through the "size" parameter. See examples. I will update documentation to explain templates more thoroughly when they are more complete. |
Beta Was this translation helpful? Give feedback.
-
I understand this. To explain better, I was thinking that the template viewer pick some nice colors if none were defined in the template. The current example templates show most fields in grey because the colors aren't defined.
Thank you for the big endian option. Please how can I create a template that contains a mixture of big endian and little endian data? Could the endianness be defined in the template itself? |
Beta Was this translation helpful? Give feedback.
-
Unless the color is defined, all fields in the nested region have the same color. This makes the fields difficult to understand the fields.
The template feature assumes the struct contains little endian fields by default. In the big endian case, it relies on the user to know that the data is big endian and select it. It would be better if this could be set in the template itself. Yes, occasionally, there is a mixture of big and little endian data in the same structures. For example, in the ISO9660 format there is mixed use of big/little endian in neighbouring fields: https://en.wikipedia.org/wiki/ISO_9660. A basic solution would be to allow the template default mode to be set as big/little endian. An extension of this would be to allow the default mode to be overridden per field. This would make the template feature much more flexible and allow it to easily represent both big, little and mixed endian fields. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the recent changes. Maybe one day the templates could also support specific data types like the data interpreter? I guess this would be a much bigger change but wanted to suggest it because it would be a truly amazing feature. |
Beta Was this translation helpful? Give feedback.
-
I've added this option to a dialog, hope it helps.
It's quite possible, all the underlying code is already here. Just need some bit of inspiration. |
Beta Was this translation helpful? Give feedback.
-
The recent changes to the templates feature are great. Maybe you would consider some of the following suggestions for extra features:
I guess the final three suggestions could be complicated to implement? They would add a huge amount of flexibility to the template feature. I could suggest the ultimate solution would be if the element count, offset or enableness could be determined based on not only another named field but an expression evaluating other field(s) using something like the "C++ Mathematical Expression Toolkit Library (ExprTk)". I don't know if this would be possible but it would open a massive number of possibilities. |
Beta Was this translation helpful? Give feedback.
-
I would suggest a syntax like this: ` ... { ... { In this example, I used the syntax ".value" to indicate the value of the field: Field10's offset is the value of field1 + 20 bytes Field20's enabled status is the value of field 1 logically AND'd with 32. If true, the field would be enabled. A field that was disabled would be invisible and treated as not present. I don't know if this would be possible? |
Beta Was this translation helpful? Give feedback.
-
I really like the new templates feature. Some suggestions to make it even better:
Auto generate distinct colors - Most of the data items are displayed in grey. It would be easier to read the template if a range of colors were used.
Big endian datatypes - The current templates only have little endian data types. Big endian support would be fantastic for working with other data from other platforms.
Array data type - Not sure if this is already supported? Maybe you could provide a generic "array" data type for situations where the built-in types are not sufficient.
Beta Was this translation helpful? Give feedback.
All reactions