API Reference ex_cep v#0.1.1
Copy MarkdownModules
Pure Elixir implementation of the China Southern Power Grid (CSG) CEP Edge Gateway Plug-and-Play Protocol (TS2.2).
High-level Business Channel (TCP 9902) Cluster -> Gateway service client.
Default ExCEP.Cluster.Handler that acknowledges Gateway reports (ModelChange, DevAdd,
DevUpdate, DevDel, DataSpont), accepts incoming chunked FileSend/FileDataTrans
transfers with CRC32 verification, and invokes optional user callbacks (:on_asdu, :on_file_received).
Callback behaviour for handling Gateway-initiated ASDUs on the Cluster (Master) server.
High-level Management Channel (TCP 9901) Cluster -> Gateway service client.
Edge Cluster (Master) TCP/TLS server and Gateway session registry.
Per-gateway TCP/TLS connection session on the Cluster (Master) server.
Binary Authentication ASDU codec per CSG CEP TS2.2 Section 5 (Tables 3, 4, 5).
Authentication Confirm ASDU (0x03, Table 5).
Authentication Request ASDU (0x01, Table 3).
Authentication Response ASDU (0x02, Table 4).
JSON Data ASDU envelope codec per CSG CEP TS2.2 Section 4.7 (Table 2).
TS2.2 Section 4.7 (Table 2) Data ASDU Head structure.
APDU framing codec for CSG CEP TS2.2 Section 4.6–4.8.
Builders for all Business Channel (TCP 9902) ASDUs per CSG CEP TS2.2 Section 8
Builders and helpers for Common Data ASDUs (CSG CEP TS2.2 Section 6), supported on both Management (9901) and Business (9902) channels
Builders for all Management Channel (TCP 9901) ASDUs per CSG CEP TS2.2 Section 7
Standard Alarm Event codes defined in CSG CEP TS2.2
Normative error codes defined in Appendix A (Table A.1) of CSG CEP TS2.2.
Timestamp formatting and parsing per CSG CEP TS2.2 ("YYYY-MM-DD HH:MM:SS.AAA", local time).
Shared protocol enumerations and helpers defined in CSG CEP TS2.2.
Vendor and provincial grid interoperability profile for CSG CEP TS2.2.
Runtime stack configuration accessors and consistency validation for ExCEP.
Pure-Elixir SM2 X.509 Certificate & Key Parser/Encoder (GM/T 0015, GB/T 32918, RFC 5280).
No-op signer for development and plaintext/stubbed testing.
Pure Elixir implementation of SM2 digital signatures (GB/T 32918.2-2016) over sm2p256v1.
Pure Elixir implementation of the Chinese national cryptographic hash function SM3 (GB/T 32905-2016).
Pure Elixir implementation of the Chinese national block cipher SM4 (GB/T 32907-2016).
Pluggable signing and verification behaviour for CEP APDU 64-byte SM2 signatures.
Single-channel Edge Gateway TCP/TLS client (:management on 9901 or :business on 9902).
Reference in-memory ExCEP.Gateway.Handler implementation supporting
Coordinates both CEP Northbound channels for an Edge Gateway
Bidirectional chunked file transfer engine per CSG CEP TS2.2 Section 6.2.
Callback behaviour for handling incoming Cluster (Master) commands on an Edge Gateway.
Supervisor-friendly auto-reconnecting CEP Gateway client worker with exponential backoff.
Periodic and spontaneous DataSpont reporting engine for an Edge Gateway (Section 8.7 & 8.9).
Data Subscription rule engine per CSG CEP TS2.2 Section 8.7 & 8.8.
CSG CEP Plug-and-Play Device Model structure aligned with TS2.1 (Section 8, Tables 27–28, Section 9, Appendix B).
Built-in standard device modeling catalog from CSG CEP TS2.1 (Chapter 6 Tables 1–26 & Appendix A).
ICD ↔ Simplified JSON Model consistency verifier per CSG CEP TS2.1 Section 9.3
DL/T 860 (IEC 61850) .icd XML model parser per CSG CEP TS2.1 Section 8.2 & 9.1.
Strict JSON parser, semantic validator, and serializer for CSG CEP TS2.1 Simplified Device Model files (Section 8.3, Tables 27–28, Section 9.2, Appendix B).
Represents a single Data Object (DO) entry inside a CSG CEP TS2.1 simplified JSON model
(Table 27).
Represents one service group (parameter, analog, discrete, control, accumulator)
inside a CSG CEP TS2.1 simplified JSON model (Table 28).
OTP Supervisor helper for embedding ExCEP Cluster servers and/or auto-reconnecting
Edge Gateway clients into a host application's supervision tree.
Telemetry instrumentation for ExCEP using :telemetry ~> 1.4.
Pluggable payload encryption behaviour for CSG CEP TS6.3 encrypted communication.
Connection parameters for CEP Gateway clients and Cluster servers.
Shared frame encoding/sending helpers for both Gateway clients and Cluster sessions.
Plaintext pass-through ExCEP.Transport.Cipher.
Unified TCP / TLS socket wrapper over Erlang :gen_tcp and :ssl (IPv4 & IPv6).