Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [main] Adjust profile and devices files used in Getting Started Device SDK #1136

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs_src/getting-started/Ch-GettingStartedSDK-C.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ Follow these steps to create a device profile for the simple random number gener

![image](EdgeX_SampleDeviceProfile_DeviceResourcesC.png)

2. A pre-created device profile for the random number device is provided in this documentation. This is supplied in the alternative file format .yaml. Download **[random-generator-device.yaml](random-generator-device.yaml)** and save the file to the `./res/profiles` folder.
2. A pre-created device profile for the random number device is provided in this documentation. This is supplied in the alternative file format .yaml. Download **[random-generator.yaml](random-generator.yaml)** and save the file to the `./res/profiles` folder.

3. Open the random-generator-device.yaml file in a text editor. In this device profile, the device described has a deviceResource: `RandomNumber`. Note how the association of a type to the deviceResource. In this case, the device profile informs EdgeX that `RandomNumber` will be a Int32. In real world IoT situations, this deviceResource list could be extensive and filled with many deviceResources all different types of data.
3. Open the random-generator.yaml file in a text editor. In this device profile, the device described has a deviceResource: `RandomNumber`. Note how the association of a type to the deviceResource. In this case, the device profile informs EdgeX that `RandomNumber` will be a Int32. In real world IoT situations, this deviceResource list could be extensive and filled with many deviceResources all different types of data.

## Creating your Device

Expand All @@ -139,9 +139,9 @@ Follow these steps to create a pre-defined device for the simple random number g

1. Explore the files in the cmd/device-simple/res/devices folder. Note the example simple-device.json that is already in this folder. Open the file with your favorite editor and explore its contents. Note how the file contents represent an actual device with its properties (properties like Name, ProfileName, AutoEvents).

2. A pre-created device for the random number device is provided in this documentation. Download **[random-generator-device.json](random-generator-device.json)** and save the file to the `~/edgexfoundry/device-simple/cmd/device-simple/res/devices` folder.
2. A pre-created device for the random number device is provided in this documentation. Download **[random-generator-devices.yaml](random-generator-devices.yaml)** and save the file to the `~/edgexfoundry/device-simple/cmd/device-simple/res/devices` folder.

3. Open the random-generator-device.json file in a text editor. In this example, the device described has a profileName: `RandNum-Device`. In this case, the device informs EdgeX that it will be using the device profile we created in [Creating your Device Profile](./Ch-GettingStartedSDK-C.md#creating-your-device-profile)
3. Open the random-generator-devices.yaml file in a text editor. In this example, the device described has a profileName: `RandNum-Device`. In this case, the device informs EdgeX that it will be using the device profile we created in [Creating your Device Profile](./Ch-GettingStartedSDK-C.md#creating-your-device-profile)


## Configuring your Device Service
Expand Down
8 changes: 4 additions & 4 deletions docs_src/getting-started/Ch-GettingStartedSDK-Go.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ Follow these steps to create a device profile for the simple random number gener

![image](EdgeX_SampleDeviceProfile_DeviceResources.png)

2. A pre-created device profile for the random number device is provided in this documentation. Download **[random-generator-device.yaml](random-generator-device.yaml)** and save the file to the `~/edgexfoundry/device-simple/cmd/device-simple/res/profiles` folder.
2. A pre-created device profile for the random number device is provided in this documentation. Download **[random-generator.yaml](random-generator.yaml)** and save the file to the `~/edgexfoundry/device-simple/cmd/device-simple/res/profiles` folder.

3. Open the random-generator-device.yaml file in a text editor. In this device profile, the device described has a deviceResource: `RandomNumber`. Note how the association of a type to the deviceResource. In this case, the device profile informs EdgeX that RandomNumber will be a INT32. In real world IoT situations, this deviceResource list could be extensive. Rather than a single deviceResource, you might find this section filled with many deviceResources and each deviceResource associated to a different type.
3. Open the random-generator.yaml file in a text editor. In this device profile, the device described has a deviceResource: `RandomNumber`. Note how the association of a type to the deviceResource. In this case, the device profile informs EdgeX that RandomNumber will be a INT32. In real world IoT situations, this deviceResource list could be extensive. Rather than a single deviceResource, you might find this section filled with many deviceResources and each deviceResource associated to a different type.

## Creating your Device

Expand All @@ -204,9 +204,9 @@ Follow these steps to create a pre-defined device for the simple random number g

1. Explore the files in the cmd/device-simple/res/devices folder. Note the example simple-device.yaml that is already in this folder. Open the file with your favorite editor and explore its contents. Note how `DeviceList` in the file represent an actual device with its properties (properties like Name, ProfileName, AutoEvents).

2. A pre-created device for the random number device is provided in this documentation. Download **[random-generator-device.yaml](random-generator-device.yaml)** and save the file to the `~/edgexfoundry/device-simple/cmd/device-simple/res/devices` folder.
2. A pre-created device for the random number device is provided in this documentation. Download **[random-generator-devices.yaml](random-generator-devices.yaml)** and save the file to the `~/edgexfoundry/device-simple/cmd/device-simple/res/devices` folder.

3. Open the random-generator-device.yaml file in a text editor. In this example, the device described has a ProfileName: `RandNum-Device`. In this case, the device informs EdgeX that it will be using the device profile we created in [Creating your Device Profile](./Ch-GettingStartedSDK-Go.md#creating-your-device-profile)
3. Open the random-generator-devices.yaml file in a text editor. In this example, the device described has a ProfileName: `RandNum-Device`. In this case, the device informs EdgeX that it will be using the device profile we created in [Creating your Device Profile](./Ch-GettingStartedSDK-Go.md#creating-your-device-profile)

### Validating your Device

Expand Down
14 changes: 0 additions & 14 deletions docs_src/getting-started/random-generator-device.json

This file was deleted.

15 changes: 15 additions & 0 deletions docs_src/getting-started/random-generator-devices.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
deviceList:
- name: RandNum-Device01
profileName: RandNum-Device
description: "Random Number Generator Device"
labels:
- test
- random
protocols:
other:
Address: random
Port: 300
autoEvents:
- interval: 10s
sourceName: RandomNumber
onChange: false
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ name: "RandNum-Device"
manufacturer: "Dell Technologies"
model: "1"
labels:
- "random"
- "test"
- "random"
- "test"
description: "random number generator to simulate a device"

deviceResources:
-
name: "RandomNumber"
- name: "RandomNumber"
description: "generated random number"
attributes:
{ type: "random" }
Expand Down