Remove trailing white space and insert final new lines. (#1242)
* Remove trailing whitespace and insert final new lines. * Revert "Remove trailing whitespace and insert final new lines." This reverts commit1c6539a6ca
. * Remove trailing whitespace, insert final new lines, and consistently use LF. * Revert "Remove trailing whitespace and insert final new lines." This reverts commit1c6539a6ca
. * Remove trailing whitespace and insert final new lines, leaving end of lines as default. * Normalize line endings. * Fix header guard. * Run clang format. * Re-run editor config.
This commit is contained in:
Родитель
de6e2a7c5e
Коммит
f38f6ed374
|
@ -0,0 +1,11 @@
|
|||
# editorconfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Default settings:
|
||||
# A newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
|
@ -52,4 +52,4 @@
|
|||
"preLaunchTask": "build",
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
"command": "cd Debug && rm -rf * && cmake -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=ON -DUNIT_TESTING_MOCK_ENABLED=ON .. && make"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,4 +37,4 @@
|
|||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ are met:
|
|||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
|
|
|
@ -200,7 +200,7 @@ The following CMake options are available for adding/removing project features.
|
|||
i.e. cmake -DTRANSPORT_CURL=ON ..
|
||||
|
||||
### Consume SDK for C as Dependency with CMake
|
||||
Azure SDK for C can be automatically checked out by cmake and become a build dependency. This is done by using [FetchContent](https://cmake.org/cmake/help/v3.11/module/FetchContent.html).
|
||||
Azure SDK for C can be automatically checked out by cmake and become a build dependency. This is done by using [FetchContent](https://cmake.org/cmake/help/v3.11/module/FetchContent.html).
|
||||
|
||||
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.
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Instead, please report them to the Microsoft Security Response Center (MSRC) at
|
|||
|
||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc).
|
||||
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
||||
|
||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#
|
||||
# Where ``my_test`` is the name of the test, ``my_test.c`` and
|
||||
# ``other_source.c`` are sources for the binary, ``-g -Wall`` are compiler
|
||||
# options to be used, ``-Wl,--enable-syscall-fixup`` is an option passed to the linker,
|
||||
# options to be used, ``-Wl,--enable-syscall-fixup`` is an option passed to the linker,
|
||||
# ``PRIVATE_ACCESS`` is ON to let tests access private layer from az_core and ``LINK_TAGETS```
|
||||
# list all the cmake tagets to link to
|
||||
#
|
||||
|
@ -120,7 +120,7 @@ function(ADD_CMOCKA_TEST _TARGET_NAME)
|
|||
# link to user defined
|
||||
target_link_libraries(${_TARGET_NAME}
|
||||
PRIVATE ${CMOCKA_LIB} ${_add_cmocka_test_LINK_TARGETS} ${MATH_LIB_UNIX}
|
||||
)
|
||||
)
|
||||
else()
|
||||
# link against az_core by default
|
||||
target_link_libraries(${_TARGET_NAME}
|
||||
|
@ -147,7 +147,7 @@ function(ADD_CMOCKA_TEST _TARGET_NAME)
|
|||
endif()
|
||||
|
||||
target_include_directories(${_TARGET_NAME} PRIVATE ${CMOCKA_INCLUDE_DIR})
|
||||
|
||||
|
||||
if (DEFINED _add_cmocka_test_PRIVATE_ACCESS)
|
||||
target_include_directories(${_TARGET_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/sdk/src/azure/core/)
|
||||
endif()
|
||||
|
|
|
@ -9,19 +9,19 @@ macro(create_code_coverage_targets code_cov_target)
|
|||
if(DEFINED ENV{AZ_SDK_CODE_COV} AND CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
APPEND_COVERAGE_COMPILER_FLAGS()
|
||||
|
||||
|
||||
# Basic coverage using lcov (gcc integrated)
|
||||
setup_target_for_coverage_lcov(NAME ${code_cov_target}_cov
|
||||
EXECUTABLE ${code_cov_target}_test
|
||||
EXCLUDE ${COV_EXCLUDE}
|
||||
LCOV_ARGS --rc lcov_branch_coverage=1)
|
||||
|
||||
|
||||
# HTML and XML - Coverage using gcovr (Needs to be installed into system)
|
||||
setup_target_for_coverage_gcovr_html(NAME ${code_cov_target}_cov_html EXECUTABLE ${code_cov_target}_test)
|
||||
setup_target_for_coverage_gcovr_xml(NAME ${code_cov_target}_cov_xml EXECUTABLE ${code_cov_target}_test)
|
||||
|
||||
# add project to coverage projects for printing
|
||||
file(APPEND ${CMAKE_BINARY_DIR}/coverage_targets.txt " ${code_cov_target}_cov_xml")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
|
@ -17,4 +17,4 @@ else()
|
|||
endif()
|
||||
|
||||
add_compile_options(-Wall -Wextra -pedantic ${WARNINGS_AS_ERRORS_FLAG} -Wcast-qual -Wunused -Wuninitialized -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Wlogical-op -Wfloat-equal)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -11,29 +11,29 @@
|
|||
</tab>
|
||||
<tab type="interfaces" visible="yes" title="">
|
||||
<tab type="interfacelist" visible="yes" title="" intro=""/>
|
||||
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="classes" visible="yes" title="">
|
||||
<tab type="classlist" visible="yes" title="" intro=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="hierarchy" visible="yes" title="" intro=""/>
|
||||
<tab type="classmembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="structs" visible="yes" title="">
|
||||
<tab type="structlist" visible="yes" title="" intro=""/>
|
||||
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
</tab>
|
||||
<tab type="exceptions" visible="yes" title="">
|
||||
<tab type="exceptionlist" visible="yes" title="" intro=""/>
|
||||
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="files" visible="yes" title="">
|
||||
<tab type="filelist" visible="yes" title="" intro=""/>
|
||||
<tab type="globals" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="examples" visible="yes" title="" intro=""/>
|
||||
<tab type="examples" visible="yes" title="" intro=""/>
|
||||
</navindex>
|
||||
|
||||
<!-- Layout definition for a class page -->
|
||||
|
|
|
@ -171,11 +171,11 @@ a.elRef {
|
|||
}
|
||||
|
||||
a.code, a.code:visited, a.line, a.line:visited {
|
||||
color: #4665A2;
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
|
||||
color: #4665A2;
|
||||
color: #4665A2;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
@ -361,7 +361,7 @@ p.formulaDsp {
|
|||
}
|
||||
|
||||
img.formulaDsp {
|
||||
|
||||
|
||||
}
|
||||
|
||||
img.formulaInl, img.inline {
|
||||
|
@ -419,20 +419,20 @@ span.charliteral {
|
|||
color: #008080
|
||||
}
|
||||
|
||||
span.vhdldigit {
|
||||
color: #ff00ff
|
||||
span.vhdldigit {
|
||||
color: #ff00ff
|
||||
}
|
||||
|
||||
span.vhdlchar {
|
||||
color: #000000
|
||||
span.vhdlchar {
|
||||
color: #000000
|
||||
}
|
||||
|
||||
span.vhdlkeyword {
|
||||
color: #700070
|
||||
span.vhdlkeyword {
|
||||
color: #700070
|
||||
}
|
||||
|
||||
span.vhdllogic {
|
||||
color: #ff0000
|
||||
span.vhdllogic {
|
||||
color: #ff0000
|
||||
}
|
||||
|
||||
blockquote {
|
||||
|
@ -657,9 +657,9 @@ table.memberdecls {
|
|||
}
|
||||
|
||||
.memdoc, dl.reflist dd {
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
border-bottom: 1px solid #A8B8D9;
|
||||
border-left: 1px solid #A8B8D9;
|
||||
border-right: 1px solid #A8B8D9;
|
||||
padding: 6px 10px 2px 10px;
|
||||
background-color: #FBFCFD;
|
||||
border-top-width: 0;
|
||||
|
@ -711,18 +711,18 @@ dl.reflist dd {
|
|||
.params, .retval, .exception, .tparams {
|
||||
margin-left: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
.params .paramtype, .tparams .paramtype {
|
||||
font-style: italic;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.params .paramdir, .tparams .paramdir {
|
||||
font-family: "courier new",courier,monospace;
|
||||
vertical-align: top;
|
||||
|
@ -978,8 +978,8 @@ table.fieldtable {
|
|||
|
||||
.fieldtable td.fielddoc p:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fieldtable td.fielddoc p:last-child {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
@ -1054,7 +1054,7 @@ table.fieldtable {
|
|||
color: #283A5D;
|
||||
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
text-decoration: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navpath li.navelem a:hover
|
||||
|
@ -1083,7 +1083,7 @@ div.summary
|
|||
padding-right: 5px;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
div.summary a
|
||||
{
|
||||
|
@ -1098,7 +1098,7 @@ table.classindex
|
|||
margin-right: 3%;
|
||||
width: 94%;
|
||||
border: 0;
|
||||
border-spacing: 0;
|
||||
border-spacing: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
@ -1278,12 +1278,12 @@ dl.section dd {
|
|||
vertical-align: bottom;
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
|
||||
#projectlogo img
|
||||
{
|
||||
{
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
|
||||
#projectalign
|
||||
{
|
||||
vertical-align: middle;
|
||||
|
@ -1432,7 +1432,7 @@ div.toc ul {
|
|||
list-style: none outside none;
|
||||
border: medium none;
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
div.toc li.level1 {
|
||||
margin-left: 0px;
|
||||
|
@ -1787,11 +1787,10 @@ table.DocNodeLTR {
|
|||
tt, code, kbd, samp
|
||||
{
|
||||
display: inline-block;
|
||||
direction:ltr;
|
||||
direction:ltr;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
u {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,4 +53,3 @@ copy_files(args.AssetsPath, args.PackagePath)
|
|||
|
||||
message('Invoking Doxygen')
|
||||
invoke_doxygen(args.DoxygenPath, args.PackagePath)
|
||||
|
||||
|
|
|
@ -63,4 +63,4 @@ Write-Verbose "Building site..."
|
|||
Copy-Item "${DocGenDir}/assets/logo.svg" -Destination "${DocOutDir}/" -Force
|
||||
Copy-Item "${DocGenDir}/assets/toc.yml" -Destination "${DocOutDir}/" -Force
|
||||
Copy-Item "${DocGenDir}/assets/logo.svg" -Destination "${DocOutDir}/_site/" -Force
|
||||
Copy-Item "${DocGenDir}/assets/toc.yml" -Destination "${DocOutDir}/_site/" -Force
|
||||
Copy-Item "${DocGenDir}/assets/toc.yml" -Destination "${DocOutDir}/_site/" -Force
|
||||
|
|
|
@ -66,4 +66,4 @@
|
|||
"_enableNewTab": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
- name: Api Documentation
|
||||
href: api/
|
||||
homepage: api/index.md
|
||||
homepage: api/index.md
|
||||
|
|
|
@ -55,4 +55,4 @@
|
|||
"_disableContribution": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
article h1:first-of-type:before {
|
||||
height: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#search {
|
||||
|
@ -19,8 +19,8 @@
|
|||
.sidetoc,
|
||||
body .toc,
|
||||
.sidefilter,
|
||||
.sidetoggle {
|
||||
background-color: #f9fbe7;
|
||||
.sidetoggle {
|
||||
background-color: #f9fbe7;
|
||||
}
|
||||
|
||||
.sidenav,
|
||||
|
@ -113,21 +113,21 @@ article h4 {
|
|||
.affix ul > li > a:hover,
|
||||
.affix ul > li.active > a,
|
||||
.affix ul > li > a:focus {
|
||||
color: #563d7c;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
border-left-color: #563d7c;
|
||||
color: #563d7c;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
border-left-color: #563d7c;
|
||||
}
|
||||
|
||||
/* all active links */
|
||||
.affix ul > li.active > a,
|
||||
.affix ul > li.active > a,
|
||||
.affix ul > li.active:hover > a,
|
||||
.affix ul > li.active:focus >a {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* nested active links */
|
||||
.affix ul ul > li.active > a,
|
||||
.affix ul ul > li.active > a,
|
||||
.affix ul ul > li.active:hover > a,
|
||||
.affix ul ul > li.active:focus > a {
|
||||
font-weight: 500;
|
||||
|
@ -279,4 +279,4 @@ article h4 {
|
|||
box-shadow: none;
|
||||
-webkit-appearance: media-time-remaining-display;
|
||||
margin-top: 14px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ function httpGetAsync(targetUrl, callback) {
|
|||
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
|
||||
callback(xmlHttp.responseText);
|
||||
}
|
||||
xmlHttp.open("GET", targetUrl, true); // true for asynchronous
|
||||
xmlHttp.open("GET", targetUrl, true); // true for asynchronous
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
|
@ -111,4 +111,4 @@ $(function () {
|
|||
populateIndexList($(this), pkgName)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -49,4 +49,4 @@ jobs:
|
|||
condition: succeeded()
|
||||
inputs:
|
||||
artifactName: "Doc.Index"
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site
|
||||
|
|
|
@ -322,19 +322,19 @@ jobs:
|
|||
- bash: |
|
||||
# Run grep recursive excluding git folder and known expected files and save a file with results.
|
||||
grep -I -P -n "[^\x00-\x7F]" -r --exclude-dir ".git" --exclude-dir "docs" --exclude-dir "tools" --exclude "*CodeCoverage.cmake*" --exclude "grepResults" . > grepResults
|
||||
|
||||
|
||||
# Display results to console.
|
||||
cat grepResults
|
||||
|
||||
|
||||
# Each result will produce one line, count how many lines were found.
|
||||
files_with_non_ascii=($(wc -l < grepResults))
|
||||
|
||||
|
||||
# Show info about the total files that needs attention.
|
||||
echo Files found with non-ASCII characters: $files_with_non_ascii
|
||||
|
||||
|
||||
# Return the count. When greater than 0, the step will fail.
|
||||
exit $files_with_non_ascii
|
||||
|
||||
|
||||
displayName: Validate Characters are ASCII
|
||||
condition: eq(variables['AZ_SDK_CODE_COV'], 1)
|
||||
|
||||
|
@ -342,18 +342,18 @@ jobs:
|
|||
- bash: |
|
||||
# Run clang-format recursively on each source and header file within the repo.
|
||||
find . \( -iname '*.h' -o -iname '*.c' \) -exec clang-format -i {} \;
|
||||
|
||||
|
||||
git status --untracked-files=no --porcelain
|
||||
|
||||
|
||||
if [[ `git status --untracked-files=no --porcelain` ]]; then
|
||||
echo Some files were not formatted correctly according to the .clang-format file.
|
||||
echo Please run clang-format to fix the issue.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo Success, all files are formatted correctly according to the .clang-format file.
|
||||
exit 0
|
||||
|
||||
|
||||
displayName: Validate Clang Format
|
||||
condition: eq(variables['AZ_SDK_CODE_COV'], 1)
|
||||
|
||||
|
|
|
@ -60,4 +60,4 @@ jobs:
|
|||
|
||||
- template: /eng/common/TestResources/remove-test-resources.yml
|
||||
parameters:
|
||||
ServiceDirectory: '.'
|
||||
ServiceDirectory: '.'
|
||||
|
|
|
@ -82,4 +82,4 @@ stages:
|
|||
RepoName: azure-sdk-for-c
|
||||
PRBranchName: increment-sdk-version-$(Build.BuildId)
|
||||
CommitMsg: "Increment sdk version after release of C SDK"
|
||||
PRTitle: "Increment version for C SDK releases"
|
||||
PRTitle: "Increment version for C SDK releases"
|
||||
|
|
|
@ -10,4 +10,4 @@ stages:
|
|||
- template: archetype-c-release.yml
|
||||
parameters:
|
||||
DependsOn:
|
||||
- Build
|
||||
- Build
|
||||
|
|
|
@ -16,4 +16,4 @@ steps:
|
|||
|
||||
- script: cmake --build . --config ${{ parameters.BuildType }}
|
||||
workingDirectory: build
|
||||
displayName: cmake build
|
||||
displayName: cmake build
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
|
||||
$match = $SdkVersionFile -match $VersionStringRegEx
|
||||
$SdkVersion = $Matches[2]
|
||||
return $SdkVersion
|
||||
return $SdkVersion
|
||||
|
|
|
@ -4,7 +4,7 @@ $packagePattern = "*.json"
|
|||
$MetadataUri = ""
|
||||
|
||||
# Parse out package publishing information given a vcpkg format.
|
||||
function Get-c-PackageInfoFromPackageFile ($pkg, $workingDirectory)
|
||||
function Get-c-PackageInfoFromPackageFile ($pkg, $workingDirectory)
|
||||
{
|
||||
$packageInfo = Get-Content -Raw -Path $pkg | ConvertFrom-JSON
|
||||
$packageArtifactLocation = (Get-ItemProperty $pkg).Directory.FullName
|
||||
|
@ -18,9 +18,9 @@ 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)
|
||||
if ($readmeContentLoc)
|
||||
{
|
||||
$readmeContent = Get-Content -Raw $readmeContentLoc
|
||||
}
|
||||
|
@ -46,6 +46,6 @@ function Publish-c-GithubIODocs ($DocLocation, $PublicArtifactLocation)
|
|||
# Those loops are left over from previous versions of this script which were
|
||||
# used to publish multiple docs packages in a single invocation.
|
||||
$pkgInfo = Get-Content $DocLocation/package-info.json | ConvertFrom-Json
|
||||
$releaseTag = RetrieveReleaseTag "C" $PublicArtifactLocation
|
||||
$releaseTag = RetrieveReleaseTag "C" $PublicArtifactLocation
|
||||
Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version -ReleaseTag $releaseTag
|
||||
}
|
||||
|
|
|
@ -30,4 +30,4 @@ try {
|
|||
}
|
||||
} finally {
|
||||
Set-Location $initialDirectory
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
tags/2020.06
|
||||
tags/2020.06
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Azure IoT Clients
|
||||
|
||||
This is the main page for the Azure SDK for Embedded C official IoT client libraries.
|
||||
This is the main page for the Azure SDK for Embedded C official IoT client libraries.
|
||||
|
||||
Here you will find everything you need to get devices connected to Azure.
|
||||
Here you will find everything you need to get devices connected to Azure.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
@ -64,7 +64,7 @@ The library targets made available via CMake are the following:
|
|||
|
||||
- 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/docs/how_to_iot_hub_esp8266_nodemcu.md)
|
||||
|
||||
**Important Note on Linux and Windows Samples**: While Windows and Linux devices are not likely to be considered as constrained ones, these samples were created to make it simpler to test the Azure SDK for Embedded C libraries, debug and step through the code to learn about it, even without a real device. We understand not everyone will have a real device to test and - sometimes - these devices won't have debugging capabilities.
|
||||
**Important Note on Linux and Windows Samples**: While Windows and Linux devices are not likely to be considered as constrained ones, these samples were created to make it simpler to test the Azure SDK for Embedded C libraries, debug and step through the code to learn about it, even without a real device. We understand not everyone will have a real device to test and - sometimes - these devices won't have debugging capabilities.
|
||||
|
||||
For extra guidance, please feel free to watch our Deep Dive Video below which goes over building the SDK, running the samples, and the architecture of the samples.
|
||||
|
||||
|
@ -85,9 +85,9 @@ Feature | Azure SDK for Embedded C | Description
|
|||
[Send device-to-cloud message](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-d2c) | √ | Send device-to-cloud messages to IoT Hub with the option to add custom message properties.
|
||||
[Receive cloud-to-device messages](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-c2d) | √ | Receive cloud-to-device messages and associated properties from IoT Hub.
|
||||
[Device Twins](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins) | √ | IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin document, subscribe to desired property updates.
|
||||
[Direct Methods](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-direct-methods) | √ | IoT Hub gives you the ability to invoke direct methods on devices from the cloud.
|
||||
[DPS - Device Provisioning Service](https://docs.microsoft.com/azure/iot-dps/) | √ | This SDK supports connecting your device to the Device Provisioning Service via, for example, [individual enrollment](https://docs.microsoft.com/azure/iot-dps/concepts-service#enrollment) using an [X.509 leaf certificate](https://docs.microsoft.com/azure/iot-dps/concepts-security#leaf-certificate).
|
||||
Protocol | MQTT | The Azure SDK for Embedded C supports only MQTT.
|
||||
[Direct Methods](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-direct-methods) | √ | IoT Hub gives you the ability to invoke direct methods on devices from the cloud.
|
||||
[DPS - Device Provisioning Service](https://docs.microsoft.com/azure/iot-dps/) | √ | This SDK supports connecting your device to the Device Provisioning Service via, for example, [individual enrollment](https://docs.microsoft.com/azure/iot-dps/concepts-service#enrollment) using an [X.509 leaf certificate](https://docs.microsoft.com/azure/iot-dps/concepts-security#leaf-certificate).
|
||||
Protocol | MQTT | The Azure SDK for Embedded C supports only MQTT.
|
||||
Retry Policies | √* | The Azure SDK for Embedded C provides guidelines for retries, but actual retries should be handled by the application.
|
||||
[IoT Plug and Play](https://docs.microsoft.com/azure/iot-pnp/overview-iot-plug-and-play) | √ | IoT Plug and Play Preview enables solution developers to integrate devices with their solutions without writing any embedded code.
|
||||
|
||||
|
@ -150,7 +150,7 @@ void my_property_func()
|
|||
//Allocate a span to put the properties
|
||||
uint8_t property_buffer[64];
|
||||
az_span property_span = az_span_create(property_buffer, sizeof(property_buffer));
|
||||
|
||||
|
||||
//Initialize the property struct with the span
|
||||
az_iot_message_properties props;
|
||||
az_iot_message_properties_init(&props, property_span, 0);
|
||||
|
|
|
@ -45,7 +45,7 @@ application_mqtt_subscribe -> application_mqtt_receive : MQTT lib subscribed
|
|||
|
||||
state application_mqtt_publish <<APP>>
|
||||
|
||||
state application_mqtt_receive <<APP>> {
|
||||
state application_mqtt_receive <<APP>> {
|
||||
' Callback delegating handler:
|
||||
[*] --> az_iot_hub_client_c2d_parse_received_topic : Received PUBLISH message
|
||||
az_iot_hub_client_c2d_parse_received_topic --> az_iot_hub_client_methods_parse_received_topic : not c2d related
|
||||
|
@ -54,13 +54,13 @@ state application_mqtt_receive <<APP>> {
|
|||
|
||||
' C2D
|
||||
az_iot_hub_client_c2d_parse_received_topic -> az_iot_hub_client_c2d_request : c2d call received
|
||||
|
||||
|
||||
' Methods:
|
||||
az_iot_hub_client_methods_parse_received_topic -> az_iot_hub_client_method_request : method call received
|
||||
az_iot_hub_client_method_request -> application_method_handle
|
||||
state application_method_handle <<APP>>
|
||||
application_method_handle -> az_iot_hub_client_methods_response_get_publish_topic
|
||||
|
||||
|
||||
' Twin
|
||||
az_iot_hub_client_twin_parse_received_topic -> az_iot_hub_client_twin_response : twin GET or PATCH received
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ az_iot_provisioning_client_register_get_publish_topic --> application_mqtt_publi
|
|||
az_iot_provisioning_client_register_get_publish_topic --> application_mqtt_receive
|
||||
state application_mqtt_publish <<APP>>
|
||||
|
||||
state application_mqtt_receive <<APP>> {
|
||||
state application_mqtt_receive <<APP>> {
|
||||
' MQTT PUB received
|
||||
[*] --> az_iot_provisioning_client_parse_received_topic_and_payload: MQTT PUB received from broker (cloud or Edge)
|
||||
az_iot_provisioning_client_parse_received_topic_and_payload --> az_iot_provisioning_client_register_response
|
||||
|
|
|
@ -20,15 +20,15 @@ state Provisioning <<APP>> {
|
|||
Provisioning_app_delay --> Register_Device : retry
|
||||
Provisioning_calculate_delay: - response.retry-after
|
||||
Provisioning_calculate_delay: - az_iot_calculate_retry_delay
|
||||
|
||||
' Provisioning Non-retriable
|
||||
|
||||
' Provisioning Non-retriable
|
||||
Register_Device --> Provisioning_not_retriable_failure
|
||||
state Provisioning_not_retriable_failure<<FAIL>>
|
||||
Provisioning_not_retriable_failure --> Provisioning_Rotate_Credentials
|
||||
state Provisioning_Rotate_Credentials <<APP>>
|
||||
Provisioning_Rotate_Credentials --> Register_Device : retry
|
||||
Provisioning_Rotate_Credentials --> [*] : no other credential
|
||||
}
|
||||
}
|
||||
|
||||
Provisioning --> IoT_Hub : Success
|
||||
|
||||
|
@ -45,7 +45,7 @@ state IoT_Hub <<APP>> {
|
|||
Hub_app_delay --> Hub_Operation : retry
|
||||
Hub_calculate_delay: - az_iot_calculate_retry_delay
|
||||
|
||||
' Hub Non-retriable
|
||||
' Hub Non-retriable
|
||||
Hub_Operation --> Hub_not_retriable_failure
|
||||
state Hub_not_retriable_failure<<FAIL>>
|
||||
Hub_not_retriable_failure --> [*] : Re-provision
|
||||
|
|
|
@ -106,7 +106,7 @@ static void initializeClients()
|
|||
{
|
||||
// This disables the client verification of server-side certificate during TLS
|
||||
// negotiation. It is not recommended to be a production-level practice for
|
||||
// connecting with Azure IoT servers.
|
||||
// connecting with Azure IoT servers.
|
||||
// It has been disabled for simplifying the sample.
|
||||
wifi_client.setInsecure();
|
||||
|
||||
|
|
|
@ -8,4 +8,3 @@ distinguished_name = req_distinguished_name
|
|||
basicConstraints = CA:FALSE
|
||||
keyUsage = digitalSignature, keyEncipherment
|
||||
extendedKeyUsage = clientAuth
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ if(EXISTS ${AZ_SDK_VERSION_H_FILE})
|
|||
|
||||
#Find and read the AZ_SDK_VERSION_STRING define
|
||||
string(REGEX MATCHALL "#define AZ_SDK_VERSION_STRING \"([0-9]+)\.([0-9]+)\.([0-9]+)(\-[^\"\-]+)?\"" VERSION_PARTS ${VERSION_H_CONTENT})
|
||||
|
||||
|
||||
#Ensure we matched as expected.
|
||||
# MAJOR.AZ_VERSION_MINOR.PATCH are required.
|
||||
# MAJOR.AZ_VERSION_MINOR.PATCH are required.
|
||||
# PRERELEASE is optional.
|
||||
if(NOT CMAKE_MATCH_1 AND NOT CMAKE_MATCH_2 AND NOT CMAKE_MATCH_3)
|
||||
message(FATAL_ERROR "Unexpected version format in ${AZ_SDK_VERSION_H_FILE}")
|
||||
|
|
|
@ -53,7 +53,7 @@ add_library (az::nohttp ALIAS az_nohttp)
|
|||
# Curl Platform
|
||||
if (TRANSPORT_CURL)
|
||||
set(CURL_MIN_REQUIRED_VERSION 7.1) #Min curl version to support CURLOPT_HTTPHEADER option
|
||||
find_package(CURL ${CURL_MIN_REQUIRED_VERSION} CONFIG)
|
||||
find_package(CURL ${CURL_MIN_REQUIRED_VERSION} CONFIG)
|
||||
if(NOT CURL_FOUND)
|
||||
find_package(CURL ${CURL_MIN_REQUIRED_VERSION} REQUIRED)
|
||||
endif()
|
||||
|
|
|
@ -32,4 +32,4 @@ add_cmocka_test(az_core_test SOURCES
|
|||
LINK_OPTIONS ${WRAP_FUNCTIONS}
|
||||
# grant access to Private functions to test az_json_private
|
||||
PRIVATE_ACCESS ON
|
||||
LINK_TARGETS az_core ${PAL} az_nohttp)
|
||||
LINK_TARGETS az_core ${PAL} az_nohttp)
|
||||
|
|
|
@ -15,8 +15,8 @@ add_cmocka_test(az_iot_common_test SOURCES
|
|||
main.c
|
||||
test_az_iot_common.c
|
||||
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
|
||||
LINK_TARGETS
|
||||
LINK_TARGETS
|
||||
az_iot_common
|
||||
az_core
|
||||
${PAL}
|
||||
${PAL}
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче