opcua-client-nodeset · master
Docs · Spec · DI

DI — Device Integration

Device Integration — the OPC UA root spec for any "device". Identification, parameters, software metadata. Loaded transitively by almost every other operational spec.

The foundational OPC UA companion specification for industrial devices. Defines DeviceType, Identification, ParameterSet, MethodSet, FunctionalGroupType, and the related cross-cutting concerns that every other spec extends.

What's in the package

Artefact Count
Enums 8
DTOs 11
Codecs 11
Registrars 2 (DiRegistrar, DiPackageMetadataRegistrar)

DI ships two registrars — Di for the core spec and DiPackageMetadata for the OPC Foundation's package-metadata extension. Most applications only need DiRegistrar.

Loading

php examples/di/load.php
use PhpOpcua\Client\ClientBuilder;
use PhpOpcua\Nodeset\DI\DiRegistrar;

$client = ClientBuilder::create()
    ->loadGeneratedTypes(new DiRegistrar())
    ->connect('opc.tcp://device.local:4840');

You rarely load DI directly — almost every other registrar pulls it in transitively.

Direct dependencies

None — DI is a root spec.

Notable types

The 11 DTOs (all under src/DI/Types/) cover packaging, compatibility, file transfer, and parameter-result shapes used across device specs:

  • PackageMetadata, PackageTarget, UpdateTarget, FileDescriptor — software-update packaging
  • CompatibilityOption, CompatibilityRequirement, Assignment, FxPathElement — capability / topology metadata
  • ParameterResultDataType, TransferResultDataDataType, TransferResultErrorDataType — typed result envelopes

There is no IdentificationData DTO. DI exposes identification via leaf nodes (Manufacturer, Model, SerialNumber, HardwareRevision, SoftwareRevision, …) whose values are built-in scalars / LocalizedText.

Notable enums

All 8 live in src/DI/Enums/:

  • DeviceHealthEnumeration — health rollup: NORMAL (0), FAILURE (1), CHECK_FUNCTION (2), OFF_SPEC (3), MAINTENANCE_REQUIRED (4)
  • SoftwareClassFirmware, Application, Configuration, Solution
  • PackageType, UpdateBehavior, SoftwareVersionFileType, FileType — package / software metadata taxonomy
  • ComparisonOperation, LocationIndicationType — auxiliary classifiers

Loaded by

DI is depended on by 30+ specs (see Specifications · root specs). The cascade ensures every device-oriented integration carries DI's codecs without explicit wiring.

Naming

The registrar's class name is DiRegistrar (lowercase i) — not DIRegistrar. Generated from the spec's URI casing.