Open BryanCrotazGivEnergy opened 1 month ago
I was considering using the "packet" type as a way to draw a memory map, which would be byte-scale instead of bit-scale. I wonder if a different syntax that didn't "tie" the diagram to a particular unit of measure would be more flexible? Shorting to b
would make it so both "bits" and "bytes" make sense. But maybe doing something like +5
to mean it's relative to the previous thing would work and be intuitive?
+16: Header
+32: Data
+4: Footer
Using +
is similar to "relative time" in PlantUML's timing diagram.
Proposal
Mermaid packet format insists on bit start -> bit end. This makes it very difficult to change your mind while generating a packet diagram, eg increasing one field from 16-32 bit.
As well as supporting
<s>-<e>: "name"
wheres
is the start bit ande
is the end bitAlso support
<s>-<b>bits: "name"
<s>-1bit: "name"
wheres
is the start bit,b
is a bit countShort form is the most valuable
<b>bits: "name"
follows on automatically from the previous bit. If this is the first field, it's assumed to start at bit 0.Example
```mermaid 8bits: "Message Id" 16bits: "From Id" 32bits: "Command Data" 1bit: "write flag" 7bits: "reserved" 64-8bits: "new data" ```
Screenshots
No response