Industrial Network Protocol Suite — Micro-Kernel + Protocol SDK Architecture, 40 Industrial Protocols, 6 PHP Runtimes
PHP Industrial Network Protocol Suite — micro-kernel + protocol SDK architecture, covering 40 industrial protocols and compatible with 6 PHP runtime environments.
English
Table of Contents
Project Overview Industrial Protocols is an industrial communication protocol suite built for the PHP ecosystem, using a micro-kernel + protocol SDK architecture. There are 40 protocol packages (15 pure-PHP implementations + 25 Bridge packages), each one an independent GitHub repository and Composer package, installed on demand through Packagist.
Core idea: the kernel only defines “what a protocol is” and contains no concrete protocol implementation. Users install protocol packages as needed, and at boot the kernel discovers and registers them automatically via the extra field in composer.json.
1 composer require erikwang2013/industrial-protocols-kernel erikwang2013/industrial-protocols-modbus
Architecture Overview 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ┌─────────────────────────────────────────────────┐ │ User Application │ ├─────────────────────────────────────────────────┤ │ Framework Adapters: Laravel · Webman · Hyperf │ │ ThinkPHP · Yii2 · Plain PHP │ ├─────────────────────────────────────────────────┤ │ Micro-Kernel │ │ ProtocolRegistry · ConnectionManager(3 strategies)│ │ ConfigRepository · GatewayEngine · CircuitBreaker│ │ CoroutineAdapter · Bridge Layer · Vendor Profiles│ │ Event System(PSR-14) · Log(PSR-3) · Retry(4 types)│ │ Metrics(Prometheus) · Alert · Security · Exception│ ├─────────────────────────────────────────────────┤ │ Protocol SDK (6 Core Interfaces) │ ├─────────────────────────────────────────────────┤ │ 40 Protocol Packages: 15 Pure PHP + 25 Bridge │ └─────────────────────────────────────────────────┘
All Protocol Packages Industrial Ethernet (5)
Package
Repository
Description
modbus
erikwang2013/industrial-protocols-modbus
Modbus TCP/RTU/ASCII, FC 01/03/04/06/10, port 502
bacnet
erikwang2013/industrial-protocols-bacnet
BACnet/IP, Who-Is/I-Am device discovery, ReadProperty, port 47808
ethernetip
erikwang2013/industrial-protocols-ethernetip
EtherNet/IP, ENIP session management + CIP Read Tag, port 44818
opcua
erikwang2013/industrial-protocols-opcua
OPC UA Binary protocol stack, Session + Read/Write/Browse, port 4840
profinet
erikwang2013/industrial-protocols-profinet
Profinet NRT, DCP device discovery + Record Data read/write, port 34964
Fieldbus (12)
Package
Repository
Description
hart
erikwang2013/industrial-protocols-hart
HART 4-20mA FSK, HART modem, PV/loop current
cclink
erikwang2013/industrial-protocols-cclink
CC-Link RS-485, master-slave polling, CRC-16/XMODEM
dnp3
erikwang2013/industrial-protocols-dnp3
DNP3 power automation, Class 0 polling, port 20000
iec61850
erikwang2013/industrial-protocols-iec61850
IEC 61850 MMS substation automation, port 102
profibus
erikwang2013/industrial-protocols-profibus
PROFIBUS DP/PA/FMS, requires a Siemens CP 5611/Anybus gateway
canopen
erikwang2013/industrial-protocols-canopen
CANopen, requires a PCAN-USB/SocketCAN interface
devicenet
erikwang2013/industrial-protocols-devicenet
DeviceNet, requires an Anybus DeviceNet Scanner
foundationfieldbus
erikwang2013/industrial-protocols-foundationfieldbus
Foundation Fieldbus H1/HSE, requires NI USB-8486/Softing FFusb
asinterface
erikwang2013/industrial-protocols-asinterface
AS-Interface, requires a Bihl+Wiedemann/Pepperl+Fuchs gateway
iolink
erikwang2013/industrial-protocols-iolink
IO-Link, requires an ifm/Balluff IO-Link Master
cclinkie
erikwang2013/industrial-protocols-cclinkie
CC-Link IE Field industrial Ethernet edition, requires a gateway
IoT/Messaging (2)
Automotive Bus (5)
Building/Lighting (2)
Hardware Bridge (11)
System Bus (3)
Supported Frameworks
Framework
Detection
Coroutines
Integration
Plain PHP
Default fallback
Fiber
Kernel instantiation
Laravel
Illuminate\Foundation\Application
Octane Swoole
ServiceProvider + Facade + artisan
Webman
Workerman\Worker
Swoole/Fiber
config/plugin auto-discovery
Hyperf
Hyperf\Framework\ApplicationFactory
Native Swoole
ConfigProvider + DI
ThinkPHP
think\App
think-swoole
services.php + singleton
Yii2
yii\base\Application
swoole-yii2
Bootstrap + components
Detection priority: Laravel → Webman → Hyperf → ThinkPHP → Yii2 → Plain PHP
Quick Start 1 composer require erikwang2013/industrial-protocols-kernel erikwang2013/industrial-protocols-modbus
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 <?php require 'vendor/autoload.php' ;use Erikwang2013 \IndustrialProtocols \Kernel ;use Erikwang2013 \IndustrialProtocols \Modbus \ModbusProtocol ;$kernel = new Kernel (['config_path' => __DIR__ . '/industrial-protocols.php' ]);$kernel ->getProtocolRegistry ()->register (new ModbusProtocol ());$kernel ->boot ();$conn = $kernel ->getConnectionManager ()->connect ('plc-001' );$result = $conn ->read ('40001' );echo $result ['40001' ];$conn ->write (['40001' => 25 ]);$health = $kernel ->getConnectionManager ()->health ('plc-001' );echo "{$health->state->value} , {$health->latencyMs} ms" ;$kernel ->shutdown ();
Configuration Reference 1 2 3 4 5 6 7 8 9 10 11 12 13 14 <?php return [ 'devices' => [ 'plc-001' => [ 'protocol' => 'modbus' , 'variant' => 'tcp' , 'host' => '192.168.1.10' , 'port' => 502 , 'unit_id' => 1 , 'timeout' => 3000 , ], ], 'gateway' => ['rules' => []], 'health_check_interval' => 30 , 'default_retry_max' => 3 , 'default_retry_backoff' => 'exponential' , ];
Docs
Requirements
License MIT — Copyright (c) 2026 erik erik@erik.xyz — https://erik.xyz