PHPackages                             php-opcua/opcua-client-nodeset - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-opcua/opcua-client-nodeset

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-opcua/opcua-client-nodeset
==============================

Pre-generated PHP classes from OPC Foundation UA-Nodeset companion specifications for use with php-opcua/opcua-client

v4.4.0(4w ago)04MITPHPPHP ^8.2CI passing

Since Mar 26Pushed 4w ago1 watchersCompare

[ Source](https://github.com/php-opcua/opcua-client-nodeset)[ Packagist](https://packagist.org/packages/php-opcua/opcua-client-nodeset)[ Docs](https://github.com/php-opcua/opcua-client-nodeset)[ RSS](/packages/php-opcua-opcua-client-nodeset/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (9)Versions (6)Used By (0)

**OPC UA NodeSet Types**
========================

[](#opc-ua-nodeset-types)

    ![OPC UA NodeSet Types](assets/logo-light.svg)

 [![Latest Version](https://camo.githubusercontent.com/af14685c5897dde8d56cc9083519bb5f1ac544824ae13fa476118e393305d774/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d6f706375612f6f706375612d636c69656e742d6e6f64657365743f7374796c653d666c61742d737175617265266c6162656c3d7061636b6167697374)](https://packagist.org/packages/php-opcua/opcua-client-nodeset) [![PHP Version](https://camo.githubusercontent.com/6a3ad9ba930db7a342de032e073634edf4f4dfb959c741dc9c000b03d10aee92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068702d6f706375612f6f706375612d636c69656e742d6e6f64657365743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-opcua/opcua-client-nodeset) [![License](https://camo.githubusercontent.com/e6c00fb8fd1ae6ab8f812188be1a29c5ef9c8df8e108266ba245ca171f44e700/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7068702d6f706375612f6f706375612d636c69656e742d6e6f64657365743f7374796c653d666c61742d737175617265)](LICENSE)

---

Pre-generated PHP classes from the [OPC Foundation UA-Nodeset](https://github.com/OPCFoundation/UA-Nodeset) companion specifications, for use with [`php-opcua/opcua-client`](https://github.com/php-opcua/opcua-client).

**807 PHP files** across **51 companion specifications** — NodeId constants, PHP enums, typed DTOs, binary codecs, and registrars with automatic dependency resolution. Zero configuration, just `composer require` and load.

Versioning
----------

[](#versioning)

This library follows the versioning of [`php-opcua/opcua-client`](https://github.com/php-opcua/opcua-client). Major and minor versions are kept in sync to ensure compatibility.

Installation
------------

[](#installation)

```
composer require php-opcua/opcua-client-nodeset
```

Requires `php-opcua/opcua-cli` ^4.1.

Quick Start
-----------

[](#quick-start)

```
use PhpOpcua\Client\ClientBuilder;
use PhpOpcua\Nodeset\Robotics\RoboticsRegistrar;
use PhpOpcua\Nodeset\Robotics\RoboticsNodeIds;
use PhpOpcua\Nodeset\Robotics\Enums\OperationalModeEnumeration;

$client = ClientBuilder::create()
    ->loadGeneratedTypes(new RoboticsRegistrar())  // loads DI + IA dependencies automatically
    ->connect('opc.tcp://192.168.1.100:4840');

// Enum values are auto-cast to PHP BackedEnum
$mode = $client->read(RoboticsNodeIds::OperationalMode)->getValue();
// OperationalModeEnumeration::MANUAL_REDUCED_SPEED (not int 1)

if ($mode === OperationalModeEnumeration::MANUAL_HIGH_SPEED) {
    echo "Robot in manual high speed mode\n";
}
```

What's Generated
----------------

[](#whats-generated)

Each companion specification produces up to 5 types of PHP files:

### NodeId Constants

[](#nodeid-constants)

String constants for every node in the specification — ready for `read()`, `write()`, `browse()`:

```
use PhpOpcua\Nodeset\DI\DINodeIds;

$value = $client->read(DINodeIds::DeviceType)->getValue();
```

### PHP Enums

[](#php-enums)

`BackedEnum` classes for OPC UA enumeration types:

```
use PhpOpcua\Nodeset\Robotics\Enums\MotionDeviceCategoryEnumeration;

$category = MotionDeviceCategoryEnumeration::ARTICULATED_ROBOT; // int 1
```

When loaded via `loadGeneratedTypes()`, reading an enum node returns the PHP enum directly instead of a raw `int`.

### Typed DTOs

[](#typed-dtos)

Readonly classes with typed properties for structured data types:

```
$data = $client->read(DINodeIds::SomeStructuredNode)->getValue();
$data->Manufacturer;   // string
$data->SerialNumber;   // string
$data->Status;         // PHP enum (auto-cast)
```

Enum fields within structures are typed with the generated enum class. Array fields use `array` type. Optional fields are nullable.

### Binary Codecs

[](#binary-codecs)

`ExtensionObjectCodec` implementations that decode/encode OPC UA binary data into the typed DTOs. Registered automatically via the Registrar.

### Registrar

[](#registrar)

Each specification has a Registrar implementing `GeneratedTypeRegistrar`:

```
use PhpOpcua\Nodeset\MachineTool\MachineToolRegistrar;

$client = ClientBuilder::create()
    ->loadGeneratedTypes(new MachineToolRegistrar())
    ->connect('opc.tcp://192.168.1.100:4840');
```

Automatic Dependency Resolution
-------------------------------

[](#automatic-dependency-resolution)

OPC UA companion specifications often depend on each other. When you load a Registrar, its dependencies are loaded automatically:

```
// Loading MachineTool automatically loads: Machinery, DI, IA
$client = ClientBuilder::create()
    ->loadGeneratedTypes(new MachineToolRegistrar())
    ->connect('opc.tcp://192.168.1.100:4840');
```

To load only the specification itself without dependencies:

```
$client = ClientBuilder::create()
    ->loadGeneratedTypes(new MachineToolRegistrar(only: true))
    ->connect('opc.tcp://192.168.1.100:4840');
```

Loading Multiple Specifications
-------------------------------

[](#loading-multiple-specifications)

Stack multiple registrars on the builder — duplicates are handled gracefully:

```
$client = ClientBuilder::create()
    ->loadGeneratedTypes(new DIRegistrar())
    ->loadGeneratedTypes(new RoboticsRegistrar())
    ->loadGeneratedTypes(new MachineToolRegistrar())
    ->connect('opc.tcp://192.168.1.100:4840');
```

Backward Compatibility
----------------------

[](#backward-compatibility)

Loading generated types is completely opt-in. Without `loadGeneratedTypes()`, everything works exactly as before — raw `int` values, array-based structures, no type wrapping.

Available Specifications
------------------------

[](#available-specifications)

SpecificationNamespaceEnumsTypesCodecsADI (Analytical Devices)`PhpOpcua\Nodeset\ADI`3——AMB (Asset Management)`PhpOpcua\Nodeset\AMB`122AML (Automation ML)`PhpOpcua\Nodeset\AML`———AutoID`PhpOpcua\Nodeset\AutoID`61919BACnet`PhpOpcua\Nodeset\BACnet`364444CAS (Compressed Air Systems)`PhpOpcua\Nodeset\CAS`2311CNC`PhpOpcua\Nodeset\CNC`611Commercial Kitchen Equipment`PhpOpcua\Nodeset\CommercialKitchenEquipment`24——Cranes &amp; Hoists`PhpOpcua\Nodeset\CranesHoists`4——CSPPlusForMachine`PhpOpcua\Nodeset\CSPPlusForMachine`———Cutting Tool`PhpOpcua\Nodeset\CuttingTool`—11DEXPI (Process Industry)`PhpOpcua\Nodeset\DEXPI`29——DI (Device Integration)`PhpOpcua\Nodeset\DI`81111ECM (Energy Consumption)`PhpOpcua\Nodeset\ECM`155FDI (Field Device Integration)`PhpOpcua\Nodeset\FDI`366FDT (Field Device Tool)`PhpOpcua\Nodeset\FDT`1133GDS (Global Discovery)`PhpOpcua\Nodeset\GDS`—11GPOS (Global Positioning)`PhpOpcua\Nodeset\GPOS`—44I4AAS (Industry 4.0 Asset Admin Shell)`PhpOpcua\Nodeset\I4AAS`1011IA (Industrial Automation)`PhpOpcua\Nodeset\IA`411IOLink`PhpOpcua\Nodeset\IOLink`1——IREDES (Mining)`PhpOpcua\Nodeset\IREDES`522ISA-95`PhpOpcua\Nodeset\ISA95`144LADS (Laboratory Devices)`PhpOpcua\Nodeset\LADS`122Laser Systems`PhpOpcua\Nodeset\LaserSystems`———Machinery`PhpOpcua\Nodeset\Machinery`———MachineTool`PhpOpcua\Nodeset\MachineTool`10——MachineVision`PhpOpcua\Nodeset\MachineVision`21414MDIS (Marine &amp; Subsea)`PhpOpcua\Nodeset\MDIS`1211Metal Forming`PhpOpcua\Nodeset\MetalForming`—22MTConnect`PhpOpcua\Nodeset\MTConnect`2533Onboarding`PhpOpcua\Nodeset\Onboarding`—66PackML (Packaging)`PhpOpcua\Nodeset\PackML`166PADIM (Process Automation)`PhpOpcua\Nodeset\PADIM`311PAEFS`PhpOpcua\Nodeset\PAEFS`4——PNEM (PROFINET Energy)`PhpOpcua\Nodeset\PNEM`455POWERLINK`PhpOpcua\Nodeset\POWERLINK`433Powertrain`PhpOpcua\Nodeset\Powertrain`———PROFINET`PhpOpcua\Nodeset\PROFINET`1822Pumps`PhpOpcua\Nodeset\Pumps`1811Robotics`PhpOpcua\Nodeset\Robotics`4——RSL (Result Standard Library)`PhpOpcua\Nodeset\RSL`———Safety`PhpOpcua\Nodeset\Safety`233Scales`PhpOpcua\Nodeset\Scales`655Scheduler`PhpOpcua\Nodeset\Scheduler`31111Sercos`PhpOpcua\Nodeset\Sercos`———Shotblasting`PhpOpcua\Nodeset\Shotblasting`———TMC (Tobacco Machinery)`PhpOpcua\Nodeset\TMC`112020Weihenstephan (Beverage)`PhpOpcua\Nodeset\Weihenstephan`2——Woodworking`PhpOpcua\Nodeset\Woodworking`322WoT (Web of Things)`PhpOpcua\Nodeset\WoT`———**Totals:** 338 enums, 191 typed DTOs, 191 codecs, 51 registrars, 51 NodeId constant classes.

Regenerating
------------

[](#regenerating)

To regenerate from the latest UA-Nodeset sources:

```
php ./generate.php
```

The script clones the [OPC Foundation UA-Nodeset](https://github.com/OPCFoundation/UA-Nodeset) repository (or uses a local copy if already present), generates PHP classes for each specification using [`opcua-cli generate:nodeset`](https://github.com/php-opcua/opcua-cli), and cleans up invalid dependency references.

Pass a custom path to use an existing clone:

```
php ./generate.php /path/to/UA-Nodeset
```

Ecosystem
---------

[](#ecosystem)

PackageDescription[opcua-client](https://github.com/php-opcua/opcua-client)Pure PHP OPC UA client — binary protocol, 10 security policies (RSA + ECC), browse/read/write/subscribe/history[opcua-cli](https://github.com/php-opcua/opcua-cli)CLI tool — browse, read, write, watch, discover endpoints, manage certificates, generate code from NodeSet2.xml[opcua-client-nodeset](https://github.com/php-opcua/opcua-client-nodeset)Pre-generated PHP types for 51 OPC Foundation companion specifications (this package)[opcua-session-manager](https://github.com/php-opcua/opcua-session-manager)Daemon-based session persistence across PHP requests[laravel-opcua](https://github.com/php-opcua/laravel-opcua)Laravel integration — service provider, facade, config[uanetstandard-test-suite](https://github.com/php-opcua/uanetstandard-test-suite)Docker-based OPC UA test servers (UA-.NETStandard) for integration testingLicense
-------

[](#license)

This package is licensed under the [MIT License](LICENSE).

The original NodeSet2.xml files are provided by the OPC Foundation under their license — see [LICENSE.OPC-Foundation](LICENSE.OPC-Foundation).

Links
-----

[](#links)

- [opcua-client](https://github.com/php-opcua/opcua-client) — the OPC UA client library
- [opcua-cli](https://github.com/php-opcua/opcua-cli) — CLI tool with `generate:nodeset` command
- [OPC Foundation UA-Nodeset](https://github.com/OPCFoundation/UA-Nodeset) — source companion specifications
- [Code Generation Guide](https://github.com/php-opcua/opcua-cli/blob/master/docs/code-generation/generate-from-xml.md) — how the generation works

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance94

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Total

5

Last Release

28d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb72ba5d2c05eec08d9556c0007f17a7d657d5187de1025a4a0525ace4ac8000?d=identicon)[GianfriAur](/maintainers/GianfriAur)

---

Top Contributors

[![GianfriAur](https://avatars.githubusercontent.com/u/16904504?v=4)](https://github.com/GianfriAur "GianfriAur (8 commits)")

---

Tags

automationindustrialindustry-4-0iotnodesetnodeset2opc-uaphpplcautomationiotplcopcuaopc-uaindustrialscadaIIoTindustry-4.0php-opcuanodeset2nodesetcompanion-specification

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/php-opcua-opcua-client-nodeset/health.svg)

```
[![Health](https://phpackages.com/badges/php-opcua-opcua-client-nodeset/health.svg)](https://phpackages.com/packages/php-opcua-opcua-client-nodeset)
```

###  Alternatives

[jakubkulhan/chrome-devtools-protocol

Chrome Devtools Protocol client for PHP

185970.8k3](/packages/jakubkulhan-chrome-devtools-protocol)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

318117.1k1](/packages/cognesy-instructor-php)[sulu/automation-bundle

The Sulu Bundle which provides automation functionality

18297.0k11](/packages/sulu-automation-bundle)[monzer/filament-workflows

Automation made easy!

6512.1k](/packages/monzer-filament-workflows)[in2code/lux

Living User eXperience - LUX - the Marketing Automation tool for TYPO3.

2156.6k1](/packages/in2code-lux)[nigelcunningham/puphpeteer

A Puppeteer bridge for PHP, supporting the entire API.

2222.1k](/packages/nigelcunningham-puphpeteer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
