[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [rohc] FN: default_methods and control fields clarification/new usage
Eeek. Inline
> -----Original Message-----
> From: Carsten Bormann [mailto:cabo at tzi.org]
> Sent: Friday, April 15, 2005 4:26 PM
> To: Kristofer Sandlund
> Cc: Finking, Robert; Carsten Bormann; rohc at ietf.org
> Subject: Re: [rohc] FN: default_methods and control fields
> clarification/new usage
>
>
> On Apr 15 2005, at 16:55 Uhr, Kristofer Sandlund wrote:
>
> > My understanding when I made the packet formats was that you always
> > "executed" the default methods and then if new encoding for a field
> > was present in the compressed formats, you "overwrote" the
> > default_methods encoding.
>
> Yes.
>
> This works because fields have a name.
>
> There is no way to overwrite a let statement because it does
> not have a
> name, so all let statements from the default_methods are used
> everywhere.
This is not what the FN draft says - Eilert proposed this ages ago and
we discussed it (on the list for once IIRC) and ended up with what we've
now got. I'll paste below what the FN draft currently says, but the nub
of it is this: IFF there is no bindings specified for a field by a
packet format THEN you consult the default_methods for all bindings for
that field only. IFF there are let statements binding certain attributes
of a field (but not all) THEN you consult the default_methods for those
attributes which aren't already bound.
IIRC This was because Ghyslain and I weren't happy that you had to know
*how* a field was bound in order to understand the override behaviour.
To put it simply, "if it's in default_methods then it should be a
default".
Here's what the draft says:
4.9.4.3 Default Encoding Methods - default_methods
<snip>
default_methods =
{
field_1 ::= uncompressed_value(4,1);
field_2 ::= uncompressed_value(4,2);
field_3 ::= lsb(3,-1);
let(field_4:uncomp_length == 4);
};
<snip>
The field encodings list of default_methods may also contain default
bindings for individual attributes by using "let" statements. If a
default binding is given for an individual attribute, that binding may
be overridden by another binding for that attribute or for the field to
which it belongs. The overriding binding may either be another let
statement, or an encoding method. Assuming the default methods given in
the example above, the first three of the following four compressed
packet formats would override the default binding for
"field_4:uncomp_length":
co_format_1 = field_4
{
let(field_4:uncomp_length == 3); % set uncomp_length to 3
};
co_format_2 = field_4
{
field_4 ::= irregular(3); % set uncomp_length to 3
};
co_format_3 = field_4
{
field_4 ::= '1010'; % set uncomp_length to undefined
};
co_format_4 = field_4
{
let(field_4:uncomp_value == 12); % use default uncomp_length
};
It is allowed to override one default binding but still use another.
Overriding one default binding does not imply that other default
bindings are also being overridden. It is also allowed to supply default
bindings for some but not all fields.
Note that a structure's default methods are only consulted for packet
formats which do not already specify an encoding for all of their
fields. For the packet formats that do use the default methods, only
those fields whose encoding methods are not specified are looked up in
the default methods.
_______________________________________________
Rohc mailing list
Rohc at ietf.org
https://www1.ietf.org/mailman/listinfo/rohc