Giter Site home page Giter Site logo

iothub-manager-dotnet's Introduction

Build Issues Gitter

IoTHub Manager

Handles communication with the IoT Hub (device registration, device queries, etc.)

Overview

  • WebService.csproj - C# web service exposing REST interface for IoT Hub management functionality
  • WebService.Test.csproj - Unit tests for web services functionality
  • Services.csproj - C# assembly containining business logic for interacting with Azure services (IoTHub, etc.)
  • Services.Test.csproj - Unit tests for services functionality
  • Solution/scripts - contains build scripts, docker container creation scripts, and scripts for running the microservice from the command line

How to use it

For Unit Tests:

  1. There are two test projects:
    1. Services.Test - this contains tests for the Services project which interacts with Azure services through the Azure SDKs, e.g. the IoT Hub, and
    2. WebService.Test - this contains tests for the WebService project which contains the webservices APIs (note these tests are also dependent on Services code).
  2. Open the desired test project, e.g. WebService.Test
  3. Open the controller test file, e.g. DevicesControllerTest.cs
  4. Right click on a test and run it, e.g. Right click on TestAllDevices and select Run Intellitest from the context menu.

For Debugging:

  1. Set your PCS_IOTHUB_CONNSTRING system environment variable for your IoT Hub connection, and PCS_CONFIG_WEBSERVICE_URL for the URL of the config service.
  2. Run F5 from VS.
  3. Hit the REST api for the web service using:

Using Swagger:

  1. <todo - Swagger>

Running locally in a container:

  1. <todo - container instructions>

Running on Azure in a container in ACS:

  1. <todo - cloud environment container instructions>

Configuration

  1. webservice\appsettings.ini allows configuring the microservice, like IoT Hub connection string and web service TCP port. By default, the file references the environment variable below:
    1. PCS_IOTHUB_CONNSTRING is a system environment variable and should contain your IoT Hub connection string. Create this environment variable before running the microservice.
  2. <todo - logging/monitoring>

Other documents

iothub-manager-dotnet's People

Contributors

dluc avatar jillcary avatar joyhui avatar mechaffin avatar microsoftopensource avatar msftgits avatar ppathan avatar timlaverty avatar xzsheng avatar zhang-hua avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.