A Companion Specification is the specification of a domain-specific Information Model based on OPC UA. Typically, a Companion Specification is defined in a working group of the OPC Foundation or a joint working group of the OPC Foundation with other organizations like the VDMA. Potentially, a Companion Specification can be defined without explicit cooperation with the OPC Foundation, for example by a standardization organization or a company.
A Companion Specification consists of a document defining the Information Model and a UaNodeSet as a machine-readable file used by implementations of the Companion Specification.
Although not required, it is recommended to create a Companion Specification in cooperation with the OPC Foundation.
How to create such a Working Group is described here:
https://opcfoundation.org/joint-working-groups/
This web page contains links to
- A template for a charter of a working group
- A template for a MOCA (multi organizations cooperation agreement)
- A list of existing joint working groups
There are tools helping in the creation of a Companion Specification, which can be found here:
https://opcfoundation.org/Guidelines-And-Templates/
The web page contains links to:
- Word template for Companion Specifications
- Guideline document for Companion Specifications, including a section on certification and how to create test cases
- Visio-Shapes to create standardized figures of OPC UA Information Models
Those documents help creating the document defining the Information Model. For joint working groups, the template needs to be followed since the document is also published in the Online Reference (https://reference.opcfoundation.org/) and therefore needs to be processed and converted into a web page.
There are various tools available to create a UaNodeSet which can be found in the OPC Foundation Marketplace (https://opcfoundation.org/products/ - filter for tools / information modelling).
In order to validate that the UaNodeSet and the specification document are in sync, the OPC Foundation provides the NodeSet-Validator (https://apps.opcfoundation.org/NodeSetValidator). This validator needs to be passed before a Companion Specification is published by the OPC Foundation.
Note that the word template is not bound to working groups of the OPC Foundation, everybody creating an OPC UA based Information Model can use this template as a base to document their information model.
Note that the OPC UA specification has changed how it defines structured and enumeration data types. Instead of a DataTypeDictionary (see OPC 10000-5) having additional Nodes in the AddressSpace, the attribute DataTypeDefinition (see OPC 10000-3) is used. UaNodeSets of a Companion Specification should still contain the DataTypeDictionary Nodes in order to have the NodeIds standardized, in case applications still want to support the old mechanism.
The OPC Foundation provides test tools and certification for its specifications, and it is highly recommended that Companion Specifications also provide test cases. In addition to certification, testing is crucial for interoperability of OPC UA products. Each product designed to work with a Companion Specification needs to make sure the Companion Specification model is implemented correctly. Using the test tool and test cases provided by the OPC Foundation, automated testing can be carried out without additional need to create a testing environment. Testing and certification are based on Profiles and Facets. With actual test cases defined for each ConformanceUnit. Profiles and Facets can be nested and are composed of ConformanceUnits, a ConformanceUnit is the smallest testable item. The minimum test cases are checking the simple adherence to the defined information model (i.e., the instance correctly reflect the types it is based on). For Companion Specifications that describe expected functionality, it is important that test cases be created to test the defined functionality. For example, when a Method is defined in an information model, there is some expected behaviour associated with the Method and test cases are strongly recommended to be defined for this behaviour.
The OPC Foundation Certification working group (CMP) provides assistance to Companion Specification authors in defining and developing testing. The CMP group can provide an Excel Template that is filled out with test case definition. The CMP group can also provide examples of test cases defined for other companion standards.
It is highly recommended that development of test cases be started as soon as the information model starts to become stable. It is not uncommon for the process of defining test cases to identify modelling issues, such as minor issues just requiring clarifications in the text, but there may also be inconsistent definitions and unintended usage.
The CMP group can be reached at Compliance@opcfoundation.org