Azure / iot-edge-opc-proxy-api-csharp

OPC Proxy API
16 stars 7 forks source link

Sample Client to connect with OPC UA Server via IoT Hub and OPC Proxy? #2

Closed chrisseg closed 6 years ago

chrisseg commented 6 years ago

I suppose this sample (iot-edge-opc-proxy-api-csharp/samples/opc-ua) will be a OPC UA client running on remote, by IoTHub and opc-proxy (docker container) to connect with OPC UA server on field. When I download the sample, trace code, run it (Opc.Ua/Test/Client/Program.cs), it looks like a standard OPC UA Client, and direct connect to local OPC UA Server.
Am I missing anything?

Kevin Kao

marcschier commented 6 years ago

The sample is a standard OPC Client, unless the IoT Hub Owner connection string is provided through _HUB_CS environment variable (it is a sample, a real world application would grab it from Keyvault and provide it programmatically), in which case it will require a proxy to be running to access the server as you detailed. The proxy vs local setting is made in the stack by selecting the proxy socket provider in the beginning of the sample.

Sorry about the late reply, Kevin!