You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.
In the actual vscode plugin version, If a interface contains more than one telemetry value (like could be for example a combo Temperature and Humidity sensor):
{
"@type": "Telemetry",
"name": "hts221_temp_value",
"displayName": "HTS221 Temp Value",
"comment": "HTS221 Temperature Value",
"schema": "double",
"unit": "Units/Temperature/celsius"
},
{
"@type": "Telemetry",
"name": "hts221_hum_value",
"displayName": "HTS221 Hum Value",
"comment": "HTS221 Humidity Value",
"schema": "double",
"unit": "Units/Humidity/percent"
},
The plugin creates for it a single API for reporting all the telemetries with a single message using a single function ( *******_Telemetry_SendAll(void) ) like for example:
The previous plugin versions have also the APIs for sending each telemetry value with a separate message
In my case: DIGITALTWIN_CLIENT_RESULT Temp_humInterface_Telemetry_SendHts221_temp_value();
DIGITALTWIN_CLIENT_RESULT Temp_humInterface_Telemetry_SendHts221_hum_value();
Could be good to add back this possibility in order to provide more flexibility to the user.
Thanks a lot
Luca
The text was updated successfully, but these errors were encountered:
As you said, since 0.10.17, In PnP generated project, all telemetries defined in a interface will be sent to Azure IoT Hub in a single send, to reduce the message count sending to the cloud, which may cause the "Message Explosion" issue.
And CodeGen no longer generates separate functions for sending each telemetry, since they became unused code piece in the generated project.
If developer still wants to send each telemetry value with a separated message, he can add his own implementation for this, as the generated xxxTelemetry_SendAll() does. From this point of view, the CodeGen tool still has flexibility for a customization.
Note: you need to compose the JSON payload for each message, e.g. {"temperature": 16} before sending to cloud.
The last point we want to make clear is that PnP CodeGen only generates skeleton code, to help device developer easy connect to Azure IoT with IoT Plug and Play feature, without knowing much more details on the complicated integration with Azure IoT Device C SDK.
We will put this into our backlog and discuss the justification with the IoT platform / E2E team for this.
Thanks,
Dooriya
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the actual vscode plugin version, If a interface contains more than one telemetry value (like could be for example a combo Temperature and Humidity sensor):
{
"@type": "Telemetry",
"name": "hts221_temp_value",
"displayName": "HTS221 Temp Value",
"comment": "HTS221 Temperature Value",
"schema": "double",
"unit": "Units/Temperature/celsius"
},
{
"@type": "Telemetry",
"name": "hts221_hum_value",
"displayName": "HTS221 Hum Value",
"comment": "HTS221 Humidity Value",
"schema": "double",
"unit": "Units/Humidity/percent"
},
The plugin creates for it a single API for reporting all the telemetries with a single message using a single function ( *******_Telemetry_SendAll(void) ) like for example:
DIGITALTWIN_CLIENT_RESULT Temp_humInterface_Telemetry_SendAll();
The previous plugin versions have also the APIs for sending each telemetry value with a separate message
In my case:
DIGITALTWIN_CLIENT_RESULT Temp_humInterface_Telemetry_SendHts221_temp_value();
DIGITALTWIN_CLIENT_RESULT Temp_humInterface_Telemetry_SendHts221_hum_value();
Could be good to add back this possibility in order to provide more flexibility to the user.
Thanks a lot
Luca
The text was updated successfully, but these errors were encountered: