Merged PR 16: Bugfix to make symbolic link string comparison case insensitive and readme updates
Bugfix to make symbolic link string comparison case insensitive and readme updates
This commit is contained in:
Родитель
ba667566d1
Коммит
92c9965fbd
|
@ -1,6 +1,6 @@
|
|||
# Azure IoT PnP Bridge
|
||||
|
||||
Azure IoT PnP Bridge is an open source effort from Microsoft to expose peripherals on a Device (Gateway) to Microsoft Azure IoT services using Azure IoT PnP Interfaces. The vision is to enable IoT developers to light up peripherals and expose it to Azure IoT services at scale with mininimum amount of device side code. The bridge would also provide peripheral monitoring and remote managing.
|
||||
Azure IoT PnP Bridge is an open source effort from Microsoft to expose peripherals on a Device (Gateway) to Microsoft Azure IoT services using Azure IoT PnP Interfaces. The vision is to enable IoT developers to light up peripherals and expose it to Azure IoT services at scale with mininimum amount of device side code. The bridge would also provide peripheral monitoring and remote management.
|
||||
|
||||
## Compile the Bridge
|
||||
|
||||
|
@ -53,7 +53,7 @@ The message format should conform to below template:
|
|||
}
|
||||
```
|
||||
|
||||
For devices that self descre Azure IoT PnP interface, the template should contain "InterfaceId" in the root document object.
|
||||
For devices that self describe Azure IoT PnP interface(s), the template should contain "InterfaceId" in the root document object.
|
||||
|
||||
There are currently 3 discovery adapters in PnP Bridge:
|
||||
|
||||
|
@ -89,13 +89,11 @@ If there are any initial parameters that needs to be passed as part of the Disco
|
|||
|
||||
### PnP Adapter
|
||||
|
||||
A PnP Adapter implements the bindings of Azure IoT PnP interface.
|
||||
|
||||
There are currently 3 discovery adapters in PnP Bridge:
|
||||
A PnP Adapter implements the bindings of Azure IoT PnP interface. There are currently 3 PnP adapters in the PnP Bridge:
|
||||
|
||||
* CoreDeviceHealth: Implements basic device health interface
|
||||
* CameraPnP: Implements camera specific health interface
|
||||
* SerialPnp: Binds to the PnP interface reported by the MCU
|
||||
* SerialPnp: Implements interfaces associated with MCUs or other devices that are [SerialPnP protocol compliant](..\SerialPnP\Readme.md)
|
||||
|
||||
## Authoring new PnP Bridge Adapters
|
||||
|
||||
|
|
|
@ -67,14 +67,15 @@ CoreDevice_OnDeviceNotification(
|
|||
sprintf_s(buff, 512, "%S", eventData->u.DeviceInterface.SymbolicLink);
|
||||
|
||||
if (action == CM_NOTIFY_ACTION_DEVICEINTERFACEREMOVAL) {
|
||||
if (device->state && strcmp(buff, device->symbolicLink) == 0) {
|
||||
if (device->state && stricmp(buff, device->symbolicLink) == 0) {
|
||||
device->state = false;
|
||||
|
||||
LogInfo("device removed %S", eventData->u.DeviceInterface.SymbolicLink);
|
||||
Sample_SendEventAsync(device->pnpinterfaceHandle, "DeviceStatus", "Disconnected");
|
||||
}
|
||||
}
|
||||
else if (action == CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL) {
|
||||
if (!device->state && strcmp(buff, device->symbolicLink) == 0) {
|
||||
if (!device->state && stricmp(buff, device->symbolicLink) == 0) {
|
||||
device->state = true;
|
||||
LogInfo("device connected %S", eventData->u.DeviceInterface.SymbolicLink);
|
||||
Sample_SendEventAsync(device->pnpinterfaceHandle, "DeviceStatus", "Connected");
|
||||
|
|
Загрузка…
Ссылка в новой задаче