This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments
This reference implementation demonstrates how the Azure IoT Gateway SDK can be used to connect to existing OPC UA servers and publishes JSON encoded telemetry data from these servers in OPC UA "Pub/Sub" format (using a JSON payload) to Azure IoT Hub. All transport protocols supported by the Gateway SDK can be used, i.e. HTTPS, AMQP and MQTT. The transport is selected in the transport setting in the gatewayconfig.json file.
This module, apart from including an OPC UA *client* for connecting to existing OPC UA servers you have on your network, also includes an OPC UA *server* on port 62222 that can be used to configure the module.
This module uses the OPC Foundations's OPC UA reference stack and therefore licensing restrictions apply. Visit http://opcfoundation.github.io/UA-.NETStandardLibrary/ for OPC UA documentation and licensing terms.
This module requires the .NET Core SDK V1.0. You can build the module from Visual Studio 2015 by opening the solution file, right clicking the GatewayApp.NetCore project and selecting "publish". Alternatively, the module can be built from the command line with:
The ```Configuration``` Section must contain at a minimum all items shown in the provide file. The JSON type conforms to the OPC UA reference stack serialization of the ```ApplicationConfiguration``` type.
You should pass your application name and the IoT Hub owner connection string (which can be read out for your IoT Hub from portal.azure.com) as command line arguments. The IoT Hub owner connection string is only required for device registration with IoT Hub on first run.
You can run the module on Windows along with the Gateway SDK and IoT Hub module directly via Visual Studio 2015 by hitting F5 (after publishing). Don't forget your command line arguments!
You can also run the module in a Docker container using the Dockerfile provided. From the root of the repo, in a console, type: