Implement LmxOpcUa server — all 6 phases complete
Full OPC UA server on .NET Framework 4.8 (x86) exposing AVEVA System Platform Galaxy tags via MXAccess. Mirrors Galaxy object hierarchy as OPC UA address space, translating contained-name browse paths to tag-name runtime references. Components implemented: - Configuration: AppConfiguration with 4 sections, validator - Domain: ConnectionState, Quality, Vtq, MxDataTypeMapper, error codes - MxAccess: StaComThread, MxAccessClient (partial classes), MxProxyAdapter using strongly-typed ArchestrA.MxAccess COM interop - Galaxy Repository: SQL queries (hierarchy, attributes, change detection), ChangeDetectionService with auto-rebuild on deploy - OPC UA Server: LmxNodeManager (CustomNodeManager2), LmxOpcUaServer, OpcUaServerHost with programmatic config, SecurityPolicy None - Status Dashboard: HTTP server with HTML/JSON/health endpoints - Integration: Full 14-step startup, graceful shutdown, component wiring 175 tests (174 unit + 1 integration), all passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
78
gr/layout.md
Normal file
78
gr/layout.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# Galaxy Repository Object Layout
|
||||
|
||||
## Object Hierarchy
|
||||
|
||||
Galaxy objects are organized in a tree hierarchy. The root is the Galaxy itself (ZB), with objects nested under areas and other containers:
|
||||
|
||||
```
|
||||
ZB (Galaxy)
|
||||
├── UnassignedArea
|
||||
├── DEV
|
||||
│ ├── DevAppEngine
|
||||
│ ├── DevPlatform
|
||||
│ └── TestArea [TestArea]
|
||||
│ └── DevTestObject
|
||||
│ ├── TestChildObject [TestChildObject]
|
||||
│ ├── TestMachine_001
|
||||
│ ├── DelmiaReceiver_001 [DelmiaReceiver]
|
||||
│ └── MESReceiver_001 [MESReceiver]
|
||||
```
|
||||
|
||||
Objects have a **tag_name** (instance name, e.g. `TestMachine_001`) and optionally a **contained_name** shown in brackets (the template/type, e.g. `[DelmiaReceiver]`). Parent-child containment defines the deployment and organizational structure.
|
||||
|
||||
## Contained Name vs Tag Name
|
||||
|
||||
Each child object has a **contained_name** (its local name within its parent) and a globally unique **tag_name**. When browsing the hierarchy, we want to see the contained name path; when referencing tags at runtime, the tag_name is used.
|
||||
|
||||
| Hierarchy Path (contained names) | Tag Reference (tag_name) |
|
||||
|----------------------------------|--------------------------|
|
||||
| `TestMachine_001.DelmiaReceiver.DownloadPath` | `DelmiaReceiver_001.DownloadPath` |
|
||||
| `TestMachine_001.MESReceiver.MoveInBatchID` | `MESReceiver_001.MoveInBatchID` |
|
||||
|
||||
The contained_name (`DelmiaReceiver`) is the human-readable name scoped to its parent, while the tag_name (`DelmiaReceiver_001`) is the system-assigned globally unique name. Translation between the two is needed when going from a hierarchy browse to tag-level data access.
|
||||
|
||||
## Target OPC UA Server Structure
|
||||
|
||||
The OPC UA server should mirror the Galaxy hierarchy using contained names for folder/container structure. Attributes appear as tags within their object's container, and child objects appear as sub-containers. When an OPC UA client reads/writes a tag value, the contained name path is translated to the tag_name reference.
|
||||
|
||||
```
|
||||
ZB/
|
||||
└── DEV/
|
||||
└── TestArea/
|
||||
└── TestMachine_001/
|
||||
├── MachineID → reads/writes TestMachine_001.MachineID
|
||||
├── MachineCode → reads/writes TestMachine_001.MachineCode
|
||||
├── DelmiaReceiver/
|
||||
│ ├── DownloadPath → reads/writes DelmiaReceiver_001.DownloadPath
|
||||
│ ├── JobStepNumber → reads/writes DelmiaReceiver_001.JobStepNumber
|
||||
│ ├── PartNumber → reads/writes DelmiaReceiver_001.PartNumber
|
||||
│ └── RecipeDownloadFlag → reads/writes DelmiaReceiver_001.RecipeDownloadFlag
|
||||
└── MESReceiver/
|
||||
├── MoveInBatchID → reads/writes MESReceiver_001.MoveInBatchID
|
||||
├── MoveInCompleteFlag → reads/writes MESReceiver_001.MoveInCompleteFlag
|
||||
├── MoveInFlag → reads/writes MESReceiver_001.MoveInFlag
|
||||
└── ...
|
||||
```
|
||||
|
||||
Folders (ZB, DEV, TestArea) are structural — they organize the browse tree but don't have tags. Containers (TestMachine_001, DelmiaReceiver, MESReceiver) hold both attributes (tags) and potentially child containers.
|
||||
|
||||
## Tag (Attribute) View
|
||||
|
||||
Tags represent the data attributes exposed by objects. They are referenced in a flattened dot-notation format using the tag_name:
|
||||
|
||||
```
|
||||
<tag_name>.<AttributeName>
|
||||
```
|
||||
|
||||
Examples:
|
||||
- `TestMachine_001.MachineID`
|
||||
- `TestMachine_001.MachineCode`
|
||||
- `MESReceiver_001.MoveInBatchID`
|
||||
- `MESReceiver_001.MoveInCompleteFlag`
|
||||
- `MESReceiver_001.MoveInJobSequenceNumber`
|
||||
- `DelmiaReceiver_001.DownloadPath`
|
||||
- `DelmiaReceiver_001.JobStepNumber`
|
||||
- `DelmiaReceiver_001.PartNumber`
|
||||
- `DelmiaReceiver_001.RecipeDownloadFlag`
|
||||
|
||||
This flat view collapses the hierarchy — all attributes across all objects appear as `tag_name.AttributeName` regardless of where the object sits in the containment tree.
|
||||
Reference in New Issue
Block a user