tia-devices-general
Scope
Device-level engineering — full C# Openness implementation.
When the roadmap routes here, the entire solution is C#.
Do not mix with Python wrapper calls.
Always load tia-csharp-common first (done by roadmap).
Reference files
Load ONLY the reference file(s) relevant to the task. Do not load all files at once.
| Reference file |
Load when the task involves |
references/device-enumeration.md |
Listing, finding, or iterating devices; device groups; ungrouped devices; navigating DeviceItems. |
references/device-creation.md |
Creating or deleting devices; understanding TypeIdentifier formats (OrderNumber, GSD, System). |
references/device-attributes.md |
Reading/writing basic device or device-item attributes; using GsdDevice service; managing Application IDs (CustomIdentityProvider). |
references/hardware-parameters.md |
Setting specific hardware parameters via SetAttribute (e.g., IO addresses, diagnostic settings, module-specific enums). |
references/software-container.md |
Accessing PlcSoftware or HmiTarget from a device; using the SoftwareContainer service. |
references/device-item-operations.md |
Plugging, moving, copying, or deleting device items/modules; changing device/module types; hardware catalog queries. |
references/device-item-interfaces.md |
NetworkInterface service; IOController/IOConnector attributes; hardware identifiers; managing addresses and channels. |
references/networks-and-connections.md |
Opening hardware/network editors; querying targets from a network perspective; address object attributes. |
For tasks spanning multiple areas, load all relevant reference files before generating code.
Execution pattern
- Access
Project.Devices composition (or DeviceGroups / UngroupedDevicesGroup)
- Resolve the exact existing object or exact
TypeIdentifier; never select the first catalog/device/device-item match
- Before create, plug, move, copy, change-type, attribute write, import, or delete, obtain explicit authorization for the exact project, object identity, and requested mutation
- Navigate the complete recursive
DeviceItem hierarchy as needed
- Access
SoftwareContainer via GetService<SoftwareContainer>() when PLC, classic HMI, or Unified HMI software is needed
- Put supported project mutations in
ExclusiveAccess plus a transaction and allow exceptions to roll it back (see tia-csharp-common)
- Use
ICompilable for hardware or software compile and inspect the full CompilerResult (see tia-project-general/references/compile.md)
- Do not save when selection is ambiguous, a service is unavailable, a mutation reports an error, or compile/consistency validation fails
1---2name: tia-devices-general3description: C# Openness implementation of device-level operations4license: MIT5---67# tia-devices-general89## Scope1011Device-level engineering — full C# Openness implementation.1213When the roadmap routes here, the entire solution is C#.14Do not mix with Python wrapper calls.15Always load `tia-csharp-common` first (done by roadmap).1617---1819## Reference files2021Load ONLY the reference file(s) relevant to the task. Do not load all files at once.2223| Reference file | Load when the task involves |24|---|---|25| `references/device-enumeration.md` | Listing, finding, or iterating devices; device groups; ungrouped devices; navigating DeviceItems. |26| `references/device-creation.md` | Creating or deleting devices; understanding TypeIdentifier formats (OrderNumber, GSD, System). |27| `references/device-attributes.md` | Reading/writing basic device or device-item attributes; using GsdDevice service; managing Application IDs (CustomIdentityProvider). |28| `references/hardware-parameters.md` | Setting specific hardware parameters via SetAttribute (e.g., IO addresses, diagnostic settings, module-specific enums). |29| `references/software-container.md` | Accessing PlcSoftware or HmiTarget from a device; using the SoftwareContainer service. |30| `references/device-item-operations.md` | Plugging, moving, copying, or deleting device items/modules; changing device/module types; hardware catalog queries. |31| `references/device-item-interfaces.md` | NetworkInterface service; IOController/IOConnector attributes; hardware identifiers; managing addresses and channels. |32| `references/networks-and-connections.md` | Opening hardware/network editors; querying targets from a network perspective; address object attributes. |3334For tasks spanning multiple areas, load all relevant reference files before generating code.3536---3738## Execution pattern39401. Access `Project.Devices` composition (or `DeviceGroups` / `UngroupedDevicesGroup`)412. Resolve the exact existing object or exact `TypeIdentifier`; never select the first catalog/device/device-item match423. Before create, plug, move, copy, change-type, attribute write, import, or delete, obtain explicit authorization for the exact project, object identity, and requested mutation434. Navigate the complete recursive `DeviceItem` hierarchy as needed445. Access `SoftwareContainer` via `GetService<SoftwareContainer>()` when PLC, classic HMI, or Unified HMI software is needed456. Put supported project mutations in `ExclusiveAccess` plus a transaction and allow exceptions to roll it back (see `tia-csharp-common`)467. Use `ICompilable` for hardware or software compile and inspect the full `CompilerResult` (see `tia-project-general/references/compile.md`)478. Do not save when selection is ambiguous, a service is unavailable, a mutation reports an error, or compile/consistency validation fails