Slide 10 of 41
Notes:
An obvious generalisation of this approach was to introduce the concept of parameter groups in which a message might carry a set of parameter groups, each of which had an ID and a length, and carried a defined set of parameters.
Notice that in this approach, it is natural for every parameter (or parameter group) to have a distinct ID, and to talk about the set of parameters of a message - to be put in any order by an encoder - rather than of a sequence of parameters to be placed in a fixed order.
The approach copes well with
- mixed variable and fixed length fields
- optionality (a parameter can be omitted, perhaps with a default value)
- with choices (include parameter A or parameter B or parameter C)
- with arbitrary many repetitions of a single parameter type within a parameter group
- with additional parameters (not known to version 1 systems) added in version 2
On the negative side, however, length fields tended to be counts of octets, and all elements of the encoding were an integral number of octets. This meant that a parameter carrying a TRUE or FALSE value (a boolean) required a minimum of three octets to represent it.
This approach is the basis of BER.