如何批改设施接入的配置
1. 编辑edgedevice.yaml
文件
接入设施前,您须要对edgedevice.yaml
文件进行编辑。对于不同的协定,protocolSettings
可依据协定进行进一步配置,具体配置请返回Shifu API参考。
...connection: Ethernet address: 0.0.0.0:11112protocol: HTTP protocolSettings: OPCUASetting: ...
connection
:示意设施的网络连接形式。address
:示意设施的网络地址。protocol
:示意与设施进行交互的通信协议。protocolSettings
:示意对协定进行的下一步设置,对于不同的协定须要引入不同的Setting。
2. 创立 deviceshifu
批改完上述文件后即可创立deviceshifu,此时 deviceshifu 会尝试通过您所设置的配置与您的设施进行连贯。
3. 检测设施接入状态
如果您通过命令kubectl get pods -n deviceshifu
发现deviceshifu状态呈现Error
或者CrashLoopBackOff
,这意味着连贯异样。
您也能够通过命令kubectl logs <NAME> -n deviceshifu
打印错误信息。
通过配置来接入一台 OPC UA 设施
connection: Ethernet address: opc.tcp://192.168.0.111:4840/freeopcua/server protocol: OPCUA protocolSettings: OPCUASetting: SecurityMode: None ConnectionTimeoutInMilliseconds: 5000 AuthenticationMode: UserName Username: user1 Password: pwd1
通过如上配置,将address
设置成您的 OPC UA设施 的地址,protocol
设置成OPC UA
,protocolSetting
退出OPCUASetting
,并配置SecurityMode
(信息安全模式)、ConnectionTimeoutInMilliseconds
(连贯超时工夫)、AuthenticationMode
(认证默认)以及账号密码等。
批改完上述配置之后,创立deviceshifu即可接入OPC UA设施。