Exmbus.Parser.Afl.FragmentationControlField (Exmbus v0.4.0)
View SourceAFL Fragmentation Control Field (FCL) as per EN 13757-7:2018
| Bit | Field Name | Description |
|---|---|---|
| 15 | RES | Reserved (0b0 by default) |
| 14 | MF | More-Fragments |
0b0 This is the last fragment | ||
0b1 More fragments are following | ||
| 13 | MCLP | Message Control in this Fragment Present *a |
| 12 | MLP | Message Length in this Fragment Present *a |
| 11 | MCRP | Message counter in this Fragment Present *a |
| 10 | MACP | MAC in this Fragment Present *a |
| 9 | KIP | Key Information in this Fragment Present *a |
| 8 | RES | Reserved (0b0 by default) |
| 7 to 0 | FID | Fragment-ID |
*a0 = field is not present; 1 = field is present
The Fragment ID is used for the identification of each single fragment of a long message. Set FID to 1 for the first fragment of a fragmented message. FID shall increment with each fragment. The FID shall never roll over. For unfragmented messages the FID shall be set to 0.
Summary
Functions
Parses the Fragmentation Control Field (FCL) from the AFL.
Encodes the Fragmentation Control Field (FCL) to a binary format.
If the fragment ID is greater than 0, the message is fragmented
Functions
Parses the Fragmentation Control Field (FCL) from the AFL.
Examples
iex> decode(<<0b00000000, 0b00101100>>)
{:ok, %Exmbus.Parser.Afl.FragmentationControlField{
more_fragments?: false,
message_control_present?: true,
message_length_present?: false,
message_counter_present?: true,
mac_present?: true,
key_information_present?: false,
fragment_id: 0
}}
Encodes the Fragmentation Control Field (FCL) to a binary format.
Examples
iex> encode(%Exmbus.Parser.Afl.FragmentationControlField{
...> more_fragments?: false,
...> message_control_present?: true,
...> message_length_present?: false,
...> message_counter_present?: true,
...> mac_present?: true,
...> key_information_present?: false,
...> fragment_id: 0
...> })
<<0b00000000, 0b00101100>>
If the fragment ID is greater than 0, the message is fragmented