Skip to content

Commit

Permalink
update pnp model to v2 (#252)
Browse files Browse the repository at this point in the history
* update pnp model to v2
  • Loading branch information
ryanwinter authored Jun 10, 2021
1 parent c8489a0 commit eb4dc91
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MXChip/AZ3166/app/nx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "azure_device_x509_cert_config.h"
#include "azure_pnp_info.h"

#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsgmxchip;1"
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsgmxchip;2"

// Device telemetry names
#define TELEMETRY_HUMIDITY "humidity"
Expand Down
2 changes: 1 addition & 1 deletion Microchip/ATSAME54-XPRO/app/nx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "azure_device_x509_cert_config.h"
#include "azure_pnp_info.h"

#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;1"
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;2"

#define TELEMETRY_TEMPERATURE "temperature"
#define TELEMETRY_INTERVAL_PROPERTY "telemetryInterval"
Expand Down
2 changes: 1 addition & 1 deletion Microchip/ATSAME54-XPRO/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ You can use the **Termite** utility to monitor communication and confirm that yo
Initializing Azure IoT Hub client
Hub hostname: ***
Device id: ***
Model id: dtmi:azurertos:devkit:gsg;1
Model id: dtmi:azurertos:devkit:gsg;2
Connected to IoTHub
SUCCESS: Azure IoT Hub client initialized
Expand Down
2 changes: 1 addition & 1 deletion NXP/MIMXRT1050-EVKB/app/nx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "fsl_tempmon.h"

#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;1"
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;2"

#define TELEMETRY_TEMPERATURE "temperature"
#define TELEMETRY_INTERVAL_PROPERTY "telemetryInterval"
Expand Down
2 changes: 1 addition & 1 deletion NXP/MIMXRT1060-EVK/app/nx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "fsl_tempmon.h"

#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;1"
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;2"

#define TELEMETRY_TEMPERATURE "temperature"
#define TELEMETRY_INTERVAL_PROPERTY "telemetryInterval"
Expand Down
2 changes: 1 addition & 1 deletion Renesas/RSK_RX65N_2MB/app/nx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "platform.h"

#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;1"
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;2"

#define TELEMETRY_TEMPERATURE "temperature"
#define TELEMETRY_INTERVAL_PROPERTY "telemetryInterval"
Expand Down
2 changes: 1 addition & 1 deletion Renesas/RSK_RX65N_2MB/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ You can use the **Termite** utility to monitor communication and confirm that yo
Initializing Azure IoT Hub client
Hub hostname: ***
Device id: ***
Model id: dtmi:azurertos:devkit:gsg;1
Model id: dtmi:azurertos:devkit:gsg;2
Connected to IoTHub
SUCCESS: Azure IoT Hub client initialized
Expand Down
2 changes: 1 addition & 1 deletion STMicroelectronics/STM32L4_L4+/app/nx_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "azure_device_x509_cert_config.h"
#include "azure_pnp_info.h"

#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;1"
#define IOT_MODEL_ID "dtmi:azurertos:devkit:gsg;2"

#define TELEMETRY_TEMPERATURE "temperature"
#define TELEMETRY_INTERVAL_PROPERTY "telemetryInterval"
Expand Down
53 changes: 53 additions & 0 deletions core/model/gsg-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"@context": "dtmi:dtdl:context;2",
"@id": "dtmi:azurertos:devkit:gsg;2",
"@type": "Interface",
"displayName": "Getting Started Guide",
"description": "Example model for the Azure RTOS Getting Started Guides",
"contents": [
{
"@type": [
"Telemetry",
"Temperature"
],
"name": "temperature",
"displayName": "Temperature",
"unit": "degreeCelsius",
"schema": "double"
},
{
"@type": "Property",
"name": "telemetryInterval",
"displayName": "Telemetry Interval",
"description": "Specify the interval in seconds for the telemetry.",
"schema": "integer",
"writable": true
},
{
"@type": "Property",
"name": "ledState",
"displayName": "LED state",
"description": "Returns the current state of the onboard LED.",
"schema": "boolean"
},
{
"@type": "Command",
"name": "setLedState",
"displayName": "Set LED state",
"description": "Sets the state of the onboard LED.",
"request": {
"name": "state",
"displayName": "State",
"description": "True is LED on, false is LED off.",
"schema": "boolean"
}
},
{
"@type": "Component",
"schema": "dtmi:azure:DeviceManagement:DeviceInformation;1",
"name": "deviceInformation",
"displayName": "Device Information",
"description": "Interface with basic device hardware information."
}
]
}
163 changes: 163 additions & 0 deletions core/model/gsgmxchip-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"@context": "dtmi:dtdl:context;2",
"@id": "dtmi:azurertos:devkit:gsgmxchip;2",
"@type": "Interface",
"displayName": "MXCHIP Getting Started Guide",
"description": "Example model for the Azure RTOS MXCHIP Getting Started Guide",
"contents": [
{
"@type": [
"Telemetry",
"Temperature"
],
"name": "temperature",
"displayName": "Temperature",
"unit": "degreeCelsius",
"schema": "double"
},
{
"@type": [
"Telemetry",
"RelativeHumidity"
],
"name": "humidity",
"displayName": "Humidity",
"unit": "percent",
"schema": "double"
},
{
"@type": [
"Telemetry",
"Pressure"
],
"name": "pressure",
"displayName": "Pressure",
"unit": "kilopascal",
"schema": "double"
},
{
"@type": "Telemetry",
"name": "magnetometerX",
"displayName": "Magnetometer X / mgauss",
"schema": "double"
},
{
"@type": "Telemetry",
"name": "magnetometerY",
"displayName": "Magnetometer Y / mgauss",
"schema": "double"
},
{
"@type": "Telemetry",
"name": "magnetometerZ",
"displayName": "Magnetometer Z / mgauss",
"schema": "double"
},
{
"@type": [
"Telemetry",
"Acceleration"
],
"name": "accelerometerX",
"displayName": "Accelerometer X",
"schema": "double",
"unit": "gForce"
},
{
"@type": [
"Telemetry",
"Acceleration"
],
"name": "accelerometerY",
"displayName": "Accelerometer Y",
"schema": "double",
"unit": "gForce"
},
{
"@type": [
"Telemetry",
"Acceleration"
],
"name": "accelerometerZ",
"displayName": "Accelerometer Z",
"schema": "double",
"unit": "gForce"
},
{
"@type": [
"Telemetry",
"AngularVelocity"
],
"name": "gyroscopeX",
"displayName": "Gyroscope X",
"schema": "double",
"unit": "degreePerSecond"
},
{
"@type": [
"Telemetry",
"AngularVelocity"
],
"name": "gyroscopeY",
"displayName": "Gyroscope Y",
"schema": "double",
"unit": "degreePerSecond"
},
{
"@type": [
"Telemetry",
"AngularVelocity"
],
"name": "gyroscopeZ",
"displayName": "Gyroscope Z",
"schema": "double",
"unit": "degreePerSecond"
},
{
"@type": "Property",
"name": "telemetryInterval",
"displayName": "Telemetry Interval",
"description": "Control the frequency of the telemetry loop.",
"schema": "integer",
"writable": true
},
{
"@type": "Property",
"name": "ledState",
"displayName": "LED state",
"description": "Returns the current state of the onboard LED.",
"schema": "boolean"
},
{
"@type": "Command",
"name": "setLedState",
"displayName": "Set LED state",
"description": "Sets the state of the onboard LED.",
"request": {
"name": "state",
"displayName": "State",
"description": "True is LED on, false is LED off.",
"schema": "boolean"
}
},
{
"@type": "Command",
"name": "setDisplayText",
"displayName": "Display Text",
"description": "Display text on screen.",
"request": {
"name": "text",
"displayName": "Text",
"description": "Text displayed on the screen.",
"schema": "string"
}
},
{
"@type": "Component",
"schema": "dtmi:azure:DeviceManagement:DeviceInformation;1",
"name": "deviceInformation",
"displayName": "Device Information",
"description": "Interface with basic device hardware information."
}
]
}
3 changes: 3 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"aliveStatusCodes": [0, 200]
}

0 comments on commit eb4dc91

Please sign in to comment.