m-bus-parser-cli 0.0.15

A cli to use the library for parsing M-Bus frames
# M-Bus parser (wired) CLI
This is a command line interface for the m-bus parser. The parser is able to parse the link layer of the m-bus protocol. The application layer is not yet implemented fully, but works partially. It is planned to have various formats for the output. **Currently** the output is in a table format. Input can be a file or a string of the format `0x00 0x01 0x02 ...`, `000102...` or `00 01 02...`.
+=====================================+====================+============+
| (182007+0)e0[]FabricationNumber,  | 0,Inst,BCD 8-digit | 07 20 18 00|
+-------------------------------------+--------------------+------------+
| (269+0)e0[m^3 ]                   | 0,Inst,BCD 8-digit | 69 02 00 00|
+-------------------------------------+--------------------+------------+
```
+===========================+=======================+============+
| (0+0)e4[W W ]           | 0,Inst,32-bit Integer | 00 00 00 00|
+---------------------------+-----------------------+------------+
| (3+0)e-1[m^3 ]          | 0,Inst,BCD 8-digit    | 03 00 00 00|
+---------------------------+-----------------------+------------+
| (0+0)e3[W ]             | 0,Inst,BCD 6-digit    | 00 00 00|
+---------------------------+-----------------------+------------+
| (0+0)e-3[m^3 h^-1 ]     | 0,Inst,BCD 6-digit    | 00 00 00|
+---------------------------+-----------------------+------------+
| (1288+0)e-1[°C ]        | 0,Inst,BCD 4-digit    | 88 12|
+---------------------------+-----------------------+------------+
| (516+0)e-1[°C ]         | 0,Inst,BCD 4-digit    | 16 05|
+---------------------------+-----------------------+------------+
| (7723+0)e-2[°K ]        | 0,Inst,BCD 6-digit    | 23 77 00|
+---------------------------+-----------------------+------------+
| (12/Jan/12)(Date)                       | 0,Inst,Date Type G    | 8C 11|
+---------------------------+-----------------------+------------+
| (3383+0)e0[day ]        | 0,Inst,16-bit Integer | 37 0D|
+---------------------------+-----------------------+------------+
| (Manufacturer Specific: [15, 96, 0]None) | None                  | 60 00|
+---------------------------+-----------------------+------------+
```
├──────────────────────────────┼────────────────────┼─────────────┤
│ (182007)(FabricationNumber)) │ 0,Inst,BCD 8-digit │ 07 20 18 00 │
├──────────────────────────────┼────────────────────┼─────────────┤
│ (269)[]Volume)           │ 0,Inst,BCD 8-digit │ 69 02 00 00 │
└──────────────────────────────┴────────────────────┴─────────────┘
```

### String input

```bash
$ cargo run -p m-bus-parser-cli --release -- parse --data "68 3D 3D 68 08 01 72 00 51 20 02 82 4D 02 04 00 88 00 00 04 07 00 00 00 00 0C 15 03 00 00 00 0B 2E 00 00 00 0B 3B 00 00 00 0A 5A 88 12 0A 5E 16 05 0B 61 23 77 00 02 6C 8C 11 02 27 37 0D 0F 60 00 67 16"

Long Frame
┌────────────────────────────────┬─────────────┐
│ Function                       │ Address     │
├────────────────────────────────┼─────────────┤
│ RspUd (ACD: false, DFC: false) │ Primary (1) │
└────────────────────────────────┴─────────────┘
┌───────────────────────┬────────────────────────────────────────────┐
│ Field                 │ Value                                      │
├───────────────────────┼────────────────────────────────────────────┤
│ Identification Number │ 02205100                                   │
├───────────────────────┼────────────────────────────────────────────┤
│ Manufacturer          │ ManufacturerCode { code: ['S', 'L', 'B'] } │
├───────────────────────┼────────────────────────────────────────────┤
│ Access Number         │ 0                                          │
├───────────────────────┼────────────────────────────────────────────┤
│ Status                │ Permanent error, Manufacturer specific 3   │
├───────────────────────┼────────────────────────────────────────────┤
│ Signature             │ 0                                          │
├───────────────────────┼────────────────────────────────────────────┤
│ Version               │ 2                                          │
├───────────────────────┼────────────────────────────────────────────┤
│ Medium                │ Heat                                       │
└───────────────────────┴────────────────────────────────────────────┘
┌──────────────────────────────────────────┬───────────────────────┬─────────────┐
│ Value                                    │ Data Information      │ Hex         │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (0)e4[Wh])                               │ 0,Inst,32-bit Integer │ 00 00 00 00 │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (3)e-1[m³](Volume))                      │ 0,Inst,BCD 8-digit    │ 03 00 00 00 │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (0)e3[W])                                │ 0,Inst,BCD 6-digit    │ 00 00 00    │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (0)e-3[m³h⁻¹])                           │ 0,Inst,BCD 6-digit    │ 00 00 00    │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (1288)e-1[°C])                           │ 0,Inst,BCD 4-digit    │ 88 12       │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (516)e-1[°C])                            │ 0,Inst,BCD 4-digit    │ 16 05       │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (7723)e-2[°K])                           │ 0,Inst,BCD 6-digit    │ 23 77 00    │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (12/Jan/12)(Date))                       │ 0,Inst,Date Type G    │ 8C 11       │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (3383)[day])                             │ 0,Inst,16-bit Integer │ 37 0D       │
├──────────────────────────────────────────┼───────────────────────┼─────────────┤
│ (Manufacturer Specific: [15, 96, 0]None) │ None                  │ 60 00       │
└──────────────────────────────────────────┴───────────────────────┴─────────────┘
```