Skip to content

proteus-cpi/azure-iiot-services-api

 
 

Repository files navigation

Azure Industrial IoT API

This repository contains:

  1. A handcrafted C# API for OPC UA Registry as well as Device Twin and History Services.
  2. A sample command line interface (CLI) that allows you to exercise this API.
  3. A set of AutoREST generated libraries that enable access to the above services using a wider variety of languages.

Using the API

Prebuilt and signed packages of the API assemblies can be installed from nuget.org. Use them to build your own applications against the corresponding services in our suite of Azure IoT Industrial components.

Build and Run

To build and run the sample command line interface for the services, clone the repository. Then...

Install any tools and dependencies

Deploy Azure Services

The command line interface (CLI) and APIs depend on the OPC UA Services.

Follow the instructions here to deploy all required services for local development. Copy the resulting .env file into this repository's root (or into the parent folder).

Unless you are running the above services on your local machine (localhost), the following environment variables can be added to your .env file to configure the remote or cloud service endpoints:

  • PCS_TWIN_SERVICE_URL = {http|https}://{hostname}:9041
  • PCS_TWIN_REGISTRY_URL = {http|https}://{hostname}:9042
  • PCS_TWIN_HISTORY_URL = {http|https}://{hostname}:9043

Building and running the CLI with Visual Studio or VS Code

  1. Make sure the Prerequisites are set up.
  2. Change into the repo root and ensure the .env file exists there or in the parent folder.
  3. Open the azure-iiot-services-api.sln solution file in Visual Studio or VS Code
  4. In the launchsettings.json add as command line argument console to start the CLI in console mode rather than in single command mode. (In Visual Studio this can also be accomplished in the Properties->Debug tab).
  5. Run the Microsoft.Azure.IIoT.OpcUa.Api.Cli project (e.g. press F5).
  6. Type help to see the available options.

Building and running the CLI on the command line

  1. Make sure the Prerequisites are set up.
  2. Open a terminal window or command line window at the repo root.
  3. Ensure the .env file exists in the root or its parent folder.
  4. Run the following command:
    cd src
    cd Microsoft.Azure.IIoT.OpcUa.Api
    cd cli
    dotnet run console

Contributing

Refer to our contribution guidelines.

Feedback

Please enter issues, bugs, or suggestions as GitHub Issues here.

License

Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.

About

Azure Industrial IoT OPC UA API and Samples

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 24.7%
  • Java 20.7%
  • JavaScript 18.0%
  • Ruby 10.9%
  • Go 8.6%
  • Python 6.9%
  • Other 10.2%