Skip to content

Commit

Permalink
Issue #104: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kanigsson committed Jan 13, 2022
1 parent 5e0cde5 commit 0442aaa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/Language-Reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ A message type is a collection of fields. Additional xref:syntax-then_clause[the
[[syntax-message_aspects]]message_aspects ::= xref:syntax-message_aspect[message_aspect] { *,* xref:syntax-message_aspect[message_aspect] }
[[syntax-message_aspect]]message_aspect ::= xref:syntax-checksum_aspect[checksum_aspect]
[[syntax-message_aspect]]message_aspect ::= xref:syntax-checksum_aspect[checksum_aspect] | xref:syntax-byteorder_aspect[byteorder_aspect]
[[syntax-checksum_aspect]]checksum_aspect ::= *Checksum* *=>* *(* xref:syntax-checksum_definition[checksum_definition] { *,* xref:syntax-checksum_definition[checksum_definition] } *)*
Expand All @@ -174,6 +174,10 @@ A message type is a collection of fields. Additional xref:syntax-then_clause[the
[[syntax-field_range_first]]field_range_first ::= xref:syntax-name[name]*'First* | xref:syntax-name[name]*'Last + 1*
[[syntax-field_range_last]]field_range_last ::= xref:syntax-name[name]*'Last* | xref:syntax-name[name]*'First - 1*
[[syntax-byteorder_aspect]]byteorder_aspect ::= *Byte_Order* *=>* xref:syntax-byteorder_definition[byteorder_definition]
[[syntax-byteorder_definition]]byteorder_definition ::= *High_Order_First* | *Low_Order_First*
----

*Static Semantics*
Expand All @@ -186,6 +190,8 @@ The field type `Opaque` represents an unconstrained sequence of bytes. The size

A checksum aspect specifies which parts of a message is covered by a checksum. The definition of the checksum calculation is not part of the specification. Code based on the message specification must provide a function which is able to verify a checksum using the specified checksum elements. A checksum element can be a field value, a field size or a range of fields. The point where a checksum should be checked during parsing or generated during serialization must be defined for each checksum. For this purpose the `Valid_Checksum` attribute is added to a condition. All message parts on which the checksum depends have to be known at this point.

The `Byte_Order` aspect allows the user to specify the endianness of the message, with the two possible choices `High_Order_First` (big endian, or network byte order) and `Low_Order_First` (little endian). If the `Byte_Order` aspect is not specified, the byte order of the message is set to `High_Order_First`.

`Message'First`, `Message'Last` and `Message'Size` can be used in expressions to refer to the position of the first or last bit of the message or the size of the message. All bytes which were received when parsing or were written when serializing are considered as part of the message.

*Example*
Expand Down

0 comments on commit 0442aaa

Please sign in to comment.