# `ExCEP.Compat`

Vendor and provincial grid interoperability profile for CSG CEP TS2.2.

The trial edition of CSG CEP TS2.2 contains a few minor discrepancies between tables and
JSON examples, as well as vendor-specific conventions. `ExCEP.Compat` centralizes all
compatibility switches in one struct so field deployments can tune interop without
forking protocol code.

## Fields
- `:dev_del_resp_name` — `"DevDelResp"` (clean) or `"DevDelRsep"` (Table 107 literal)
- `:periodic_trans_cot` — `"peroid"` (Table 112 literal) or `"period"` (clean)
- `:para_read_all_key` — `"DataAll"` (JSON example) or `"All"` (Table 116)
- `:auth_signature_mode` — `:trailer` (`bit0 = 1`, standard APDU trailer) or `:embedded`
  (`bit0 = 0`, 64-byte SM2 signature appended inside the Auth ASDU body)
- `:deflate_mode` — `:zlib` (RFC 1950 zlib wrapper) or `:raw` (RFC 1951 raw deflate)
- `:sm2_user_id` — SM2 user ID binary (default `"1234567812345678"`)

# `auth_signature_mode`

```elixir
@type auth_signature_mode() :: :trailer | :embedded
```

# `deflate_mode`

```elixir
@type deflate_mode() :: :zlib | :raw
```

# `t`

```elixir
@type t() :: %ExCEP.Compat{
  auth_signature_mode: auth_signature_mode(),
  deflate_mode: deflate_mode(),
  dev_del_resp_name: String.t(),
  para_read_all_key: String.t(),
  periodic_trans_cot: String.t(),
  sm2_user_id: binary()
}
```

# `clean_modern`

```elixir
@spec clean_modern() :: t()
```

Clean modern profile (uses `DevDelResp`, `period`, `DataAll`).

# `new`

```elixir
@spec new(keyword()) :: t()
```

Default balanced profile.

# `strict_spec`

```elixir
@spec strict_spec() :: t()
```

Strict literal TS2.2 trial-edition profile (uses `DevDelRsep`, `peroid`, `All`).

---

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