Skip to content

Commit 98182f3

Browse files
committed
update sample folder structure
1 parent 532cb62 commit 98182f3

22 files changed

Lines changed: 23 additions & 399 deletions

File tree

devicedefender/script/DDTestRun.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,17 @@ def delete_thing_with_certi(thingName, certiId, certiArn):
229229

230230
if use_mqtt5:
231231
# Run the sample:
232-
exe_path = "build/samples/device_defender/mqtt5_basic_report/"
232+
exe_path = "build/samples/others/device_defender/mqtt5_basic_report/"
233233
# If running locally, comment out the line above and uncomment the line below:
234-
#exe_path = "samples/device_defender/basic_report/build/"
234+
#exe_path = "samples/others/device_defender/basic_report/build/"
235235

236236
# Windows has a different build folder structure, but this ONLY runs on Linux currently so we do not need to worry about it
237237
exe_path = os.path.join(exe_path, "mqtt5-basic-report")
238238
else:
239239
# Run the sample:
240-
exe_path = "build/samples/device_defender/basic_report/"
240+
exe_path = "build/samples/others/device_defender/basic_report/"
241241
# If running locally, comment out the line above and uncomment the line below:
242-
#exe_path = "samples/device_defender/basic_report/build/"
242+
#exe_path = "samples/others/device_defender/basic_report/build/"
243243

244244
# Windows has a different build folder structure, but this ONLY runs on Linux currently so we do not need to worry about it
245245
exe_path = os.path.join(exe_path, "basic-report")

documents/MIGRATION_GUIDE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ samples.
13691369
13701370
It's always helpful to look at a working example to see how new functionality works,
13711371
to be able to tweak different options, to compare with existing code.
1372-
For that reason, we implemented a [Publish/Subscribe example](https://github.com/aws/aws-iot-device-sdk-cpp-v2/tree/main/samples/mqtt/mqtt5_x509)
1372+
For that reason, we implemented a [X509 Publish/Subscribe example](https://github.com/aws/aws-iot-device-sdk-cpp-v2/tree/main/samples/mqtt/mqtt5_x509)
13731373
([source code](https://github.com/aws/aws-iot-device-sdk-cpp-v2/blob/main/samples/mqtt/mqtt5_x509/main.cpp))
13741374
in the v2 SDK similar to a sample provided by the v1 SDK (see a corresponding
13751375
[readme section](https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/samples/README.md) and
@@ -1438,9 +1438,7 @@ method in PublishPacketBuilder class.
14381438
14391439
**Shared Subscriptions**\
14401440
Shared Subscriptions allow multiple clients to share a subscription to a topic and only one client
1441-
will receive messages published to that topic using a random distribution.\
1442-
For more information, see a [shared subscription sample](https://github.com/aws/aws-iot-device-sdk-cpp-v2/blob/main/samples/mqtt5/mqtt5_shared_subscription/README.md)
1443-
in the v2 SDK.
1441+
will receive messages published to that topic using a random distribution.
14441442
14451443
> [!NOTE]
14461444
> AWS Iot Core supports Shared Subscriptions for both MQTT3 and MQTT5. For more information, see

documents/Secure_Tunnel_Userguide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ secureTunnel->SendMessage(message);
249249

250250
# Secure Tunnel Best Practices
251251
* You MUST NOT perform blocking operations on any callback, or you will cause a deadlock.
252-
* If you do not provide a Client Token during creation of the Secure Tunnel, one will be automatically generated for you to use in reconnections. This token is not saved outside of the current Secure Tunnel Client. If the Client is destroyed, the original access tokens must be rotated to connect to the secure tunnel again. Information on rotating tokens can be found here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-secure-tunneling-troubleshooting.html
252+
* If you do not provide a Client Token during creation of the Secure Tunnel, one will be automatically generated for you to use in reconnection. This token is not saved outside of the current Secure Tunnel Client. If the Client is destroyed, the original access tokens must be rotated to connect to the secure tunnel again. Information on rotating tokens can be found here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-secure-tunneling-troubleshooting.html
253253
* Client tokens MUST be unique. You cannot for example, pair a Client Token with an Access Token on one secure tunnel, and then use the same Client Token with a different Access Token on a separate secure tunnel. The Secure Tunnel Service will not allow a Client Token to be paired with more than one Access Token.
254254
* A Secure Tunnel Client that has called `Start()` will continue to attempt to connect the Secure Tunnel Service until `Stop()` is called, even if the Secure Tunnel it is trying to connect with has been closed. You MUST call `Stop()` to cease future connection attempts.
255-
* The [onStreamStarted](#onstreamstarted) and [onConnectionStarted](#onconnectionstarted) callbacks should be set to detect and store the service id and/or connection id of streams started by a source device for use with messages. The [Secure Tunnel sample](../samples/secure_tunneling/secure_tunnel/README.md) provides an basic example of how this can be done.
255+
* The [onStreamStarted](#onstreamstarted) and [onConnectionStarted](#onconnectionstarted) callbacks should be set to detect and store the service id and/or connection id of streams started by a source device for use with messages. The [Secure Tunnel sample](../samples/others/secure_tunneling/secure_tunnel/README.md) provides an basic example of how this can be done.
256256
* Outgoing messages MUST be assigned a service id and/or a connection id if the established stream contains a service id or a connection id or the message will be rejected. e.g. If a stream is started using service id "ssh" and connection id (1), a message sent in response must also include the service id "ssh" and connection id (1) or it will not find an active stream to send it on. Refer to the [Send Message](#send-message) code block for instruction on adding a service id and/or connection id to your message.
257257

samples/CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.9...3.31)
22

33
project(aws-iot-device-sdk-cpp-v2-samples)
44

5-
add_subdirectory(device_defender/basic_report)
6-
add_subdirectory(device_defender/mqtt5_basic_report)
5+
add_subdirectory(others/device_defender/mqtt5_basic_report)
76
add_subdirectory(service_clients/fleet_provisioning/provision-basic)
87
add_subdirectory(service_clients/fleet_provisioning/provision-csr)
98
add_subdirectory(greengrass/ipc)
@@ -14,7 +13,7 @@ add_subdirectory(mqtt/mqtt5_aws_websocket)
1413
add_subdirectory(mqtt/mqtt5_custom_auth_signed)
1514
add_subdirectory(mqtt/mqtt5_custom_auth_unsigned)
1615
add_subdirectory(mqtt/mqtt5_pkcs11)
17-
add_subdirectory(secure_tunneling/secure_tunnel)
18-
add_subdirectory(secure_tunneling/tunnel_notification)
16+
add_subdirectory(others/secure_tunneling/secure_tunnel)
17+
add_subdirectory(others/secure_tunneling/tunnel_notification)
1918
add_subdirectory(service_clients/shadow/shadow_sync)
20-
add_subdirectory(commands/commands-sandbox)
19+
add_subdirectory(service_clients/commands/commands-sandbox)

samples/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ This directory contains sample applications for [aws-iot-device-sdk-cpp-v2](../R
3030
| [Jobs](./service_clients/jobs/jobs-sandbox/README.md) | Receive and execute remote operations sent from the Jobs service. |
3131
| [Basic Fleet Provisioning](./service_clients/fleet_provisioning/provision-basic/README.md) | Provision a device using the Fleet Provisioning template. |
3232
| [CSR Fleet Provisioning](./service_clients/fleet_provisioning/provision-csr/README.md) | Demonstrates CSR-based device certificate provisioning. |
33+
| [Commands](./service_clients/commands/commands-sandbox/README.md) | Receive and process remote instructions using AWS IoT Device Management commands |
3334

3435

3536
### Greengrass Samples
@@ -39,6 +40,16 @@ This directory contains sample applications for [aws-iot-device-sdk-cpp-v2](../R
3940
| [Greengrass Discovery](./greengrass/basic_discovery/README.md) | Discover and connect to a local Greengrass core. |
4041
| [Greengrass IPC](./greengrass/ipc/README.md) | Demonstrates Inter-Process Communication (IPC) with Greengrass components. |
4142

43+
### Others
44+
##### Samples that interact with other AWS IoT Services
45+
| Sample | Description |
46+
|--------|-------------|
47+
| [Device Defender](./others/device_defender/mqtt5_basic_report/README.md) | Monitor the health of your IoT device using AWS IoT Device Defender. |
48+
| [Secure Tunneling](./others/secure_tunneling/secure_tunnel/README.md) | Connect a destination or a source Secure Tunnel Client to an AWS IoT Secure Tunnel endpoint. |
49+
| [Secure Tunneling Notification](./others/secure_tunneling/tunnel_notification/README.md) | Receive a tunnel notification using a Secure Tunnel Client. |
50+
51+
52+
4253
## Instructions
4354

4455
First build and install aws-iot-devices-sdk-cpp-v2 with following instructions from [Installation](../README.md#Installation).

samples/device_defender/basic_report/CMakeLists.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.

samples/device_defender/basic_report/README.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)