-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement periodic timer for querying OTA providers, refactor OTARequ…
…estor and OTARequestorDriver (#15433) * Add quasi-state machine for the Requestor * Use the RequestorDriver scheduling method instead of the platform timer The Linux OTA scenario works with this change * Add a commissioning callback * Add periodic timer for querying the default OTA provider * Add calls to StartDefaultProvidersTimer() * Move all calls to StartDefaultProvidersTimer() to RecordNewUpdateState() * Move some of the Requestor logic to the GenericOTARequestorDriver class * Update comments * Fix StartDelayTimerHandler() call * Add DriverTriggerQuery() method * Remove obsolet methods from OTARequestor * Rearrange error logic flow * Use TriggerImmediateQuery() API when processing AnnounceOTAProviders * Use DetermineProviderLocation() to pick the provider location * Introduce mLastUsedProvider * Rename functions and add comments * Rework StartDelayTimerHandler * Cleanup unused parameter, comments * Clean up spelling * Fix override compile error * Restyled by whitespace * Restyled by clang-format * Remove unused enum * Rename variable, fix comments, change private back to protected (merge artifact) * Restyled by clang-format * Make periodic query timeout configurable on Linux * Update examples/ota-requestor-app/linux/main.cpp Co-authored-by: Carol Yang <clyang@apple.com> * Update examples/ota-requestor-app/linux/README.md Co-authored-by: Carol Yang <clyang@apple.com> * Update wording Co-authored-by: Carol Yang <clyang@apple.com> * Use seconds for the delay, don't set the state prematurely, use lambda * Rework enums, query retry logic * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-markdown * Add word to disctionary * Delay initial query after commissioning * Restyled by whitespace * Restyled by clang-format * Udate comment * Introduce GenericOTARequestorDriver::OTACommissioningCallback * Restyled by whitespace * Restyled by clang-format * Rename and move around various OTARequestor and Driver APIs * Restyled by whitespace * Restyled by clang-format * Resolve merge conflicts from the latest merge from master * Rename variables and update comments * Restyled by whitespace * Remove leftover code block * When connecting to the Provider change the state to kUnknown * Remove unused function * Check for kCommissioningComplete; clear current provider * Set the kQuerying state in TriggerImmediateQueryInternal * Restyled by clang-format * Restyled by prettier-markdown * Clean up missed merge conflicts * Restyled by prettier-markdown Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Carol Yang <clyang@apple.com>
- Loading branch information
Showing
11 changed files
with
531 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -903,6 +903,7 @@ peerNodeId | |
peerSessionId | ||
pem | ||
percentageLiftValue | ||
periodicQueryTimeout | ||
pexpect | ||
pickString | ||
PID | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.