Hello,
My question is more-or-less: "Have I misunderstood the documentation? Do you see an existing, supported solution?".
Here's the situation:
I'm trying to represent an inconvenient, existing protocol using CommsDSL and am presented with this situation:
The response to a command, in some cases, will have data, types, and length which all vary depending upon
the particular parameters of the command message which has elicited this response. The only length information
provided is the overall length of the response provided in the layer in the frame definition.
I can imagine success in representing this response as <data> by either:
- having a
<data> field consume all available bytes remaining in the <frame>
- by being able to specify that the length of the
<data> field is fixed at a constant offset from the frame.size i.e. length
of a <data> field is defined as length = frame.size - constant, maybe represented like:
<data name="VaryingPayload" lengthPrefix="$FrameName.size" lengthOffset="7"/>
However, as I read the CommsDSL Schema documentation:
- a
<data> field with no length specification consumes all data in the input buffer, which wouldn't work in my case,
("Such definition of the does NOT have any limit on the length of the data, and will consume
all the available bytes in the input buffer.")
- I can't see that it is possible to specify such a length representation for a
<data> field
Thanks for your time, and for this well-thought-out library!
Hello,
My question is more-or-less: "Have I misunderstood the documentation? Do you see an existing, supported solution?".
Here's the situation:
I'm trying to represent an inconvenient, existing protocol using CommsDSL and am presented with this situation:
The response to a command, in some cases, will have data, types, and length which all vary depending upon
the particular parameters of the command message which has elicited this response. The only length information
provided is the overall length of the response provided in the layer in the frame definition.
I can imagine success in representing this response as
<data>by either:<data>field consume all available bytes remaining in the<frame><data>field is fixed at a constant offset from theframe.sizei.e. lengthof a
<data>field is defined aslength = frame.size - constant, maybe represented like:However, as I read the CommsDSL Schema documentation:
<data>field with no length specification consumes all data in the input buffer, which wouldn't work in my case,("Such definition of the does NOT have any limit on the length of the data, and will consume
all the available bytes in the input buffer.")
<data>fieldThanks for your time, and for this well-thought-out library!