Pure Elixir implementation of IEC 60870-5-101 and IEC 60870-5-104 (Master & Slave, Balanced & Unbalanced,
full Information Objects, and bidirectional File Transfer Service), modeled after lib60870-C.
Core Modules
- Shared Application Layer:
IEC60870.ASDU: ASDU header & payload encoding/decoding (includingSQ=0discrete andSQ=1compact sequences)IEC60870.InformationObject: Unified Information Object wrapper and codec dispatcherIEC60870.IO.Monitoring: Monitoring direction Information Objects (TypeIDs1..41,70)IEC60870.IO.Control: Control direction Information Objects (TypeIDs45..51,58..64)IEC60870.IO.System: System Information Objects (TypeIDs100..107)IEC60870.IO.Parameter: Parameter Information Objects (TypeIDs110..113)IEC60870.IO.File: File Transfer Information Objects (TypeIDs120..127& domestic extension210)IEC60870.Types.CPTime:CP16Time2a,CP24Time2a,CP32Time2a,CP56Time2aIEC60870.Types.BCR: 5-byteBinaryCounterReadingIEC60870.Types.Qualifiers: Qualifier bitfields and normalized/scaled value helpers
- IEC 60870-5-104 (TCP / TLS):
IEC60870.CS104.Frame: APCII-Frame,S-Frame,U-Framecodec and stream deframerIEC60870.CS104.Connection: 104 Client / MasterGenServerIEC60870.CS104.Slave: 104 Server / SlaveGenServerwith 3 redundancy modes and priority queuesIEC60870.CS104.MasterConnection: Peer connection response API for Slave callbacks
- IEC 60870-5-101 (Serial FT 1.2 / Virtual Bus):
IEC60870.CS101.Frame: FT 1.2 variable, fixed, and single-byte ACK0xE5codec and stream deframerIEC60870.CS101.LinkLayer: Balanced & Unbalanced Primary/Secondary link state machinesIEC60870.CS101.Master: 101 MasterGenServer(Balanced & Unbalanced multi-slave)IEC60870.CS101.Slave: 101 SlaveGenServer(Balanced & Unbalanced Class 1 / Class 2 queues)IEC60870.CS101.Transport.VirtualBus&IEC60870.CS101.Transport.UART: Serial / virtual transports
- File Transfer Service:
IEC60870.FileService.Server: Slave file server (directory listing, file upload to Master, file download from Master)IEC60870.FileService.Client: Master file client (request_directory/4,get_file/5,send_file/3)IEC60870.FileService.TransparentFile&IEC60870.FileService.Receiver
- Observability & Metrics:
IEC60870.Telemetry: Telemetry event dispatcher (raw_message,asdu,connection_event,link_state,file_service)
Summary
Functions
Convenience helper to decode an ASDU binary into %IEC60870.ASDU{}.
Convenience helper to encode an %IEC60870.ASDU{} into binary.