MRM TDS format: Message model integrity

When you use the TDS wire format, you must conform to a number of rules that apply to the setting of values of properties. This is necessary to avoid any discrepancies when processing a message within the specified model.

Rules of TDS physical format properties

Restrictions to message formats are checked. These restrictions follow the rules specified in Message Sets: TDS message model integrity. Most rules are applied for at least one of these reasons:

Rules for message definition
Some rules are necessary for the message to be defined.

For example, in a Fixed Length separation type all elements must have some length defined, either directly or by using a Length Reference. Without this information, it is impossible to tell in the message bit stream where one data element ends and the next starts.

Rules for nesting
Nesting rules relate to which separation types can be nested inside each other.

Such rules are applied when an element of a complex type is present inside another complex type. An example is that it is not possible to have a Tagged Delimited separation type inside a Fixed Length type. Because a Tagged Delimited separation type is of variable length, the parent Fixed Length type would be unable to tell where that particular element ended, as there would be no length provided. Therefore the message could not be processed.

Rules linking to the logical model
There are also rules linking TDS to the logical model.

These rules occur where a group composition or group content validation cannot be used with a particular separation type. Again this is for message integrity. For example, a separation type of All Elements Delimited cannot have a group composition of Open, as there is no information as to what the extra elements represent and where they are in the bit stream.