Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle Make a QueryImage command from OTA Requestor to OTA Provider #10930

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions examples/ota-provider-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Suggest doing the following:

## Usage

`./ota-provider-app [--filepath \<filepath\>]`
`./ota-provider-app [-f/--filepath \<file\>]`

If `-filepath` is provided, `ota-provider-app` will automatically serve that
file to the Requestor (SoftwareVersion will be Requester version + 1).
If `--filepath` is supplied, `ota-provider-app` will automatically serve that
file to the OTA Requestor (SoftwareVersion will be Requester version + 1).

If no `-filepath` is provided, `ota-provider-app` will respond to `QueryImage`
If no `--filepath` is supplied, `ota-provider-app` will respond to `QueryImage`
with `NotAvailable` status.

## Current Features/Limitations
Expand All @@ -31,6 +31,5 @@ with `NotAvailable` status.
- Synchronous BDX transfer only
- using hardcoded test values for local and peer Node IDs
- does not check VID/PID
- no configuration for `Busy`/`DelayedActionTime`
- no configuration for `AwaitNextAction`
- only one transfer at a time (does not check incoming `UpdateTokens`)
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void BdxOtaSender::HandleTransferSessionOutput(TransferSession::OutputEvent & ev
VerifyOrReturn(otaFile.good() || otaFile.eof(), ChipLogError(BDX, "%s: file read failed", __FUNCTION__));

blockData.Data = blockBuf->Start();
blockData.Length = otaFile.gcount();
blockData.Length = static_cast<size_t>(otaFile.gcount());
blockData.IsEof = (blockData.Length < blockSize) ||
(mNumBytesSent + static_cast<uint64_t>(blockData.Length) == mTransfer.GetTransferLength() || (otaFile.peek() == EOF));
mNumBytesSent = static_cast<uint32_t>(mNumBytesSent + blockData.Length);
Expand Down
7 changes: 2 additions & 5 deletions examples/ota-requestor-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

executable("chip-ota-requestor-app") {
sources = [
"ExampleSelfCommissioning.h",
"PersistentStorage.cpp",
"main.cpp",
]
sources = [ "main.cpp" ]

deps = [
"${chip_root}/examples/ota-requestor-app/ota-requestor-common",
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/src/app/device",
"${chip_root}/src/app/server",
"${chip_root}/src/lib",
]
Expand Down
85 changes: 0 additions & 85 deletions examples/ota-requestor-app/linux/ExampleSelfCommissioning.h

This file was deleted.

251 changes: 0 additions & 251 deletions examples/ota-requestor-app/linux/PersistentStorage.cpp

This file was deleted.

Loading