ExCEP.Compat (ex_cep v0.1.1)

Copy Markdown

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")

Summary

Functions

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

Default balanced profile.

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

Types

auth_signature_mode()

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

deflate_mode()

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

t()

@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()
}

Functions

clean_modern()

@spec clean_modern() :: t()

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

new(opts \\ [])

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

Default balanced profile.

strict_spec()

@spec strict_spec() :: t()

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