Skip to content

Commit

Permalink
⭐️ opcua provider (#1552)
Browse files Browse the repository at this point in the history
Start OPC UA service:

```
docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5 --ut --dca
```

Connect with cnquery:

```
cnquery shell opcua --endpoint opc.tcp://localhost:50000
```

```
cnquery> opcua.server { * }
opcua.server: {
  buildInfo: {
    BuildDate: "2023-07-06T15:02:08Z"
    BuildNumber: "0a38ab40a9 (OPC UA SDK db5152bb6f729c69adcfbb8003850ed8d6cc8d7b from 2023-06-27T12:11:48Z)"
    ManufacturerName: "Microsoft"
    ProductName: "IoT Edge OPC UA PLC"
    ProductURI: "https://github.com/Azure-Samples/iot-edge-opc-plc"
    SoftwareVersion: "2.9.8 (OPC UA SDK 1.4.371.96)"
  }
  node: opcua.node id="i=2253" name="Server"
  currentTime: 2023-08-21 16:28:34.4869083 +0200 CEST
  state: "ServerStateRunning"
  startTime: 2023-08-21 16:28:13.3905193 +0200 CEST
}
```
  • Loading branch information
chris-rock authored Aug 24, 2023
1 parent f782c77 commit 72aee27
Show file tree
Hide file tree
Showing 26 changed files with 2,038 additions and 1,747 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ providers/lr:
go build -o lr ./providers-sdk/v1/lr/cli/main.go

.PHONY: providers/build
providers/build: providers/build/core providers/build/network providers/build/os providers/build/ipmi providers/build/oci providers/build/slack providers/build/github providers/build/gitlab providers/build/terraform providers/build/vsphere
providers/build: providers/build/core providers/build/network providers/build/os providers/build/ipmi providers/build/oci providers/build/slack providers/build/github providers/build/gitlab providers/build/terraform providers/build/vsphere providers/build/opcua

providers/build/core: providers/lr
@$(call buildProvider, providers/core)
Expand Down Expand Up @@ -165,6 +165,9 @@ providers/build/terraform: providers/lr
providers/build/vsphere: providers/lr
@$(call buildProvider, providers/vsphere)

providers/build/opcua: providers/lr
@$(call buildProvider, providers/opcua)

providers/install:
# @$(call installProvider, providers/core)
@$(call installProvider, providers/network)
Expand All @@ -176,6 +179,7 @@ providers/install:
@$(call installProvider, providers/gitlab)
@$(call installProvider, providers/terraform)
@$(call installProvider, providers/vsphere)
@$(call installProvider, providers/opcua)

providers/bundle:
@$(call bundleProvider, providers/network)
Expand All @@ -187,6 +191,7 @@ providers/bundle:
@$(call bundleProvider, providers/gitlab)
@$(call bundleProvider, providers/terraform)
@$(call bundleProvider, providers/vsphere)
@$(call bundleProvider, providers/opcua)

providers/test:
@$(call testProvider, providers/core)
Expand All @@ -199,6 +204,7 @@ providers/test:
@$(call testGpModProvider, providers/gitlab)
@$(call testGpModProvider, providers/terraform)
@$(call testGpModProvider, providers/vsphere)
@$(call testGpModProvider, providers/opcua)

lr/test:
go test ./resources/lr/...
Expand Down
64 changes: 0 additions & 64 deletions _motor/discovery/opcua/resolver.go

This file was deleted.

99 changes: 0 additions & 99 deletions _motor/providers/opcua/opcua.go

This file was deleted.

20 changes: 0 additions & 20 deletions _motor/providers/opcua/platform.go

This file was deleted.

36 changes: 0 additions & 36 deletions _resources/packs/opcua/info/info.go

This file was deleted.

1 change: 0 additions & 1 deletion _resources/packs/opcua/info/opcua.lr.json

This file was deleted.

1 change: 0 additions & 1 deletion _resources/packs/opcua/info/opcua.lr.manifest.json

This file was deleted.

46 changes: 0 additions & 46 deletions _resources/packs/opcua/namespace.go

This file was deleted.

Loading

0 comments on commit 72aee27

Please sign in to comment.