diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4165ecf2f3..3e1212e607 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # Instructions for CODEOWNERS file format and automatic build failure notifications: -# https://github.com/Azure/azure-sdk/blob/master/docs/policies/opensource.md#codeowners +# https://github.com/Azure/azure-sdk/blob/main/docs/policies/opensource.md#codeowners ########### # SDK diff --git a/CHANGELOG.md b/CHANGELOG.md index bae3a2d149..2f8b019998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - Compared to the previous 1.0.0 release, there are **no** breaking changes. - Removed `az_iot_pnp_client.h`, which included some beta APIs related to IoT Plug and Play such as `az_iot_pnp_client()`. - These will ship in a future release and will continue to be available as beta from [this feature branch](https://github.com/Azure/azure-sdk-for-c/tree/feature/iot_pnp). - + ### Bug Fixes - [[#1600]](https://github.com/Azure/azure-sdk-for-c/pull/1600) Make sure `az_json_writer_append_json_text()` appends a comma between elements of a JSON array. @@ -197,4 +197,4 @@ ## 1.0.0-preview.1 (2020-05-12) -Initial release. Please see the [README](https://github.com/Azure/azure-sdk-for-c/blob/master/README.md) for more information. +Initial release. Please see the [README](https://github.com/Azure/azure-sdk-for-c/blob/main/README.md) for more information. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6aa88961c4..cfc20fec25 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -161,5 +161,5 @@ make ${project_name}_cov_xml //i.e. az_core_cov_xml or az_iot_cov_xml ``` -[vcpkg]: https://github.com/Azure/azure-sdk-for-c/blob/master/README.md#development-environment +[vcpkg]: https://github.com/Azure/azure-sdk-for-c/blob/main/README.md#development-environment [azure_sdk_for_c_cmake_options]: https://github.com/Azure/azure-sdk-for-c#cmake-options diff --git a/README.md b/README.md index 2e45b2295e..b9ef2b05c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Azure SDK for Embedded C -[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/c/c%20-%20client%20-%20ci?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=722&branchName=master) +[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/c/c%20-%20client%20-%20ci?branchName=main)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=722&branchName=main) The Azure SDK for Embedded C is designed to allow small embedded (IoT) devices to communicate with Azure services. Since we expect our client library code to run on microcontrollers, which have very limited amounts of flash and RAM, and have slower CPUs, our C SDK does things very differently than the SDKs we offer for other languages. @@ -26,7 +26,7 @@ With this in mind, there are many tenets or principles that we follow in order t - [The GitHub Repository](#the-github-repository) - [Services](#services) - [Structure](#structure) - - [Master Branch](#master-branch) + - [Main Branch](#main-branch) - [Release Branches and Release Tagging](#release-branches-and-release-tagging) - [Getting Started Using the SDK](#getting-started-using-the-sdk) - [CMake](#cmake) @@ -64,7 +64,7 @@ To get help with the SDK: The Azure SDK for Embedded C repo has been structured around the service libraries it provides: -1. [IoT](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot) - Library to connect Embedded Devices to Azure IoT services +1. [IoT](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot) - Library to connect Embedded Devices to Azure IoT services ### Structure @@ -82,9 +82,9 @@ This repo is structured with two priorities: For instructions on how to consume the libraries via CMake, please see [here](#cmake). For instructions on how consume the source code in an IDE, command line, or other build systems, please see [here](#source-files-ide-command-line-etc). -### Master Branch +### Main Branch -The master branch has the most recent code with new features and bug fixes. It does **not** represent the latest General Availability (**GA**) release of the SDK. +The main branch has the most recent code with new features and bug fixes. It does **not** represent the latest General Availability (**GA**) release of the SDK. ### Release Branches and Release Tagging @@ -94,7 +94,7 @@ When we make an official release, we will create a unique git tag containing the The latest release can be found in the [release section](https://github.com/Azure/azure-sdk-for-c/releases) of this repo. - For more information, please see this [branching strategy](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repobranching.md#release-tagging) document. + For more information, please see this [branching strategy](https://github.com/Azure/azure-sdk/blob/main/docs/policies/repobranching.md#release-tagging) document. ## Getting Started Using the SDK @@ -113,7 +113,7 @@ The SDK can be conveniently consumed either via CMake or other non-CMake methods git checkout - For information about using a specific client library, see the README file located in the client library's folder which is a subdirectory under the [`/sdk/docs`](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs) folder. + For information about using a specific client library, see the README file located in the client library's folder which is a subdirectory under the [`/sdk/docs`](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs) folder. 3. Ensure the SDK builds correctly. @@ -135,7 +135,7 @@ The SDK can be conveniently consumed either via CMake or other non-CMake methods This results in building each library as a static library file, placed in the output directory you created (for example `build\sdk\core\az_core\Debug`). At a minimum, you must have an `Azure Core` library, a `Platform` library, and an `HTTP` library. Then, you can build any additional Azure service client library you intend to use from within your application (for example `build\sdk\iot\Debug`). To use our client libraries in your application, just `#include` our public header files and then link your application's object files with our library files. -4. Provide platform-specific implementations for functionality required by `Azure Core`. For more information, see the [Azure Core Porting Guide](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#porting-the-azure-sdk-to-another-platform). +4. Provide platform-specific implementations for functionality required by `Azure Core`. For more information, see the [Azure Core Porting Guide](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#porting-the-azure-sdk-to-another-platform). ### CMake Options @@ -204,11 +204,11 @@ Azure SDK for C can be automatically checked out by cmake and become a build dep Using this option would skip manually getting the Azure SDK for C source code to build and installing it (or making it available from some include path). Instead, CMake would do this for us. -Azure SDK for C provides a [CMake module](https://github.com/Azure/azure-sdk-for-c/blob/master/cmake-modules/AddAzureSDKforC.cmake) that can be copied and used for this purpose. +Azure SDK for C provides a [CMake module](https://github.com/Azure/azure-sdk-for-c/blob/main/cmake-modules/AddAzureSDKforC.cmake) that can be copied and used for this purpose. ### Visual Studio Code -For convenience, you can quickly get started using [Visual Studio Code](https://code.visualstudio.com/) and the [CMake Extension by Microsoft](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools&ssr=false#overview). Included in the repo is a `settings.json` file [here](https://github.com/Azure/azure-sdk-for-c/blob/master/.vscode-config/settings.json) which the extension will use to configure a CMake project. To use it, copy the `settings.json` file from `.vscode-config` to your own `.vscode` directory. With this, you can run and debug samples and tests. Modify the variables in the file to your liking or as instructed by sample documentation and then select the following button in the extension: +For convenience, you can quickly get started using [Visual Studio Code](https://code.visualstudio.com/) and the [CMake Extension by Microsoft](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools&ssr=false#overview). Included in the repo is a `settings.json` file [here](https://github.com/Azure/azure-sdk-for-c/blob/main/.vscode-config/settings.json) which the extension will use to configure a CMake project. To use it, copy the `settings.json` file from `.vscode-config` to your own `.vscode` directory. With this, you can run and debug samples and tests. Modify the variables in the file to your liking or as instructed by sample documentation and then select the following button in the extension: ![VSCode CMake Config](./sdk/docs/resources/vscode_cmake_config.png) @@ -233,8 +233,8 @@ To use a specific service/feature, you may include the header file with the func The specific dependencies of each service may vary, but a couple rules of thumb should resolve the most typical of issues. -1. All services depend on `core` ([source files here](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/src/azure/core)). You may compile these files with your project to resolve core dependencies. -2. Most services will require a platform file to be compiled with your project ([see here for porting instructions](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#porting-the-azure-sdk-to-another-platform)). We have provided several implementations already [here](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/src/azure/platform) for [`windows`](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/src/azure/platform/az_win32.c), [`posix`](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/src/azure/platform/az_posix.c), and a [`no_platform`](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/src/azure/platform/az_noplatform.c) for no-op stubs. Please compile one of these, for your respective platform, with your project. +1. All services depend on `core` ([source files here](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/src/azure/core)). You may compile these files with your project to resolve core dependencies. +2. Most services will require a platform file to be compiled with your project ([see here for porting instructions](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#porting-the-azure-sdk-to-another-platform)). We have provided several implementations already [here](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/src/azure/platform) for [`windows`](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/src/azure/platform/az_win32.c), [`posix`](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/src/azure/platform/az_posix.c), and a [`no_platform`](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/src/azure/platform/az_noplatform.c) for no-op stubs. Please compile one of these, for your respective platform, with your project. The following compilation, preprocessor options will add or remove functionality in the SDK. @@ -274,7 +274,7 @@ The reason for this is the fact of this functions are not thread-safe, and a cus ### IoT samples Samples for IoT will be built only when CMake option `TRANSPORT_PAHO` is set. See [compiler options](#compiler-options). -For more information about IoT APIs and samples, see [Azure IoT Clients](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/iot#azure-iot-clients). +For more information about IoT APIs and samples, see [Azure IoT Clients](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/iot#azure-iot-clients). ### Development Environment @@ -294,7 +294,7 @@ vcpkg maintains any installed package inside its own folder, allowing to have mu Use the following steps to install vcpkg and have it linked to CMake. -> **Note:** The Azure SDK is only officially supported against certain versions of vcpkg. Use the commit in [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/master/eng/vcpkg-commit.txt) to get a known working version. +> **Note:** The Azure SDK is only officially supported against certain versions of vcpkg. Use the commit in [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt) to get a known working version. ```bash # Clone vcpkg: @@ -346,7 +346,7 @@ vcpkg maintains any installed package inside its own folder, allowing to have mu Use the following steps to install vcpkg and have it linked to CMake. -> **Note:** The Azure SDK is only officially supported against certain versions of vcpkg. Use the commit in [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/master/eng/vcpkg-commit.txt) to get a known working version. +> **Note:** The Azure SDK is only officially supported against certain versions of vcpkg. Use the commit in [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt) to get a known working version. ```bash # Clone vcpkg: @@ -403,7 +403,7 @@ First, ensure that you have the latest `gcc` installed: Use the following steps to install vcpkg and have it linked to CMake. -> **Note:** The Azure SDK is only officially supported against certain versions of vcpkg. Use the commit in [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/master/eng/vcpkg-commit.txt) to get a known working version. +> **Note:** The Azure SDK is only officially supported against certain versions of vcpkg. Use the commit in [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt) to get a known working version. ```bash # Clone vcpkg: @@ -450,7 +450,7 @@ AZ_NODISCARD az_result az_http_client_send_request(az_http_request const* request, az_http_response* ref_response); ``` -For example, Azure SDK provides a cmake target `az_curl` (find it [here](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/src/azure/platform/az_curl.c)) with the implementation code for the contract function mentioned before. It uses an `az_http_request` reference to create an specific `libcurl` request and send it though the wire. Then it uses `libcurl` response to fill the `az_http_response` reference structure. +For example, Azure SDK provides a cmake target `az_curl` (find it [here](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/src/azure/platform/az_curl.c)) with the implementation code for the contract function mentioned before. It uses an `az_http_request` reference to create an specific `libcurl` request and send it though the wire. Then it uses `libcurl` response to fill the `az_http_response` reference structure. ### Link your application with your own HTTP stack @@ -462,29 +462,29 @@ target_link_libraries(your_application_target PRIVATE lib_adapter http_stack_lib target_link_libraries(blobs_client_example PRIVATE az_curl CURL::libcurl) ``` -See the complete cmake file and how to link your own library [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/src/azure/iot/CMakeLists.txt) +See the complete cmake file and how to link your own library [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/src/azure/iot/CMakeLists.txt) ## SDK Architecture -At the heart of our SDK is, what we refer to as, [Azure Core](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core). This code defines several data types and functions for use by the client libraries that build on top of us such as the [Azure IoT client libraries](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/iot). Here are some of the features that customers use directly: +At the heart of our SDK is, what we refer to as, [Azure Core](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core). This code defines several data types and functions for use by the client libraries that build on top of us such as the [Azure IoT client libraries](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/iot). Here are some of the features that customers use directly: -- **Spans**: A span represents a byte buffer and is used for string manipulations, HTTP requests/responses, reading/writing JSON payloads. It allows us to return a substring within a larger string without any memory allocations. See the [Working With Spans](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#working-with-spans) section of the `Azure Core` README for more information. +- **Spans**: A span represents a byte buffer and is used for string manipulations, HTTP requests/responses, reading/writing JSON payloads. It allows us to return a substring within a larger string without any memory allocations. See the [Working With Spans](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#working-with-spans) section of the `Azure Core` README for more information. -- **Logging**: As our SDK performs operations, it can send log messages to a customer-defined callback. Customers can enable this to assist with debugging and diagnosing issues when leveraging our SDK code. See the [Logging SDK Operations](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#logging-sdk-operations) section of the `Azure Core` README for more information. +- **Logging**: As our SDK performs operations, it can send log messages to a customer-defined callback. Customers can enable this to assist with debugging and diagnosing issues when leveraging our SDK code. See the [Logging SDK Operations](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#logging-sdk-operations) section of the `Azure Core` README for more information. -- **Contexts**: Contexts offer an I/O cancellation mechanism. Multiple contexts can be composed together in your application's call tree. When a context is canceled, its children are also canceled. See the [Canceling an Operation](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#canceling-an-operation) section of the `Azure Core` README for more information. +- **Contexts**: Contexts offer an I/O cancellation mechanism. Multiple contexts can be composed together in your application's call tree. When a context is canceled, its children are also canceled. See the [Canceling an Operation](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#canceling-an-operation) section of the `Azure Core` README for more information. - **JSON**: Non-allocating JSON reading and JSON writing data structures and operations. - **HTTP**: Non-allocating HTTP request and HTTP response data structures and operations. -- **Argument Validation**: The SDK validates function arguments and invokes a callback when validation fails. By default, this callback suspends the calling thread _forever_. However, you can override this behavior and, in fact, you can disable all argument validation to get smaller and faster code. See the [SDK Function Argument Validation](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#sdk-function-argument-validation) section of the `Azure Core` README for more information. +- **Argument Validation**: The SDK validates function arguments and invokes a callback when validation fails. By default, this callback suspends the calling thread _forever_. However, you can override this behavior and, in fact, you can disable all argument validation to get smaller and faster code. See the [SDK Function Argument Validation](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#sdk-function-argument-validation) section of the `Azure Core` README for more information. In addition to the above features, `Azure Core` provides features available to client libraries written to access other Azure services. Customers use these features indirectly by way of interacting with a client library. By providing these features in `Azure Core`, the client libraries built on top of us will share a common implementation and many features will behave identically across client libraries. For example, `Azure Core` offers a standard set of credential types and an HTTP pipeline with logging, retry, and telemetry policies. ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [https://cla.microsoft.com](https://cla.microsoft.com). @@ -499,8 +499,8 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft. Many people all over the world have helped make this project better. You'll want to check out: - [What are some good first issues for new contributors to the repo?](https://github.com/azure/azure-sdk-for-c/issues?q=is%3Aopen+is%3Aissue+label%3A%22up+for+grabs%22) -- [How to build and test your change](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md#developer-guide) -- [How you can make a change happen!](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md#pull-requests) +- [How to build and test your change](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md#developer-guide) +- [How you can make a change happen!](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md#pull-requests) ### Community @@ -512,4 +512,4 @@ Security issues and bugs should be reported privately, via email, to the Microso ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 4b6ff0c64d..85caef0c72 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -1,7 +1,7 @@ $Language = "c" $PackageRepository = "C" $packagePattern = "*.json" -$MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/c-packages.csv" +$MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/main/_data/releases/latest/c-packages.csv" $BlobStorageUrl = "https://azuresdkdocs.blob.core.windows.net/%24web?restype=container&comp=list&prefix=c%2F&delimiter=%2F" # Parse out package publishing information given a vcpkg format. @@ -19,7 +19,7 @@ function Get-c-PackageInfoFromPackageFile ($pkg, $workingDirectory) { $releaseNotes = Get-ChangeLogEntryAsString -ChangeLogLocation $changeLogLoc -VersionString $pkgVersion } - + $readmeContentLoc = @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "README.md")[0] if ($readmeContentLoc) { $readmeContent = Get-Content -Raw $readmeContentLoc diff --git a/eng/scripts/Update-SdkVersion.ps1 b/eng/scripts/Update-SdkVersion.ps1 index f10af804e8..5ea5f95282 100644 --- a/eng/scripts/Update-SdkVersion.ps1 +++ b/eng/scripts/Update-SdkVersion.ps1 @@ -3,7 +3,7 @@ Bumps up sdk version after release .DESCRIPTION -This script bumps up the sdk version found in az_version.h following conventions defined at https://github.com/Azure/azure-sdk/blob/master/docs/policies/releases.md#incrementing-after-release-c +This script bumps up the sdk version found in az_version.h following conventions defined at https://github.com/Azure/azure-sdk/blob/main/docs/policies/releases.md#incrementing-after-release-c We use the version number defined in AZ_SDK_VERSION_STRING, and then overwrite other #defines .PARAMETER NewVersionString diff --git a/samples/README.md b/samples/README.md index 5dfdf18c57..a6b2951a99 100644 --- a/samples/README.md +++ b/samples/README.md @@ -29,9 +29,9 @@ This section lists how-to guides for the most commonly used APIs and most common ### General How-To Guides -- [How to port the Azure SDK to another platform](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#porting-the-azure-sdk-to-another-platform) -- [How to configure, access, and analyze logging information](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/core#logging-sdk-operations) +- [How to port the Azure SDK to another platform](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#porting-the-azure-sdk-to-another-platform) +- [How to configure, access, and analyze logging information](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/core#logging-sdk-operations) ### Azure.IoT -- [IoT samples](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md) +- [IoT samples](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md) diff --git a/sdk/ci.yml b/sdk/ci.yml index b89d2d7d7e..9640fdd549 100644 --- a/sdk/ci.yml +++ b/sdk/ci.yml @@ -2,7 +2,6 @@ trigger: branches: include: - - master - main - feature/* - release/* @@ -12,7 +11,6 @@ trigger: pr: branches: include: - - master - main - feature/* - release/* diff --git a/sdk/docs/core/README.md b/sdk/docs/core/README.md index ce72e16a90..a5738c4103 100644 --- a/sdk/docs/core/README.md +++ b/sdk/docs/core/README.md @@ -12,11 +12,11 @@ The `Azure Core` library requires you to implement a few functions to provide pl ### Function Results -Many SDK functions return an `az_result` as defined in [inc/az_result.h](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/inc/azure/core/az_result.h) header file. An `az_result` is a 32-bit enum value. When a function succeeds, it typically returns AZ_OK. When a function fails, it returns an `az_result` symbol prefixed with `AZ_ERROR_`. A few functions return a reason for success; these symbols will be prefixed with `AZ_` but will **not** contain `ERROR` in the symbol. For functions that need to return an `az_result` and some other value; the other value is returned via an output parameter. If you simply want to know if an `az_result` value indicates generic success or failure, call either the `az_result_succeeded` or `az_result_failed` function, respectively. Both of these functions take an `az_result` value and return `true` or `false`. +Many SDK functions return an `az_result` as defined in [inc/az_result.h](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/inc/azure/core/az_result.h) header file. An `az_result` is a 32-bit enum value. When a function succeeds, it typically returns AZ_OK. When a function fails, it returns an `az_result` symbol prefixed with `AZ_ERROR_`. A few functions return a reason for success; these symbols will be prefixed with `AZ_` but will **not** contain `ERROR` in the symbol. For functions that need to return an `az_result` and some other value; the other value is returned via an output parameter. If you simply want to know if an `az_result` value indicates generic success or failure, call either the `az_result_succeeded` or `az_result_failed` function, respectively. Both of these functions take an `az_result` value and return `true` or `false`. ### Working with Spans -An `az_span` is a small data structure (defined in our [az_span.h](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/inc/azure/core/az_span.h) file) wrapping a byte buffer. Specifically, an `az_span` instance contains: +An `az_span` is a small data structure (defined in our [az_span.h](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/inc/azure/core/az_span.h) file) wrapping a byte buffer. Specifically, an `az_span` instance contains: - a byte pointer - an integer size @@ -72,7 +72,7 @@ There are many functions to manipulate `az_span` instances. You can slice (subse ### Strings -A string is a span of UTF-8 characters. It's not a zero-terminated string. Defined in [inc/az_span.h](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/inc/azure/core/az_span.h). +A string is a span of UTF-8 characters. It's not a zero-terminated string. Defined in [inc/az_span.h](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/inc/azure/core/az_span.h). ```c az_span hello_world = AZ_SPAN_FROM_STR("Hello world!"); @@ -82,7 +82,7 @@ az_span hello_world = AZ_SPAN_FROM_STR("Hello world!"); As our SDK performs operations, it can send log messages to a customer-defined callback. Customers can enable this to assist with debugging and diagnosing issues when leveraging our SDK code. -To enable logging, you must first write a callback function that our logging mechanism will invoke periodically with messages. The function signature must match this type definition (defined in the [az_log.h](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/inc/azure/core/az_log.h) file): +To enable logging, you must first write a callback function that our logging mechanism will invoke periodically with messages. The function signature must match this type definition (defined in the [az_log.h](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/inc/azure/core/az_log.h) file): ```C typedef void (*az_log_message_fn)(az_log_classification classification, az_span message); @@ -153,7 +153,7 @@ Also, if you define the `AZ_NO_PRECONDITION_CHECKING` symbol when compiling the ### Canceling an Operation -`Azure Core` provides a rich cancellation mechanism by way of its `az_context` type (defined in the [az_context.h](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/inc/azure/core/az_context.h) file). As your code executes and functions call other functions, a pointer to an `az_context` is passed as an argument through the functions. At any point, a function can create a new `az_context` specifying a parent `az_context` and a timeout period and then, this new `az_context` is passed down to more functions. When a parent `az_context` instance expires or is canceled, all of its children are canceled as well. +`Azure Core` provides a rich cancellation mechanism by way of its `az_context` type (defined in the [az_context.h](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/inc/azure/core/az_context.h) file). As your code executes and functions call other functions, a pointer to an `az_context` is passed as an argument through the functions. At any point, a function can create a new `az_context` specifying a parent `az_context` and a timeout period and then, this new `az_context` is passed down to more functions. When a parent `az_context` instance expires or is canceled, all of its children are canceled as well. There is a special singleton instance of the `az_context` type called `az_context_application`. This instance represents your entire application and this `az_context` instance never expires. It is common to use this instance as the ultimate root of all `az_context` instances. So then, as functions call other functions, these functions can create child `az_context` instances and pass the child down through the call tree. Imagine you have the following `az_context` tree: @@ -186,10 +186,10 @@ If you'd like to contribute to this library, please read the [contributing guide Azure SDK for Embedded C is licensed under the [MIT][azure_sdk_for_c_license] license. -[azure_sdk_for_c_contributing]: https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md -[azure_sdk_for_c_license]: https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE -[azure_sdk_for_c_contributing_developer_guide]: https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md#developer-guide -[azure_sdk_for_c_contributing_pull_requests]: https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md#pull-requests +[azure_sdk_for_c_contributing]: https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md +[azure_sdk_for_c_license]: https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE +[azure_sdk_for_c_contributing_developer_guide]: https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md#developer-guide +[azure_sdk_for_c_contributing_pull_requests]: https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md#pull-requests [azure_cli]: https://docs.microsoft.com/cli/azure [azure_pattern_circuit_breaker]: https://docs.microsoft.com/azure/architecture/patterns/circuit-breaker [azure_pattern_retry]: https://docs.microsoft.com/azure/architecture/patterns/retry diff --git a/sdk/docs/iot/README.md b/sdk/docs/iot/README.md index a324e716d0..015e8d7fcd 100644 --- a/sdk/docs/iot/README.md +++ b/sdk/docs/iot/README.md @@ -17,7 +17,7 @@ From a functional perspective, this means that the user's application code (not - Functions to parse incoming message topics, which populate structs with crucial message information. - Default values for MQTT connect keep alive and connection port. -To better understand the responsibilities of the user application code and the Embedded C SDK, please take a look at the [State Machine diagram](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md), which explains the high-level architecture, SDK components, and a clear view of SDK x Application responsibilities. +To better understand the responsibilities of the user application code and the Embedded C SDK, please take a look at the [State Machine diagram](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md), which explains the high-level architecture, SDK components, and a clear view of SDK x Application responsibilities. For more details about the Azure IoT Hub, see the following [Azure IoT Hub documentation](https://docs.microsoft.com/azure/iot-hub/). For more details about the Azure IoT Device Provisioning Service (DPS), see the [Azure IOT DPS documentation](https://docs.microsoft.com/azure/iot-dps/). @@ -30,7 +30,7 @@ Please view the API documentation [here](https://azuresdkdocs.blob.core.windows. ### Build -The Azure IoT library is compiled following the same steps listed on the root [Azure SDK for Embedded C README](https://github.com/Azure/azure-sdk-for-c/blob/master/README.md) documentation, under ["Getting Started Using the SDK"](https://github.com/Azure/azure-sdk-for-c/blob/master/README.md#getting-started-using-the-sdk). +The Azure IoT library is compiled following the same steps listed on the root [Azure SDK for Embedded C README](https://github.com/Azure/azure-sdk-for-c/blob/main/README.md) documentation, under ["Getting Started Using the SDK"](https://github.com/Azure/azure-sdk-for-c/blob/main/README.md#getting-started-using-the-sdk). The library targets made available via CMake are the following: @@ -40,19 +40,19 @@ The library targets made available via CMake are the following: ### Samples -View the [Azure Embedded C SDK IoT Samples README](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md) to learn how to run samples for the Azure Embedded C SDK IoT Hub Client and the Provisioning Clients. The README will provide general prerequisites, environment setup instructions, sample descriptions, as well as directions on how to build and run all the samples on either a Linux or Windows environment. +View the [Azure Embedded C SDK IoT Samples README](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md) to learn how to run samples for the Azure Embedded C SDK IoT Hub Client and the Provisioning Clients. The README will provide general prerequisites, environment setup instructions, sample descriptions, as well as directions on how to build and run all the samples on either a Linux or Windows environment. For more detailed, step-by-step guides to setup and run the IoT Hub certificate samples from scratch, refer to these documents: -- Linux: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Linux](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md) +- Linux: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Linux](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md) -- Windows: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Microsoft Windows](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md) +- Windows: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Microsoft Windows](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md) -- Realtek Ameba D: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Realtek AmebaD](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_realtek_amebaD/readme.md) +- Realtek Ameba D: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Realtek AmebaD](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_realtek_amebaD/readme.md) -- Espressif ESP8266: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Esp8266 NodeMCU](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_esp8266/readme.md) +- Espressif ESP8266: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Esp8266 NodeMCU](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_esp8266/readme.md) -- Espressif ESP32: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on ESP32](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_esp32/readme.md) +- Espressif ESP32: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on ESP32](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_esp32/readme.md) **Important Note on Linux and Windows Samples**: While Windows and Linux devices are not likely to be considered constrained, these samples enable developers to test the Azure SDK for Embedded C libraries, debug, and step through the code, even without a real device. We understand not everyone will have a real device to test and that sometimes these devices won't have debugging capabilities. @@ -91,7 +91,7 @@ The Pic24 sample includes both Hub and DPS services. The table below shows RAM/R | | Embedded C SDK size | | Total Size | | |---------|----------|---------|---------|--------- -|**Sample** | **Program/ROM** | **Data/RAM** | **Program/ROM** | **Data/RAM** | +|**Sample** | **Program/ROM** | **Data/RAM** | **Program/ROM** | **Data/RAM** | | PIC24 (Hub + DPS + IoT Plug and Play) | 26.15KB | 0 | 103.61KB | 10.57KB | PIC24 Telemetry only | 2.58KB | 0 | 74.16KB | 8.26KB @@ -105,9 +105,9 @@ These examples are scenario-focused and introduce you to the API calls for a few - [IoT Message Properties](#iot-message-properties) - [IoT Telemetry](#iot-telemetry) -General [coding patterns](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/coding_patterns.md) that are MQTT stack agnostic are also available to view. These patterns can give you an overview of the API calls and structure needed to use the Azure IoT Embedded C SDK features. +General [coding patterns](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/coding_patterns.md) that are MQTT stack agnostic are also available to view. These patterns can give you an overview of the API calls and structure needed to use the Azure IoT Embedded C SDK features. -For a more extensive demonstration of the API, please view and run the [sample code](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/), which uses Paho MQTT. +For a more extensive demonstration of the API, please view and run the [sample code](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/), which uses Paho MQTT. ### IoT Hub Client Initialization @@ -225,14 +225,14 @@ void my_telemetry_func(void) ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. \ No newline at end of file +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. \ No newline at end of file diff --git a/sdk/docs/iot/coding_patterns.md b/sdk/docs/iot/coding_patterns.md index f3e997ddcc..12fac494b7 100644 --- a/sdk/docs/iot/coding_patterns.md +++ b/sdk/docs/iot/coding_patterns.md @@ -4,9 +4,9 @@ This page introduces you to coding patterns that are MQTT stack agnostic. These examples will give you a general overview of the API calls and structure needed to use the Azure IoT Embedded C SDK features. -To view scenario-focused examples using the API calls, please view the [introductory examples](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/README.md#examples) on the Azure IoT Client README file. +To view scenario-focused examples using the API calls, please view the [introductory examples](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/README.md#examples) on the Azure IoT Client README file. -For a more extensive demonstration of the API, please view and run the [sample code](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/), which uses Paho MQTT. +For a more extensive demonstration of the API, please view and run the [sample code](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/), which uses Paho MQTT. ## Examples diff --git a/sdk/docs/platform/README.md b/sdk/docs/platform/README.md index 175eada359..23c7604b4c 100644 --- a/sdk/docs/platform/README.md +++ b/sdk/docs/platform/README.md @@ -24,7 +24,7 @@ The Azure SDK also provides empty HTTP adapter (`az_nohttp`). This transport all >Note: An `AZ_ERROR_DEPENDENCY_NOT_PROVIDED` will be returned from the `az_nohttp` transport APIs. -You can also implement your own HTTP transport adapter and use it. This allows you to use a different HTTP stack other than `libcurl`. Follow the instructions on [using your own HTTP stack implementation](https://github.com/Azure/azure-sdk-for-c/blob/master/README.md#using-your-own-http-stack-implementation). +You can also implement your own HTTP transport adapter and use it. This allows you to use a different HTTP stack other than `libcurl`. Follow the instructions on [using your own HTTP stack implementation](https://github.com/Azure/azure-sdk-for-c/blob/main/README.md#using-your-own-http-stack-implementation). ## Contributing @@ -36,6 +36,6 @@ If you'd like to contribute to this library, please read the [contributing guide Azure SDK for Embedded C is licensed under the [MIT][azure_sdk_for_c_license] license. -[azure_sdk_for_c_contributing]: https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md -[azure_sdk_for_c_license]: https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE -[azure_sdk_cmake_options]: https://github.com/Azure/azure-sdk-for-c/blob/master/README.md#cmake-options +[azure_sdk_for_c_contributing]: https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md +[azure_sdk_for_c_license]: https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE +[azure_sdk_cmake_options]: https://github.com/Azure/azure-sdk-for-c/blob/main/README.md#cmake-options diff --git a/sdk/samples/core/README.md b/sdk/samples/core/README.md index 27e3e9244c..01072f409f 100644 --- a/sdk/samples/core/README.md +++ b/sdk/samples/core/README.md @@ -28,6 +28,6 @@ This document explains samples and how to use them. This project welcomes contributions and suggestions. Find [more contributing][SDK_README_CONTRIBUTING] details here. -[SDK_README_CONTRIBUTING]: https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md +[SDK_README_CONTRIBUTING]: https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-c%2Fsdk%2Fcore%2Fcore%2Fsamples%2FREADME.png) diff --git a/sdk/samples/iot/README.md b/sdk/samples/iot/README.md index 44f51f7528..2014e69058 100644 --- a/sdk/samples/iot/README.md +++ b/sdk/samples/iot/README.md @@ -38,7 +38,7 @@ This document explains samples for the Azure Embedded C SDK IoT Hub Client and Device Provisioning Client. -Samples are designed to highlight the function calls required to connect with the Azure IoT Hub or the Azure IoT Hub Device Provisioning Service (DPS). These calls illustrate the happy path of the [mqtt state machine](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md). As a result, **these samples are NOT designed to be used as production-level code**. Production code needs to incorporate other elements, such as connection retries and more extensive error-handling, which these samples do not include. These samples also utilize OpenSSL, which is **NOT recommended to use in production-level code on Windows or macOS**. +Samples are designed to highlight the function calls required to connect with the Azure IoT Hub or the Azure IoT Hub Device Provisioning Service (DPS). These calls illustrate the happy path of the [mqtt state machine](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md). As a result, **these samples are NOT designed to be used as production-level code**. Production code needs to incorporate other elements, such as connection retries and more extensive error-handling, which these samples do not include. These samples also utilize OpenSSL, which is **NOT recommended to use in production-level code on Windows or macOS**. The samples' instructions include specifics for both Windows and Linux based systems. For Windows, the command line examples are based on PowerShell. The Linux examples are tailored to Debian/Ubuntu environments. Samples are also designed to work on macOS systems, but the instructions do not yet include specific command line examples for this environment. While Windows and Linux devices are not likely to be considered constrained, these samples enable developers to test the Azure SDK for Embedded C libraries, debug, and step through the code, even without a real device. We understand not everyone will have a real device to test and that sometimes these devices won't have debugging capabilities. @@ -46,17 +46,17 @@ The samples' instructions include specifics for both Windows and Linux based sys More detailed step-by-step guides on how to run an IoT Hub Client sample from scratch can be found below: -- Linux: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Linux](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md) +- Linux: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Linux](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md) -- Windows: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Microsoft Windows](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md) +- Windows: [How to Setup and Run Azure SDK for Embedded C IoT Hub Certificate Samples on Microsoft Windows](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md) -- Realtek Ameba D: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Realtek AmebaD](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_realtek_amebaD/readme.md) +- Realtek Ameba D: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Realtek AmebaD](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_realtek_amebaD/readme.md) -- Espressif ESP8266: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Esp8266 NodeMCU](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_esp8266/readme.md) +- Espressif ESP8266: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on Esp8266 NodeMCU](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_esp8266/readme.md) -- Espressif ESP32: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on ESP32](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_esp32/readme.md) +- Espressif ESP32: [How to Setup and Run Azure SDK for Embedded C IoT Hub Client on ESP32](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_esp32/readme.md) -To view scenario-focused examples using the API calls, please view the Azure IoT Client [introductory examples](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/README.md#examples). General [coding patterns](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/coding_patterns.md) that are MQTT stack agnostic are also available to view. +To view scenario-focused examples using the API calls, please view the Azure IoT Client [introductory examples](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/README.md#examples). General [coding patterns](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/coding_patterns.md) that are MQTT stack agnostic are also available to view. ## Github Codespaces @@ -105,7 +105,7 @@ To run the samples, ensure you have the following programs and tools installed o
Instructions:

- NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/master/eng/vcpkg-commit.txt). + NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt). Linux: @@ -333,9 +333,9 @@ Set the following environment variables for all samples: 2. Set the trust pem filepath. **Only when testing on Windows or OSX.** _Important:_ We recommend using a managed trusted store for production deployments. Paho/OpenSSL on Windows is meant for testing purposes only. - + Create a PEM certificate file based store by concatenating the following files: - + * RSA Certificate Authority Roots: - [Baltimore CyberTrust Root](https://cacerts.digicert.com/BaltimoreCyberTrustRoot.crt.pem) @@ -345,7 +345,7 @@ Set the following environment variables for all samples: * ECC Certificate Authority Roots - [DigiCert Global Root G3](https://cacerts.digicert.com/DigiCertGlobalRootG3.crt.pem) - [Microsoft ECC Root Certificate Authority 2017](https://www.microsoft.com/pkiops/certs/Microsoft%20ECC%20Root%20Certificate%20Authority%202017.crt) - + Make sure the files are in PEM format. If they are not, use `openssl x509 -inform DER -outform PEM -in my_certificate.crt -out my_certificate.pem` to convert them to PEM format. Concatenate all the files into CAStore.pem. Configure the AZ_IOT_DEVICE_X509_TRUST_PEM_FILE_PATH to point to this PEM file. @@ -533,7 +533,7 @@ This section provides an overview of the different samples available to run and - *Executable:* `paho_iot_hub_c2d_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_c2d_sample.c) receives incoming cloud-to-device (C2D) messages sent from the Azure IoT Hub to the device. It will successfully receive up to 5 messages sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_c2d_sample.c) receives incoming cloud-to-device (C2D) messages sent from the Azure IoT Hub to the device. It will successfully receive up to 5 messages sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used.

How to interact with the C2D sample:

@@ -547,7 +547,7 @@ This section provides an overview of the different samples available to run and - *Executable:* `paho_iot_hub_methods_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_methods_sample.c) receives incoming method commands invoked from the the Azure IoT Hub to the device. It will successfully receive up to 5 method commands sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_methods_sample.c) receives incoming method commands invoked from the the Azure IoT Hub to the device. It will successfully receive up to 5 method commands sent from the service. If a timeout occurs while waiting for a message, the sample will exit. X509 authentication is used.

How to interact with the Methods sample:

@@ -569,19 +569,19 @@ This section provides an overview of the different samples available to run and - *Executable:* `paho_iot_hub_telemetry_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_telemetry_sample.c) sends five telemetry messages to the Azure IoT Hub. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_telemetry_sample.c) sends five telemetry messages to the Azure IoT Hub. X509 authentication is used. ### IoT Hub SAS Telemetry Sample - *Executable:* `paho_iot_hub_sas_telemetry_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_sas_telemetry_sample.c) sends five telemetry messages to the Azure IoT Hub. SAS authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_sas_telemetry_sample.c) sends five telemetry messages to the Azure IoT Hub. SAS authentication is used. ### IoT Hub Twin Sample - *Executable:* `paho_iot_hub_twin_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_twin_sample.c) utilizes the Azure IoT Hub to get the device twin document, send a reported property message, and receive up to 5 desired property messages. If a timeout occurs while waiting for a message from the Azure IoT Hub, the sample will exit. Upon receiving a desired property message, the sample will update the twin property locally and send a reported property message back to the service. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_twin_sample.c) utilizes the Azure IoT Hub to get the device twin document, send a reported property message, and receive up to 5 desired property messages. If a timeout occurs while waiting for a message from the Azure IoT Hub, the sample will exit. Upon receiving a desired property message, the sample will update the twin property locally and send a reported property message back to the service. X509 authentication is used.

How to interact with the Twin sample:

@@ -607,7 +607,7 @@ This section provides an overview of the different samples available to run and - *Executable:* `paho_iot_hub_pnp_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_pnp_sample.c) connects an IoT Plug and Play enabled device (a thermostat) with the Digital Twin Model ID (DTMI) detailed [here](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/samples/Thermostat.json). If a timeout occurs while waiting for a message from the Azure IoT Explorer, the sample will continue. If 3 timeouts occur consecutively, the sample will disconnect. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_pnp_sample.c) connects an IoT Plug and Play enabled device (a thermostat) with the Digital Twin Model ID (DTMI) detailed [here](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/samples/Thermostat.json). If a timeout occurs while waiting for a message from the Azure IoT Explorer, the sample will continue. If 3 timeouts occur consecutively, the sample will disconnect. X509 authentication is used. To interact with this sample, **you must use the Azure IoT Explorer**. @@ -697,7 +697,7 @@ This section provides an overview of the different samples available to run and - *Executable:* `paho_iot_hub_pnp_component_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_hub_pnp_component_sample.c) extends the IoT Hub Plug and Play Sample above to mimic a Temperature Controller and connects the IoT Plug and Play enabled device (the Temperature Controller) with the Digital Twin Model ID (DTMI) detailed [here](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/samples/TemperatureController.json). If a timeout occurs while waiting for a message from the Azure IoT Explorer, the sample will continue. If 3 timeouts occur consecutively, the sample will disconnect. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_hub_pnp_component_sample.c) extends the IoT Hub Plug and Play Sample above to mimic a Temperature Controller and connects the IoT Plug and Play enabled device (the Temperature Controller) with the Digital Twin Model ID (DTMI) detailed [here](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/samples/TemperatureController.json). If a timeout occurs while waiting for a message from the Azure IoT Explorer, the sample will continue. If 3 timeouts occur consecutively, the sample will disconnect. X509 authentication is used. This Temperature Controller is made up of the following components: @@ -847,13 +847,13 @@ This section provides an overview of the different samples available to run and - *Executable:* `paho_iot_provisioning_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_provisioning_sample.c) registers a device with the Azure IoT Device Provisioning Service. It will wait to receive the registration status before disconnecting. X509 authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_provisioning_sample.c) registers a device with the Azure IoT Device Provisioning Service. It will wait to receive the registration status before disconnecting. X509 authentication is used. ### IoT Provisioning SAS Sample - *Executable:* `paho_iot_provisioning_sas_sample` - This [sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/paho_iot_provisioning_sas_sample.c) registers a device with the Azure IoT Device Provisioning Service. It will wait to receive the registration status before disconnecting. SAS authentication is used. + This [sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/paho_iot_provisioning_sas_sample.c) registers a device with the Azure IoT Device Provisioning Service. It will wait to receive the registration status before disconnecting. SAS authentication is used. ## Using IoT Hub with an ECC Server Certificate Chain To work with the new Azure Cloud ECC server certificate chain, the TLS stack must be configured to prevent RSA cipher-suites from being advertised, as described [here](https://docs.microsoft.com/azure/iot-hub/iot-hub-tls-support#elliptic-curve-cryptography-ecc-server-tls-certificate-preview). @@ -869,21 +869,21 @@ mqtt_ssl_options.enabledCipherSuites = "ECDH+ECDSA+HIGH"; Start using the Azure Embedded C SDK IoT Clients in your solutions! - A general overview of the Embedded C SDK and additional background on running samples can be found in the [Azure SDK for Embedded C README](https://github.com/Azure/azure-sdk-for-c#azure-sdk-for-embedded-c). -- More SDK details pertaining to the Azure IoT Client library can be found in the [Azure IoT Client README](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/iot#azure-iot-clients). -- The [Azure IoT Client MQTT State Machine](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md) provides a high-level architecture and API information. +- More SDK details pertaining to the Azure IoT Client library can be found in the [Azure IoT Client README](https://github.com/Azure/azure-sdk-for-c/tree/main/sdk/docs/iot#azure-iot-clients). +- The [Azure IoT Client MQTT State Machine](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md) provides a high-level architecture and API information. - For extensive documentation on Azure IoT Hub, see the [Microsoft API reference documentation](https://docs.microsoft.com/azure/iot-hub/about-iot-hub). - For extensive documentation on Azure IoT Hub Device Provisioning Service, see the [Microsoft API reference documentation](https://docs.microsoft.com/azure/iot-dps/). ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. diff --git a/sdk/samples/iot/aziot_esp32/readme.md b/sdk/samples/iot/aziot_esp32/readme.md index d7d06c7384..7b2c722b28 100644 --- a/sdk/samples/iot/aziot_esp32/readme.md +++ b/sdk/samples/iot/aziot_esp32/readme.md @@ -78,7 +78,7 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with On Windows: Use the PowerShell commands below. ```powershell - PS C:\> Invoke-WebRequest -Uri https://raw.githubusercontent.com/Azure/azure-sdk-for-c/master/sdk/samples/iot/aziot_esp32/New-ArduinoZipLibrary.ps1 -OutFile New-ArduinoZipLibrary.ps1 + PS C:\> Invoke-WebRequest -Uri https://raw.githubusercontent.com/Azure/azure-sdk-for-c/main/sdk/samples/iot/aziot_esp32/New-ArduinoZipLibrary.ps1 -OutFile New-ArduinoZipLibrary.ps1 PS C:\> .\New-ArduinoZipLibrary.ps1 ``` @@ -97,14 +97,14 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with On Linux: ```bash - $ wget https://raw.githubusercontent.com/Azure/azure-sdk-for-c/master/sdk/samples/iot/aziot_esp32/generate_arduino_zip_library.sh + $ wget https://raw.githubusercontent.com/Azure/azure-sdk-for-c/main/sdk/samples/iot/aziot_esp32/generate_arduino_zip_library.sh $ chmod 777 generate_arduino_zip_library.sh $ ./generate_arduino_zip_library.sh ``` This will create a local file named `azure-sdk-for-c.zip` containing the entire [Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c) repository as an Arduino library. - NOTE: If you are using WSL, do not run these commands from the Windows system drive (e.g. `/mnt/c/`). + NOTE: If you are using WSL, do not run these commands from the Windows system drive (e.g. `/mnt/c/`). 2. Run the Arduino IDE. @@ -140,7 +140,7 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with ./create_trusted_cert_header.sh ``` - - Open the [ESP32 sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_esp32) (from the local clone) on the Arduino IDE. + - Open the [ESP32 sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_esp32) (from the local clone) on the Arduino IDE. - Edit the following parameters in `iot_configs.h`, filling in your own information: @@ -306,18 +306,18 @@ For other regions (and private cloud environments), please use the appropriate r ### Additional Information -For important information and additional guidance about certificates, please refer to [this blog post](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-changes-are-coming-and-why-you-should-care/ba-p/1658456) from the security team. +For important information and additional guidance about certificates, please refer to [this blog post](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-changes-are-coming-and-why-you-should-care/ba-p/1658456) from the security team. ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. diff --git a/sdk/samples/iot/aziot_esp8266/readme.md b/sdk/samples/iot/aziot_esp8266/readme.md index 9f14f9b56d..d7156b5170 100644 --- a/sdk/samples/iot/aziot_esp8266/readme.md +++ b/sdk/samples/iot/aziot_esp8266/readme.md @@ -80,7 +80,7 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with On Windows: Use the PowerShell commands below. ```powershell - PS C:\> Invoke-WebRequest -Uri https://raw.githubusercontent.com/Azure/azure-sdk-for-c/master/sdk/samples/iot/aziot_esp8266/New-ArduinoZipLibrary.ps1 -OutFile New-ArduinoZipLibrary.ps1 + PS C:\> Invoke-WebRequest -Uri https://raw.githubusercontent.com/Azure/azure-sdk-for-c/main/sdk/samples/iot/aziot_esp8266/New-ArduinoZipLibrary.ps1 -OutFile New-ArduinoZipLibrary.ps1 PS C:\> .\New-ArduinoZipLibrary.ps1 ``` @@ -99,14 +99,14 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with On Linux: ```bash - $ wget https://raw.githubusercontent.com/Azure/azure-sdk-for-c/master/sdk/samples/iot/aziot_esp8266/generate_arduino_zip_library.sh + $ wget https://raw.githubusercontent.com/Azure/azure-sdk-for-c/main/sdk/samples/iot/aziot_esp8266/generate_arduino_zip_library.sh $ chmod 777 generate_arduino_zip_library.sh $ ./generate_arduino_zip_library.sh ``` This will create a local file named `azure-sdk-for-c.zip` containing the entire [Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c) repository as an Arduino library. - NOTE: If you are using WSL, do not run these commands from the Windows system drive (e.g. `/mnt/c/`). + NOTE: If you are using WSL, do not run these commands from the Windows system drive (e.g. `/mnt/c/`). 2. Run the Arduino IDE. @@ -148,7 +148,7 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with ./create_trusted_cert_header.sh ``` - - Open the [ESP8266 sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_esp8266) (from the local clone) on the Arduino IDE. + - Open the [ESP8266 sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_esp8266) (from the local clone) on the Arduino IDE. - Edit the following parameters in `iot_configs.h`, filling in your own information: @@ -314,18 +314,18 @@ For other regions (and private cloud environments), please use the appropriate r ### Additional Information -For important information and additional guidance about certificates, please refer to [this blog post](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-changes-are-coming-and-why-you-should-care/ba-p/1658456) from the security team. +For important information and additional guidance about certificates, please refer to [this blog post](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-changes-are-coming-and-why-you-should-care/ba-p/1658456) from the security team. ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. diff --git a/sdk/samples/iot/aziot_realtek_amebaD/readme.md b/sdk/samples/iot/aziot_realtek_amebaD/readme.md index 2630bfc9d5..f2ff84a93b 100644 --- a/sdk/samples/iot/aziot_realtek_amebaD/readme.md +++ b/sdk/samples/iot/aziot_realtek_amebaD/readme.md @@ -84,7 +84,7 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with On Windows: Use the PowerShell commands below. ```powershell - PS C:\> Invoke-WebRequest -Uri https://raw.githubusercontent.com/Azure/azure-sdk-for-c/master/sdk/samples/iot/aziot_realtek_amebaD/New-ArduinoZipLibrary.ps1 -OutFile New-ArduinoZipLibrary.ps1 + PS C:\> Invoke-WebRequest -Uri https://raw.githubusercontent.com/Azure/azure-sdk-for-c/main/sdk/samples/iot/aziot_realtek_amebaD/New-ArduinoZipLibrary.ps1 -OutFile New-ArduinoZipLibrary.ps1 PS C:\> .\New-ArduinoZipLibrary.ps1 ``` @@ -103,14 +103,14 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with On Linux: ```bash - $ wget https://raw.githubusercontent.com/Azure/azure-sdk-for-c/master/sdk/samples/iot/aziot_realtek_amebaD/generate_arduino_zip_library.sh + $ wget https://raw.githubusercontent.com/Azure/azure-sdk-for-c/main/sdk/samples/iot/aziot_realtek_amebaD/generate_arduino_zip_library.sh $ chmod 777 generate_arduino_zip_library.sh $ ./generate_arduino_zip_library.sh ``` This will create a local file named `azure-sdk-for-c.zip` containing the entire [Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c) repository as an Arduino library. - NOTE: If you are using WSL, do not run these commands from the Windows system drive (e.g. `/mnt/c/`). + NOTE: If you are using WSL, do not run these commands from the Windows system drive (e.g. `/mnt/c/`). 2. Run the Arduino IDE. @@ -152,7 +152,7 @@ _The following was run on Windows 10 and Ubuntu Desktop 20.04 environments, with ./create_trusted_cert_header.sh ``` - - Open the [Realtek AmebaD sample](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/aziot_realtek_amebaD) (from the local clone) on the Arduino IDE. + - Open the [Realtek AmebaD sample](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/aziot_realtek_amebaD) (from the local clone) on the Arduino IDE. - Edit the following parameters in `iot_configs.h`, filling in your own information: @@ -261,18 +261,18 @@ For other regions (and private cloud environments), please use the appropriate r ### Additional Information -For important information and additional guidance about certificates, please refer to [this blog post](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-changes-are-coming-and-why-you-should-care/ba-p/1658456) from the security team. +For important information and additional guidance about certificates, please refer to [this blog post](https://techcommunity.microsoft.com/t5/internet-of-things/azure-iot-tls-changes-are-coming-and-why-you-should-care/ba-p/1658456) from the security team. ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. diff --git a/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md b/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md index 0d5a518c18..9fc187ca7c 100644 --- a/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md +++ b/sdk/samples/iot/docs/how_to_iot_hub_samples_linux.md @@ -21,7 +21,7 @@ This is a step-by-step guide of how to start from scratch and get the Azure SDK for Embedded C IoT Hub Certificate Samples running on Linux. -Samples are designed to highlight the function calls required to connect with the Azure IoT Hub. These calls illustrate the happy path of the [mqtt state machine](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md). As a result, **these samples are NOT designed to be used as production-level code**. Production code needs to incorporate other elements, such as connection retries and more extensive error-handling, which these samples do not include. +Samples are designed to highlight the function calls required to connect with the Azure IoT Hub. These calls illustrate the happy path of the [mqtt state machine](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md). As a result, **these samples are NOT designed to be used as production-level code**. Production code needs to incorporate other elements, such as connection retries and more extensive error-handling, which these samples do not include. For Linux, the command line examples are tailored to Debian/Ubuntu environments. While Linux devices are not likely to be considered constrained, these samples enable developers to test the Azure SDK for Embedded C libraries, debug, and step through the code, even without a real device. We understand not everyone will have a real device to test and that sometimes these devices won't have debugging capabilities. @@ -53,7 +53,7 @@ To run the samples, ensure you have the following programs and tools installed o 1. Install Microsoft [vcpkg](https://github.com/microsoft/vcpkg) package manager and [Eclipse Paho MQTT C client](https://www.eclipse.org/paho/). This installation may take an extended amount of time (~15-20 minutes). - NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/master/eng/vcpkg-commit.txt). + NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt). ```bash cd ~ # Run this command from any directory to go to your user home directory. @@ -224,48 +224,48 @@ To run the samples, ensure you have the following programs and tools installed o - *Executable:* `paho_iot_hub_c2d_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-c2d-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-c2d-sample). ### IoT Hub Methods Sample - *Executable:* `paho_iot_hub_methods_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-methods-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-methods-sample). ### IoT Hub Telemetry Sample - *Executable:* `paho_iot_hub_telemetry_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-telemetry-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-telemetry-sample). ### IoT Hub Twin Sample - *Executable:* `paho_iot_hub_twin_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-twin-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-twin-sample). ### IoT Hub Plug and Play Sample - *Executable:* `paho_iot_hub_pnp_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-plug-and-play-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-plug-and-play-sample). ### IoT Hub Plug and Play Multiple Component Sample - *Executable:* `paho_iot_hub_pnp_component_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-plug-and-play-multiple-component-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-plug-and-play-multiple-component-sample). ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license. diff --git a/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md b/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md index a876929121..660eb2bb92 100644 --- a/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md +++ b/sdk/samples/iot/docs/how_to_iot_hub_samples_windows.md @@ -21,7 +21,7 @@ This is a step-by-step guide of how to start from scratch and get the Azure SDK for Embedded C IoT Hub Certificate Samples running on Microsoft Windows. -Samples are designed to highlight the function calls required to connect with the Azure IoT Hub. These calls illustrate the happy path of the [mqtt state machine](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md). As a result, **these samples are NOT designed to be used as production-level code**. Production code needs to incorporate other elements, such as connection retries and more extensive error-handling, which these samples do not include. These samples also utilize OpenSSL, which is **NOT recommended to use in production-level code on Windows or macOS**. +Samples are designed to highlight the function calls required to connect with the Azure IoT Hub. These calls illustrate the happy path of the [mqtt state machine](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md). As a result, **these samples are NOT designed to be used as production-level code**. Production code needs to incorporate other elements, such as connection retries and more extensive error-handling, which these samples do not include. These samples also utilize OpenSSL, which is **NOT recommended to use in production-level code on Windows or macOS**. For Windows, the command line examples are based on PowerShell. While Windows devices are not likely to be considered constrained, these samples enable developers to test the Azure SDK for Embedded C libraries, debug, and step through the code, even without a real device. We understand not everyone will have a real device to test and that sometimes these devices won't have debugging capabilities. @@ -50,7 +50,7 @@ To run the samples, ensure you have the following programs and tools installed o 1. From PowerShell, install Microsoft [vcpkg](https://github.com/microsoft/vcpkg) package manager and [Eclipse Paho MQTT C client](https://www.eclipse.org/paho/). This installation may take an extended amount of time (~15-20 minutes). - NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/master/eng/vcpkg-commit.txt). + NOTE: For the correct vcpkg commit, see [vcpkg-commit.txt](https://github.com/Azure/azure-sdk-for-c/blob/main/eng/vcpkg-commit.txt). ```powershell PS C:\> git clone https://github.com/Microsoft/vcpkg.git @@ -226,48 +226,48 @@ To run the samples, ensure you have the following programs and tools installed o - *Executable:* `paho_iot_hub_c2d_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-c2d-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-c2d-sample). ### IoT Hub Methods Sample - *Executable:* `paho_iot_hub_methods_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-methods-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-methods-sample). ### IoT Hub Telemetry Sample - *Executable:* `paho_iot_hub_telemetry_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-telemetry-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-telemetry-sample). ### IoT Hub Twin Sample - *Executable:* `paho_iot_hub_twin_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-twin-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-twin-sample). ### IoT Hub Plug and Play Sample - *Executable:* `paho_iot_hub_pnp_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-plug-and-play-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-plug-and-play-sample). ### IoT Hub Plug and Play Multiple Component Sample - *Executable:* `paho_iot_hub_pnp_component_sample` -For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md#iot-hub-plug-and-play-multiple-component-sample). +For the sample description and interaction instructions, please go [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/samples/iot/README.md#iot-hub-plug-and-play-multiple-component-sample). ## Troubleshooting -- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/docs/iot/mqtt_state_machine.md#error-policy). +- The error policy for the Embedded C SDK client library is documented [here](https://github.com/Azure/azure-sdk-for-c/blob/main/sdk/docs/iot/mqtt_state_machine.md#error-policy). - File an issue via [Github Issues](https://github.com/Azure/azure-sdk-for-c/issues/new/choose). - Check [previous questions](https://stackoverflow.com/questions/tagged/azure+c) or ask new ones on StackOverflow using the `azure` and `c` tags. ## Contributing -This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/master/CONTRIBUTING.md). +This project welcomes contributions and suggestions. Find more contributing details [here](https://github.com/Azure/azure-sdk-for-c/blob/main/CONTRIBUTING.md). ### License -Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/master/LICENSE) license. +Azure SDK for Embedded C is licensed under the [MIT](https://github.com/Azure/azure-sdk-for-c/blob/main/LICENSE) license.