-
Notifications
You must be signed in to change notification settings - Fork 62
feat: OPC-UA Server Configuration #546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d2a9c87
8fd81ec
088765d
ec1ec87
02e4149
ee8a5a7
c2acc65
c9d270a
9ee6a14
30d325c
0199f69
44b44e7
76d28b4
491e46e
8f375ad
efb2cd4
9a4e0ba
9b41d73
d498575
db54841
cbdbaca
be436ba
6c08ce6
3a98497
bb2c2f1
b43a0bd
6bb53a0
d678dd6
c830cb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # OPC-UA Server Configuration | ||
|
|
||
| This folder contains design documentation for the OPC-UA server configuration feature in OpenPLC Editor. | ||
|
|
||
| ## Overview | ||
|
|
||
| The OPC-UA server configuration allows users to configure an OPC-UA server that runs on the OpenPLC Runtime. This feature enables industrial clients to access PLC variables through the OPC-UA protocol, which is significantly more complex than the existing Modbus and S7Comm protocols. | ||
|
|
||
| ## Key Features | ||
|
|
||
| - **Full Variable Access**: Unlike Modbus/S7Comm which only access I/O image tables, OPC-UA can expose any PLC program variable | ||
| - **Security Profiles**: Multiple security configurations (None, Sign, SignAndEncrypt) | ||
| - **Certificate Management**: Server and client certificate handling | ||
| - **User Authentication**: Password-based and certificate-based authentication | ||
| - **Role-Based Access Control**: Viewer, Operator, and Engineer roles with per-variable permissions | ||
| - **Complex Data Types**: Support for structures, arrays, and nested function blocks | ||
|
|
||
| ## Documentation Structure | ||
|
|
||
| 1. **[Design Overview](./01-design-overview.md)** - High-level architecture, configuration flow, and integration points | ||
| 2. **[UI Screen Specifications](./02-ui-screen-specifications.md)** - Detailed UI designs for each configuration tab | ||
| 3. **[JSON Configuration Mapping](./03-json-configuration-mapping.md)** - How editor configuration maps to runtime JSON format | ||
| 4. **[Implementation Phases](./04-implementation-phases.md)** - Phased implementation plan with deliverables | ||
|
|
||
| ## Related Documentation | ||
|
|
||
| - OpenPLC Runtime OPC-UA Plugin: See the `RTOP-100-OPC-UA` branch of openplc-runtime | ||
| - Existing protocol implementations: Modbus and S7Comm configurations in openplc-editor | ||
|
|
||
| ## Key Differences from Modbus/S7Comm | ||
|
|
||
| | Aspect | Modbus/S7Comm | OPC-UA | | ||
| |--------|---------------|--------| | ||
| | Variable Access | I/O Image Tables only | Any PLC variable | | ||
| | Security | Basic or none | Multiple security profiles | | ||
| | Authentication | None | Anonymous, Username/Password, Certificate | | ||
| | Access Control | None | Role-based per-variable permissions | | ||
| | Data Types | Simple registers/coils | Variables, Structures, Arrays | | ||
| | Configuration Complexity | Low-Medium | High | |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { IconStyles } from '@process:renderer/data/constants/icon-styles' | ||
| import { cn } from '@utils/cn' | ||
|
|
||
| import { IIconProps } from '../Types/iconTypes' | ||
|
|
||
| export default function ViewHiddenIcon(props: IIconProps) { | ||
| const { stroke, className, size = 'sm', ...res } = props | ||
| const sizeClasses = IconStyles.sizeClasses.small[size] | ||
|
|
||
| return ( | ||
| <svg | ||
| viewBox='0 0 15 12' | ||
| stroke={stroke} | ||
| xmlns='http://www.w3.org/2000/svg' | ||
| className={cn(`${sizeClasses}`, className)} | ||
| {...res} | ||
| > | ||
| {/* Eye shape */} | ||
| <path | ||
| fillRule='evenodd' | ||
| clipRule='evenodd' | ||
| d='M7.79818 10.60216C10.7081 10.66758 13.2826 8.56807 14.5769 7.28818C15.1342 6.73709 15.1529 5.9064 14.6209 5.33081C13.3855 3.99405 10.9079 1.780938 7.99799 1.715512C5.08809 1.650085 2.51353 3.7496 1.21925 5.02948C0.661948 5.58058 0.64327 6.41127 1.17524 6.98686C2.41069 8.32362 4.88828 10.53673 7.79818 10.60216ZM7.85812 7.93616C8.9024 7.95964 9.76684 7.18294 9.78891 6.20135C9.81098 5.21976 8.98232 4.40498 7.93804 4.3815C6.89377 4.35803 6.02932 5.13473 6.00725 6.11632C5.98518 7.09791 6.81384 7.91268 7.85812 7.93616Z' | ||
| fill={stroke || '#0464FB'} | ||
| /> | ||
| {/* Diagonal line through the eye */} | ||
| <line x1='2' y1='11' x2='13' y2='1' stroke={stroke || '#0464FB'} strokeWidth='1.5' strokeLinecap='round' /> | ||
| </svg> | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -362,7 +362,7 @@ const RemoteDeviceEditor = () => { | |||||
| setHost(remoteDevice.modbusTcpConfig.host) | ||||||
| setPort(remoteDevice.modbusTcpConfig.port.toString()) | ||||||
| setTimeoutMs(remoteDevice.modbusTcpConfig.timeout.toString()) | ||||||
| setSlaveId((remoteDevice.modbusTcpConfig.slaveId ?? 1).toString()) | ||||||
| setSlaveId(String(remoteDevice.modbusTcpConfig.slaveId ?? 1)) | ||||||
|
||||||
| setSlaveId(String(remoteDevice.modbusTcpConfig.slaveId ?? 1)) | |
| setSlaveId((remoteDevice.modbusTcpConfig.slaveId ?? 1).toString()) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| export { ModbusServerEditor } from './modbus-server' | ||
| export { OpcUaServerEditor } from './opcua-server' | ||
| export { S7CommServerEditor } from './s7comm-server' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functions
closeModalandsubmitAutocompletionare defined inside the component but not wrapped inuseCallback. The dependency array at line 124 includes these functions, which will cause theuseImperativeHandleto re-run on every render. Wrap these functions inuseCallbackwith proper dependencies.