Skip to content

Commit

Permalink
Merge branch 'master' into feature/app-install-flow-public
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov authored Jul 19, 2024
2 parents 67fed39 + c024e4f commit eb01209
Show file tree
Hide file tree
Showing 100 changed files with 2,309 additions and 1,035 deletions.
7 changes: 6 additions & 1 deletion .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ runs:
# because the bootstrapped Pigweed environment contains absolute paths.
echo "Calculating bootstrap cache key for '$PWD'"
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
FINAL_HASH="$(echo "$PWD:$FILES_HASH" | shasum -a 256 | cut -d' ' -f1)"
case "$RUNNER_OS" in
macOS) OS_HASH="$(sw_vers | shasum -a 256 | cut -d' ' -f1)";;
*) OS_HASH="$(shasum -a 256 /etc/lsb-release | cut -d' ' -f1)";;
esac
PYTHON_HASH="$(python --version | shasum -a 256 | cut -d' ' -f1)"
FINAL_HASH="$(echo "$PWD:$FILES_HASH:$OS_HASH:$PYTHON_HASH" | shasum -a 256 | cut -d' ' -f1)"
echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT"
# Split caches across backends
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# need to run with privilege, which isn't supported by job.XXX.contaner
# https://github.com/actions/container-action/issues/2
# container:
# image: ghcr.io/project-chip/chip-build-cirque:54
# image: ghcr.io/project-chip/chip-build-cirque:<VERSION_HERE>
# volumes:
# - "/tmp:/tmp"
# - "/dev/pts:/dev/pts"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doxygen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

runs-on: ubuntu-latest
container:
image: ghcr.io/project-chip/chip-build-doxygen:54
image: ghcr.io/project-chip/chip-build-doxygen:65

if: github.actor != 'restyled-io[bot]'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-asr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-asr:54
image: ghcr.io/project-chip/chip-build-asr:65
options: --user root

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-efr32:56
image: ghcr.io/project-chip/chip-build-efr32:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-crosscompile:54
image: ghcr.io/project-chip/chip-build-crosscompile:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-mbed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-mbed-os:54
image: ghcr.io/project-chip/chip-build-mbed-os:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-nuttx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-nuttx:54
image: ghcr.io/project-chip/chip-build-nuttx:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-nxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-k32w:54
image: ghcr.io/project-chip/chip-build-k32w:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-nxp-zephyr:64
image: ghcr.io/project-chip/chip-build-nxp-zephyr:65

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-openiotsdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-openiotsdk:54
image: ghcr.io/project-chip/chip-build-openiotsdk:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
options: --privileged
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-rw61x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-rw61x:54
image: ghcr.io/project-chip/chip-build-rw61x:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-telink:57
image: ghcr.io/project-chip/chip-build-telink:65
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-tizen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-tizen:54
image: ghcr.io/project-chip/chip-build-tizen:65
options: --user root
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/full-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-android:54
image: ghcr.io/project-chip/chip-build-android:65
volumes:
- "/tmp/log_output:/tmp/test_logs"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-java:54
image: ghcr.io/project-chip/chip-build-java:65
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/minimal-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-minimal:54
image: ghcr.io/project-chip/chip-build-minimal:65

steps:
- name: Checkout
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-minimal:54
image: ghcr.io/project-chip/chip-build-minimal:65

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoketest-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-android:54
image: ghcr.io/project-chip/chip-build-android:65
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py'
scripts/run_in_python_env.sh out/venv './src/python_testing/test_testing/test_TC_ICDM_2_1.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ using namespace chip;
using namespace chip::app;
using namespace chip::app::Clusters;
using namespace chip::app::Clusters::OperationalState;
using namespace chip::app::Clusters::RvcOperationalState;

CHIP_ERROR GenericOperationalStateDelegateImpl::GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState)
{
Expand Down
11 changes: 11 additions & 0 deletions examples/network-manager-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
*/

#include <AppMain.h>
#include <app/clusters/thread-network-directory-server/thread-network-directory-server.h>
#include <app/clusters/wifi-network-management-server/wifi-network-management-server.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/Span.h>

#include <optional>

using namespace chip;
using namespace chip::app;
using namespace chip::app::Clusters;
Expand All @@ -32,6 +36,13 @@ ByteSpan ByteSpanFromCharSpan(CharSpan span)
return ByteSpan(Uint8::from_const_char(span.data()), span.size());
}

std::optional<DefaultThreadNetworkDirectoryServer> gThreadNetworkDirectoryServer;
void emberAfThreadNetworkDirectoryClusterInitCallback(chip::EndpointId endpoint)
{
VerifyOrDie(!gThreadNetworkDirectoryServer);
gThreadNetworkDirectoryServer.emplace(endpoint).Init();
}

int main(int argc, char * argv[])
{
if (ChipLinuxAppInit(argc, argv) != 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,51 @@ cluster WiFiNetworkManagement = 1105 {
command access(invoke: administer) NetworkPassphraseRequest(): NetworkPassphraseResponse = 0;
}

/** Manages the names and credentials of Thread networks visible to the user. */
cluster ThreadNetworkDirectory = 1107 {
revision 1;

struct ThreadNetworkStruct {
octet_string<8> extendedPanID = 0;
char_string<16> networkName = 1;
int16u channel = 2;
int64u activeTimestamp = 3;
}

attribute access(read: manage, write: manage) nullable octet_string<8> preferredExtendedPanID = 0;
readonly attribute access(read: operate) ThreadNetworkStruct threadNetworks[] = 1;
readonly attribute int8u threadNetworkTableSize = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct AddNetworkRequest {
octet_string<254> operationalDataset = 0;
}

request struct RemoveNetworkRequest {
octet_string<8> extendedPanID = 0;
}

request struct GetOperationalDatasetRequest {
octet_string<8> extendedPanID = 0;
}

response struct OperationalDatasetResponse = 3 {
octet_string<254> operationalDataset = 0;
}

/** Adds an entry to the ThreadNetworks list. */
timed command access(invoke: manage) AddNetwork(AddNetworkRequest): DefaultSuccess = 0;
/** Removes an entry from the ThreadNetworks list. */
timed command access(invoke: manage) RemoveNetwork(RemoveNetworkRequest): DefaultSuccess = 1;
/** Retrieves a Thread Operational Dataset from the ThreadNetworks list. */
timed command GetOperationalDataset(GetOperationalDatasetRequest): OperationalDatasetResponse = 2;
}

endpoint 0 {
device type ma_rootdevice = 22, version 1;

Expand Down Expand Up @@ -1473,6 +1518,23 @@ endpoint 1 {
handle command NetworkPassphraseRequest;
handle command NetworkPassphraseResponse;
}

server cluster ThreadNetworkDirectory {
callback attribute preferredExtendedPanID;
callback attribute threadNetworks;
callback attribute threadNetworkTableSize;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

handle command AddNetwork;
handle command RemoveNetwork;
handle command GetOperationalDataset;
handle command OperationalDatasetResponse;
}
}


Loading

0 comments on commit eb01209

Please sign in to comment.