Size Method

In our previous examples, the size of each field is fixed and is obtained by invoking the Size Method called Fixed that returns a given constant. The Fixed method takes two parameters, a count and a unit name. The unit may be "bits", "bytes", "words", etc. In other cases, the size of a field may be specified by the contents of another field, may be defined by some fixed value that marks its end (such as a null-terminated string), or may comprise the rest of the data in the frame. Various other Size Methods are provided to handle these situations.