Skip to content

Commit

Permalink
Code review changes.
Browse files Browse the repository at this point in the history
- Update comments.
  • Loading branch information
isiu-apple committed Mar 12, 2022
1 parent b0d8b83 commit 3df7826
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions examples/ota-provider-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug c
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -f/--filepath <file> | Path to a file containing an OTA image |
| -o/--otaImageList <file> | Path to a file containing a list of OTA images |
| -q/--queryImageStatus <updateAvailable \| busy \| updateNotAvailable> | Value for the Status field in the QueryImageResponse for the next QueryImageResponse. <br> Status will revert back to updateAvailable on subsequent responses. |
| -q/--queryImageStatus <updateAvailable \| busy \| updateNotAvailable> | Value for the Status field in the first QueryImageResponse. <br> For all subsequent responses, the value of updateAvailable will be used. |
| -x/--ignoreQueryImage <num_times_to_ignore> | The number of times to ignore the QueryImage Command and not send a response | |
| -y/--ignoreApplyUpdate <num_times_to_ignore> | The number of times to ignore the ApplyUpdate Request and not send a response |
| -a/--applyUpdateAction <proceed \| awaitNextAction \| discontinue> | Value for the Action field in the ApplyUpdateResponse for the next ApplyUpdateResponse. <br> Value will revert back to proceed on subsequent responses. |
| -a/--applyUpdateAction <proceed \| awaitNextAction \| discontinue> | Value for the Action field in the first ApplyUpdateResponse. <br> For all subsequent responses, the value of proceed will be used. |
| -t/--delayedActionTimeSec <time> | Value in seconds for the DelayedActionTime field in the QueryImageResponse and ApplyUpdateResponse. <br> Value will revert back to 0 seconds on subsequent QueryImage Responses and ApplyUpdate Responses. |
| -u/--userConsentState <granted \| denied \| deferred> | The following is applied to the next QueryImageResponse and will revert back to the behavior of granted on subsequent responses. <br> Current user consent state which results in various values for Status field in QueryImageResponse <br> Note that -q/--queryImageStatus overrides this option <li> granted: Status field in QueryImageResponse is set to updateAvailable <li> denied: Status field in QueryImageResponse is set to updateNotAvailable <li> deferred: Status field in QueryImageResponse is set to busy |
| -u/--userConsentState <granted \| denied \| deferred> | The user consent state for the first QueryImageResponse. For all subsequent responses, the value of granted state will be used. <br> Current user consent state which results in various values for Status field in QueryImageResponse <br> Note that -q/--queryImageStatus overrides this option <li> granted: Status field in QueryImageResponse is set to updateAvailable <li> denied: Status field in QueryImageResponse is set to updateNotAvailable <li> deferred: Status field in QueryImageResponse is set to busy |
| -s/--softwareVersion <version> | Value for the SoftwareVersion field in the QueryImageResponse <br> Note that -o/--otaImageList overrides this option |
| -S/--softwareVersionStr <version string> | Value for the SoftwareVersionString field in the QueryImageResponse <br> Note that -o/--otaImageList overrides this option |
| -c/--UserConsentNeeded | If provided, and value of RequestorCanConsent field in QueryImage Command is true, <br> then value of UserConsentNeeded field in the QueryImageResponse is set to true. <br> Else, value of UserConsentNeeded is false. |
Expand Down
12 changes: 6 additions & 6 deletions examples/ota-provider-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,22 +299,22 @@ OptionSet cmdLineOptions = { HandleOptions, cmdLineOptionsDef, "PROGRAM OPTIONS"
" -o/--otaImageList <file>\n"
" Path to a file containing a list of OTA images\n"
" -q/--queryImageStatus <updateAvailable | busy | updateNotAvailable>\n"
" Value for the Status field in the QueryImageResponse for the next QueryImageResponse.\n"
" Status will revert back to updateAvailable on subsequent responses.\n"
" Value for the Status field in the first QueryImageResponse.\n"
" For all subsequent responses, the value of updateAvailable will be used.\n"
" -x/--ignoreQueryImage <num_times_to_ignore>\n"
" The number of times to ignore the QueryImage Command and not send a response.\n"
" -y/--ignoreApplyUpdate <num_times_to_ignore>\n"
" The number of times to ignore the ApplyUpdate Request and not send a response.\n"
" -a/--applyUpdateAction <proceed | awaitNextAction | discontinue>\n"
" Value for the Action field in the ApplyUpdateResponse for the next ApplyUpdateResponse.\n"
" Value will revert back to proceed on subsequent responses.\n"
" Value for the Action field in the first ApplyUpdateResponse.\n"
" For all subsequent responses, the value of proceed will be used.\n"
" -t/--delayedActionTimeSec <time>\n"
" Value in seconds for the DelayedActionTime field in the QueryImageResponse\n"
" and ApplyUpdateResponse. Value will revert back to 0 seconds on subsequent\n"
" QueryImageResponses and ApplyUpdateResponses."
" -u/--userConsentState <granted | denied | deferred>\n"
" The following is applied to the next QueryImageResponse and will revert back to\n"
" the behavior of granted on subsequent responses.\n"
" The user consent state for the first QueryImageResponse. For all subsequent\n"
" responses, the value of granted state will be used.\n"
" granted: Status field in QueryImageResponse is set to updateAvailable\n"
" denied: Status field in QueryImageResponse is set to updateNotAvailable\n"
" deferred: Status field in QueryImageResponse is set to busy\n"
Expand Down
12 changes: 6 additions & 6 deletions examples/ota-requestor-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug
In addition to the general options available to all Linux applications, the
following command line options are available for the OTA Requestor application.

| Directory | Description |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| -p/--periodicQueryTimeout <Time in seconds> | Periodic timeout for querying providers in the default OTA provider list. If none or zero is supplied the timeout is set to every 24 hours. |
| -c/--requestorCanConsent | If supplied, the RequestorCanConsent field of the QueryImage command is set to true. Otherwise, the value is determined by the driver. |
| -f/--otaDownloadPath <file path> | If supplied, the OTA image is downloaded to the given fully-qualified file-path. Otherwise, the value defaults to /tmp/test.bin. |
| -u/--userConsentState <granted | denied | deferred> | The following is applied to the next QueryImage and will revert back to the behavior of granted on subsequent QueryImage commands. <li> granted: Authorize OTA requestor to download an OTA image. <li> denied: Forbid OTA requestor to download an OTA image. <li> deferred: Defer obtaining user consent. |
| Directory | Description |
| ----------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------- |
| -p/--periodicQueryTimeout <Time in seconds> | Periodic timeout for querying providers in the default OTA provider list. If none or zero is supplied the timeout is set to every 24 hours. |
| -c/--requestorCanConsent | If supplied, the RequestorCanConsent field of the QueryImage command is set to true. Otherwise, the value is determined by the driver. |
| -f/--otaDownloadPath <file path> | If supplied, the OTA image is downloaded to the given fully-qualified file-path. Otherwise, the value defaults to /tmp/test.bin. |
| -u/--userConsentState <granted | denied | deferred> | The user consent state for the first QueryImage command. For all subsequent commands, the value of granted will be used. <li> granted: Authorize OTA requestor to download an OTA image <li> denied: Forbid OTA requestor to download an OTA image <li> deferred: Defer obtaining user consent

## Software Image Header

Expand Down
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ OptionSet cmdLineOptions = { HandleOptions, cmdLineOptionsDef, "PROGRAM OPTIONS"
" If supplied, the OTA image is downloaded to the given fully-qualified file-path.\n"
" Otherwise, the value defaults to /tmp/test.bin.\n "
" -u/--userConsentState <granted | denied | deferred>\n"
" The following is applied to the next QueryImage and will revert back to\n"
" the behavior of granted on subsequent QueryImage commands.\n"
" The user consent state for the first QueryImage command. For all\n"
" subsequent commands, the value of granted will be used.\n"
" granted: Authorize OTA requestor to download an OTA image\n"
" denied: Forbid OTA requestor to download an OTA image\n"
" deferred: Defer obtaining user consent \n" };
Expand Down

0 comments on commit 3df7826

Please sign in to comment.