# `TeltonikaCodec.Codec16`
[🔗](https://github.com/neilberkman/teltonika_codec/blob/v0.1.0/lib/teltonika_codec/codec16.ex#L1)

Parser for Teltonika Codec 16 (ID `0x10`).

Similar to Codec 8 but with 2-byte I/O element IDs and an additional
Generation Type field indicating how the data was generated.

## Generation Types

| Value | Meaning    |
|-------|------------|
| 0     | On Exit    |
| 1     | On Entrance|
| 2     | On Both    |
| 3     | Reserved   |
| 4     | Hysteresis |
| 5     | On Change  |
| 6     | Eventual   |
| 7     | Periodical |

## I/O Element Layout

    <<event_io_id::16, generation_type::8, total_count::8,
      n1_count::8, ...1-byte values (2-byte IDs)...,
      n2_count::8, ...2-byte values (2-byte IDs)...,
      n4_count::8, ...4-byte values (2-byte IDs)...,
      n8_count::8, ...8-byte values (2-byte IDs)...>>

---

*Consult [api-reference.md](api-reference.md) for complete listing*
