Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Adding IoT Edge Module support for Pnp Bridge #40

Merged
merged 8 commits into from
Oct 29, 2020

Conversation

dipannita08
Copy link
Contributor

@dipannita08 dipannita08 commented Oct 8, 2020

Adding Pnp Bridge Edge Module support:

  • Pnp Bridge core supports running as an edge module on linux gateway running Edge Runtime
  • Pnp Bridge supports protocol translation for devices using adapters with linux support (Environmental Sensor, Modbus, Mqtt and Serial PnP)
  • Adapter and component configuration for Bridge running as module is supported through module twin's desired property "PnpBridgeConfig"
  • Bridge core reports Bridge status telemetry (Waiting for Configuration or Configuration Complete)
  • Environmental Sensor adapter is now built with Bridge executable
  • Client handle registration when running as module is frontloaded to receive property update for adapter configuration.

Validatation:

  • Validate Pnp Bridge functionality (telemetry, properties, commands) running as Edge device using linux adapters
  • Complete validation of Pnp Bridge functionality on Linux containers running in an Edge module

@kartben
Copy link
Contributor

kartben commented Oct 20, 2020

/cc @olivierbloch


extern PNP_ADAPTER SerialPnpInterface;
extern PNP_ADAPTER ModbusPnpInterface;
extern PNP_ADAPTER MqttPnpInterface;
extern PNP_ADAPTER EnvironmentSensorInterface;
Copy link
Contributor

@Shyamal-V Shyamal-V Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnvironmentSensorInterface [](start = 19, length = 26)

Please add a comment or rename to reflect this is a sample virtual sensor for illustrative purposes #Resolved

@@ -92,12 +92,14 @@ typedef int SOCKET;
HANDLE hDevice;
LOCK_HANDLE hConnectionLock;
IOTHUB_DEVICE_CLIENT_HANDLE DeviceClient;
IOTHUB_MODULE_CLIENT_HANDLE ModuleClient;
Copy link
Contributor

@Shyamal-V Shyamal-V Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be a union. #Resolved

@@ -92,12 +92,14 @@ typedef int SOCKET;
HANDLE hDevice;
LOCK_HANDLE hConnectionLock;
IOTHUB_DEVICE_CLIENT_HANDLE DeviceClient;
Copy link
Contributor

@Shyamal-V Shyamal-V Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeviceClient [](start = 36, length = 12)

Since the adapters are re-compiled for edge module support already, and the edge/device client APIs are mostly the same, another option to consider is define a custom type for the connection handle along with macros for IoTHub<Device|Module>Client_Foo. That way the adapter code will be a little easier to read without as many runtime forks. #Resolved

Copy link
Contributor

@Shyamal-V Shyamal-V left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@usivagna usivagna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great work. Okay to merge, just a heads-up that the MSDocs sample will need to be updated shortly to reflect the moving of the Environmental sensor sample to the main bridge project. I'll work on this.

@dipannita08 dipannita08 merged commit 5a5d597 into master Oct 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants