Data model
ISA-95 hierarchy and placement
How Factory+ records where each device sits in the ISA-95 equipment hierarchy, and how that position decides UNS topics and hierarchy-scoped grants.
Factory+ places every device at one point in the ISA-95 equipment hierarchy.
The hierarchy runs Enterprise, Site, Area, Work Center and Work Unit. A device’s place in it lets people and systems find data by where a machine is, and not only by how it is wired. The device’s topics on the Unified Namespace follow from that place. It also decides where the device appears in i3X and which grants on a part of the plant cover it.
The hierarchy is not typed onto each device as free text. Free text lets the same site be spelled several ways, and one typo moves a machine to a different place on the UNS. Instead, the hierarchy is a controlled vocabulary of named nodes in the configuration store. Each device’s position is recorded once, as a reference to one node. Renaming or moving a node moves every device under it, and no device can name a place that does not exist.
The five levels
Factory+ uses five levels from the ISA-95 (IEC 62264) equipment hierarchy. The table lists them from the top down. Each level is a class in the configuration store, and each vocabulary node is a member of exactly one of these classes.
| Level | Typical meaning | Class UUID |
|---|---|---|
| Enterprise | The organisation that owns the sites | 2980293e-4a82-49a3-b121-9a8fa109d0a8 |
| Site | A physical location, such as a factory | 70a948a7-7d99-400c-896a-ae63ab4362e0 |
| Area | A part of a site, such as a production hall | d0ac7371-41d6-45b2-8a42-781f8d4c8d54 |
| Work Center | A group of equipment in an area, such as a cell or a line | b0633e7c-e0c1-4350-9f86-72b83e3e9cb0 |
| Work Unit | One piece of equipment in a work center | 00074ce8-2142-40a6-aff3-1057a83ddad2 |
The level names are also the metric names in the Hierarchy-v1 schema. They are written exactly as in the table. Work Center uses the US spelling, and both Work Center and Work Unit contain a space.
The five level classes are members of the ISA-95 hierarchy level class. That class is a class of classes, which is a rank-2 class in the object model. A service can list the five levels by listing its members.
3866b165-6b31-46e3-a801-cb367e04e726The vocabulary
The vocabulary is the set of named places where a device can be placed. Each place is a node, which is a configuration store object that is a member of one level class. A node’s name is the name in its General Information config, and its position in the tree comes from the ISA-95 vocabulary app.
11096075-acc6-4eae-b682-9b27d776384dA vocabulary config has the shape below. Neither key is required, and no other keys are allowed.
{
"aliases": ["Plant One", "P1"],
"children": [
"6f1c2a8e-3d5b-4c71-9a0e-2b7d4f8c1e93",
"a24e7b91-0c6d-4f3a-8e25-91d3c6b0f478"
]
}
| Key | Type | Meaning |
|---|---|---|
aliases | Array of strings | Other names that mean this node. A free-text name that matches an alias resolves to the node. Such a name might be typed into an import file or published by an older device. |
children | Array of UUIDs | The nodes directly below this node, one level down. |
The children lists are the only record of the tree, and a node’s parent is the node whose children list contains it. The tree MUST follow these rules for every node a device is placed at or under.
- Each node is a member of exactly one level class.
- Each node below Enterprise has exactly one parent, and that parent is exactly one level up. A Work Center’s parent is an Area, never a Site.
- An Enterprise node has no parent.
If a node’s chain up to its Enterprise breaks one of these rules, the node cannot be used for a placement. The cases are listed under Deriving a device’s levels.
Resolving a name to a node
A service sometimes needs to turn a list of level names, such as Acme, Plant 1, Machining, into vocabulary nodes. The names are resolved one level at a time.
- The first name is matched against the Enterprise nodes.
- Each later name is matched against the children of the node matched one level above, and only against nodes of the next level.
- A name matches a node when it equals the node’s name or one of its aliases, after both are trimmed of white space and compared without regard to case.
- Matching stops at the first name that matches nothing. The result is the chain of nodes matched so far.
Aliases count as names, so acme, ACME and an alias such as Acme Ltd all resolve to the same Enterprise node.
The placement
A placement records the vocabulary node a device sits at. Each device has at most one placement, held as a config on the device object in the ISA-95 placement app.
f9345c57-14e3-4027-b76d-2b0b67eb8fed{
"node": "c37a9e04-5b18-4d6f-9e21-7f0a3b8d5c62",
"instances": {
"Device_Information/ISA95_Hierarchy": "e81b4c2d-7a90-4f35-b6e3-0d9c2f71a5b8"
}
}
| Key | Required | Meaning |
|---|---|---|
node | Yes | The UUID of the vocabulary node the device sits at. The node can be at any level from Enterprise down to Work Unit, and it is the deepest level that applies to the device. |
instances | No | Instance_UUID values to reuse, keyed by object path in the device’s birth. A device that already published a hierarchy keeps its old Instance_UUID this way, and data recorded under that UUID stays linked to the device. |
No other keys are allowed. The placement does not store the levels above its node, because they come from the vocabulary.
Deriving a device’s levels
A device’s levels are the names of the nodes from its Enterprise down to its placed node. A service works them out in these steps.
- Start at the placed node.
- Find the node’s parent, which is the node whose vocabulary
childrenlist contains it. - Repeat until an Enterprise is reached.
- Take the name of each node on the way, Enterprise first, trimmed of white space.
If any of these hold, the placement does not render and the device has no levels.
- the device has no placement
- a node on the chain is not a vocabulary node, or is a member of no level class or of more than one
- a node on the chain has more than one parent, or its parent is not exactly one level up
- the chain does not end at an Enterprise, or the Enterprise has a parent
- a level name is empty, contains
/,+,#or NUL (U+0000), or is the wordEdge, because none of these can go in a UNS topic
A configuration store MAY refuse to store a placement that does not render. A service MUST NOT give a device levels from a placement that does not render, and it MUST check this each time it derives the levels, because a later change to the vocabulary can break a placement that was valid when it was stored.
Because the levels are derived each time, renaming a node changes the levels of every device placed at or under it. A node is moved by taking it out of one parent’s children and adding it to another’s, and that moves every device under it.
Worked example
In this vocabulary, each row is one node with its General Information name and its level.
| Node | Name | Level | children |
|---|---|---|---|
| E1 | Acme | Enterprise | S1 |
| S1 | Plant 1 | Site | A1 |
| A1 | Machining | Area | W1 |
| W1 | Cell 4 | Work Center | (none) |
A device placed with {"node": "<A1>"} has the levels Acme, Plant 1, Machining, and its UNS topics start UNS/v1/Acme/Plant 1/Machining/Edge/. A device placed at W1 has the four levels down to Cell 4.
If the Site is renamed from Plant 1 to North Plant, both devices move to UNS/v1/Acme/North Plant/... and their placements do not change. If A1 is also listed in the children of a second Site, A1 has two parents and neither device renders until one of the two links is removed.
From placement to birth certificate
Consumers of Sparkplug and the UNS see a device’s levels in its birth certificate, so the placement has to reach the device. A device publishes its levels as a Hierarchy-v1 object at exactly Device_Information/ISA95_Hierarchy in its birth.
| Metric | Sparkplug type | Value |
|---|---|---|
Device_Information/ISA95_Hierarchy/Schema_UUID | UUID | 84ac3397-f3a2-440a-99e5-5bb9f6a75091, the Hierarchy-v1 schema |
Device_Information/ISA95_Hierarchy/Instance_UUID | UUID | The object’s Instance_UUID. If the placement’s instances lists this path, the value comes from there. Otherwise it is a UUID that stays the same for this device and path. |
Device_Information/ISA95_Hierarchy/Enterprise | String | The Enterprise name |
Device_Information/ISA95_Hierarchy/Site | String | The Site name, when the device is placed at Site level or below |
Device_Information/ISA95_Hierarchy/Area | String | The Area name, when placed at Area level or below |
Device_Information/ISA95_Hierarchy/Work Center | String | The Work Center name, when placed at Work Center level or below |
Device_Information/ISA95_Hierarchy/Work Unit | String | The Work Unit name, when placed at a Work Unit |
The device publishes one metric per level down to its placed node and none below it. The values are the derived levels and match the vocabulary exactly. A Hierarchy-v1 object elsewhere in the birth has no meaning for the UNS, for i3X or for grants. Device_Information/Base_Device_Information/ISA95_Hierarchy is one such path.
The implementation decides how the placement gets into the device’s configuration and when the device births again after the placement or the vocabulary changes. If the placement or the vocabulary above it changes, the implementation SHOULD bring the birth into line with the placement.
The UNS rule
The UNS rule decides from a device’s birth certificate whether the device is on the UNS. The UNS ingester, i3X and any other service that makes this decision MUST use the same rule, so that they all list the same devices at the same places.
- The birth MUST be a Factory+ payload. A Factory+ payload has the payload
uuid11ad7b32-1d32-4c4a-b0c9-fa049208939a. - The metric
Device_Information/ISA95_Hierarchy/Schema_UUIDMUST hold the Hierarchy-v1 UUID,84ac3397-f3a2-440a-99e5-5bb9f6a75091. A hierarchy at any other path does not count. - The levels are the values of the
Enterprise,Site,Area,Work CenterandWork Unitmetrics under that path, in that order. A missing or null metric counts as empty. - Each value is trimmed of leading and trailing white space.
- Reading stops at the first empty level. Values below it are never read.
- The device is on the UNS only when its Enterprise is not empty and no level that was read contains
/,+,#or NUL, or is the wordEdge. Otherwise the device is left off the UNS altogether and is not published at a shorter path.
The levels the rule gives are the levels in the device’s UNS topics. A service that reads placements directly instead of births, such as an i3X server, gets the same levels, because the birth carries the derived levels of the placement.
Grants on a hierarchy node
A grant can name a vocabulary node as its target. A grant on a node covers every device placed at that node or at any node below it, including devices placed there after the grant was made. One grant on a Site can give access to every machine on that site. When a device is moved, the grants that cover it change with it.
The Auth service stores these grants like any other and does not expand them. Each service that honours a permission on a node works out the devices under the node itself, from the placements and the vocabulary. A device is covered when the grant’s target is its placed node or any node on the chain above it. These well-known permissions take a vocabulary node as a target.
| Permission | UUID | Service |
|---|---|---|
| Read i3X objects | d24495fd-72a3-41cd-8b9f-f4ebabdade44 | i3X. It also lets a caller browse the levels above a covered device. |
| Build datasets from device | 788b049c-2831-11f1-99fd-2b0bf86d6f77 | Data Access |
A device with no placement is covered only by grants on the device itself, on a class it belongs to, or on the wildcard. Authorisation describes how grants and their targets work in general.
Well-known UUIDs
| Name | Kind | UUID |
|---|---|---|
| ISA-95 hierarchy level | Class (rank 2) | 3866b165-6b31-46e3-a801-cb367e04e726 |
| ISA-95 Enterprise | Class | 2980293e-4a82-49a3-b121-9a8fa109d0a8 |
| ISA-95 Site | Class | 70a948a7-7d99-400c-896a-ae63ab4362e0 |
| ISA-95 Area | Class | d0ac7371-41d6-45b2-8a42-781f8d4c8d54 |
| ISA-95 Work Center | Class | b0633e7c-e0c1-4350-9f86-72b83e3e9cb0 |
| ISA-95 Work Unit | Class | 00074ce8-2142-40a6-aff3-1057a83ddad2 |
| ISA-95 vocabulary | Application | 11096075-acc6-4eae-b682-9b27d776384d |
| ISA-95 placement | Application | f9345c57-14e3-4027-b76d-2b0b67eb8fed |
| General Information | Application | 64a8bfa9-7772-45c4-9d1a-9e6290690957 |
| Hierarchy-v1 | Schema | 84ac3397-f3a2-440a-99e5-5bb9f6a75091 |