profile
viewpoint
kangping wgtdkp HUST, SJTU Shanghai Think twice, code once

wgtdkp/julia 95

A lightweight high performance http server

wgtdkp/apollonia 92

Tiny 2D physics engine

wgtdkp/juson 12

lightweight json parser in c

wgtdkp/kawaii 9

A kawaii Scheme interpreter in C

SJTU-DDST/nvds 5

Fast Replication over RDMA Fabric

openthread/ot-registrar 4

OpenThread Registrar, a BRSKI Domain Registrar for authenticating new Thread devices.

wgtdkp/6502-emulator 1

An emulator of 6502 MCU, including an assembler

wgtdkp/mdns 1

Public domain mDNS/DNS-SD library in C

wgtdkp/bash-guide 0

A guide to learn bash

push eventopenthread/openthread

Abtin Keshavarzian

commit sha 6d9975dfa6474fd53bf3baf40062ae8914046639

[cli] add helper 'Output()' methods which prepend indentation space (#5841) This commit simplifies the CLI module by adding new flavors of helper methods `OutputLine/Format(aIndentSize, ...)` which prepend a given number of indentation space characters before the format string. It also harmonizes the other `Output{Item}()` methods which output an item with a given indentation to use `aIndentSize` as the parameter name and as the first parameter of the method. It also simplifies the implementation of `OutputSpaces()`.

view details

push time in 13 minutes

PR merged openthread/openthread

[cli] add helper 'Output()' methods which prepend indentation space P4 cla: yes comp: cli enhancement

This commit simplifies the CLI module by adding new flavors of helper methods OutputLine/Format(aIndentSize, ...) which prepend a given number of indentation space characters before the format string.

It also harmonizes the other Output{Item}() methods which output an item with a given indentation to use aIndentSize as the parameter name and as the first parameter of the method.

It also simplifies the implementation of OutputSpaces().

+174 -188

2 comments

2 changed files

abtink

pr closed time in 13 minutes

push eventopenthread/openthread

Abtin Keshavarzian

commit sha 1cac1165262310d3a9e815a378f7b2808e9790e9

[utils] adding 'DatasetUpdater' (#5807) This commit adds a new module `DatasetUpdater` which provides easy-to-use APIs for user to request an update to any component (a subset of components) in Operational Dataset of the Thread network. The change can be requested from any node in the network. The implementation uses `MGMT_PENDING_SET` command and takes care of preparing the Pending Dataset and updating timestamps and monitoring for the Dataset to be updated and possibly retrying. It reports the outcome (success or failure status) back to the user in a callback. This commit also updates the `ChannelManager` module is to use the `DatasetUpdater` to change the channel.

view details

push time in 19 minutes

PR merged openthread/openthread

[utils] adding 'DatasetUpdater' P4 cla: yes comp: meshcop enhancement

This commit adds a new module DatasetUpdater which provides easy-to-use APIs for user to request an update to any component (a subset of components) in Operational Dataset of the Thread network. The change can be requested from any node in the network. The implementation uses MGMT_PENDING_SET command and takes care of preparing the Pending Dataset and updating timestamps and monitoring for the Dataset to be updated and possibly retrying. It reports the outcome (success or failure status) back to the user in a callback.

This commit also updates the ChannelManager module is to use the DatasetUpdater to change the channel.


The DatasetUpdater API can bse used to quickly update PSKc.

+893 -163

3 comments

30 changed files

abtink

pr closed time in 19 minutes

PR opened project-chip/connectedhomeip

Remove explicit "all" target from root build file

The "all" target exists implicitly and contains everything. We don't need to specify one, and it's misleading to do so specifying deps has no effect.

+0 -4

0 comment

1 changed file

pr created time in an hour

PR opened project-chip/connectedhomeip

Add back Android default build coverage & fix the build

mDNS doesn't build with no device layer. Remove it from the build and add badk the coverage that would catch this that was lost in #3340.

+6 -2

0 comment

2 changed files

pr created time in an hour

Pull request review commentproject-chip/connectedhomeip

Add echo example apps to conduct end-to-end connectivity sanity check…

+# Copyright (c) 2020 Project CHIP Authors

.gn, args.gni, and symlinks (build, build_overrides, third_party) should be removed

These files should only exist in the root of a project, which this is not.

yufengwangca

comment created time in 2 hours

Pull request review commentproject-chip/connectedhomeip

Add light button control RPC to lighting-app

 class AppTask     void PostEvent(AppEvent * event);     void UpdateClusterState(); -private:+    // private:

Is this intentional?

szatmz

comment created time in 3 hours

Pull request review commentproject-chip/connectedhomeip

Add light button control RPC to lighting-app

 void AppTask::ButtonEventHandler(uint32_t button_state, uint32_t has_changed)     } } +#ifdef CONFIG_CHIP_PW_RPC

Just wondering if it would make sense to move all RPC related functionalities to separate file e.g. RpcTask.cpp While I support the need of on-hw testing, simultanously i would like to keep code as clean as possible to read.

szatmz

comment created time in 3 hours

Pull request review commentproject-chip/connectedhomeip

Add light button control RPC to lighting-app

 int LightingManager::Init(const char * gpioDeviceName, gpio_pin_t gpioPin)      if (!mGPIODevice)     {+#ifndef CONFIG_CHIP_PW_RPC         LOG_ERR("Cannot find GPIO port %s", log_strdup(gpioDeviceName));+#else+        LOG_ERR("Cannot find GPIO port %s", gpioDeviceName);

Not sure, but maybe better choice would be to define log_strdup as empty macro as such logs may appear more often depending on the example? #define log_strdup(str) str

szatmz

comment created time in 3 hours

pull request commentopenthread/openthread

[mle] simplify parsing and appending of 'TimeRequestTlv'

Codecov Report

Merging #5849 (6fd8201) into master (6af97d6) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5849      +/-   ##
==========================================
+ Coverage   87.12%   87.15%   +0.02%     
==========================================
  Files         371      371              
  Lines       46768    46762       -6     
==========================================
+ Hits        40748    40754       +6     
+ Misses       6020     6008      -12     
Impacted Files Coverage Δ
src/core/thread/mle_tlvs.hpp 100.00% <ø> (ø)
src/core/thread/mle.cpp 93.95% <100.00%> (-0.06%) :arrow_down:
src/core/thread/mle_router.cpp 91.25% <100.00%> (+0.13%) :arrow_up:
src/posix/platform/hdlc_interface.cpp 51.56% <0.00%> (-1.18%) :arrow_down:
src/core/thread/network_data_leader_ftd.cpp 85.35% <0.00%> (-0.85%) :arrow_down:
src/core/thread/mesh_forwarder_ftd.cpp 87.75% <0.00%> (-0.52%) :arrow_down:
src/core/thread/mesh_forwarder.cpp 93.06% <0.00%> (-0.36%) :arrow_down:
src/core/thread/network_data.cpp 91.08% <0.00%> (-0.28%) :arrow_down:
src/core/common/tlvs.hpp 100.00% <0.00%> (ø)
... and 8 more
abtink

comment created time in 3 hours

Pull request review commentopenthread/openthread

[ip6] enable multicast loop

 otError Ip6::HandleExtensionHeaders(Message &    aMessage,     return error; } -otError Ip6::HandlePayload(Message &aMessage, MessageInfo &aMessageInfo, uint8_t aIpProto)+void Ip6::HandlePayload(Message &          aMessage,+                        MessageInfo &      aMessageInfo,+                        uint8_t            aIpProto,+                        Message::Ownership aMessageOwnership) {-    otError error = OT_ERROR_NONE;+    otError  error = OT_ERROR_NONE;+    Message *message;++    switch (aMessageOwnership)+    {+    case Message::kTakeCustody:+        message = &aMessage;+        break;++    case Message::kCopyToUse:+        VerifyOrExit((message = aMessage.Clone()) != nullptr, error = OT_ERROR_NO_BUFS);+        break;++    default:+        message = nullptr;+        OT_ASSERT(false);+        break;+    }      switch (aIpProto)     {     case kProtoUdp:-        error = mUdp.HandleMessage(aMessage, aMessageInfo);+        error = mUdp.HandleMessage(*message, aMessageInfo);         if (error == OT_ERROR_DROP)         {             otLogNoteIp6("Error UDP Checksum");         }         break;      case kProtoIcmp6:-        error = mIcmp.HandleMessage(aMessage, aMessageInfo);+        error = mIcmp.HandleMessage(*message, aMessageInfo);         break;      default:         break;     } -    return error;+exit:+    if (error != OT_ERROR_NONE)+    {+        otLogNoteIp6("Failed to handle payload: %s", otThreadErrorToString(error));+    }++    if (message != nullptr)+    {+        message->Free();+    }

We can use FreeMessage(message) here.

bukepo

comment created time in 3 hours

Pull request review commentopenthread/openthread

[ip6] enable multicast loop

 otError Ip6::HandleDatagram(Message &aMessage, Netif *aNetif, const void *aLinkM         } #endif -        IgnoreError(ProcessReceiveCallback(aMessage, messageInfo, nextHeader, aFromNcpHost, Message::kCopyToUse));+        error = ProcessReceiveCallback(aMessage, messageInfo, nextHeader, aFromNcpHost, Message::kCopyToUse);++        if ((error == OT_ERROR_NONE || error == OT_ERROR_NO_ROUTE) && forward &&+            !ShouldForwardToThread(messageInfo, aFromNcpHost))+        {+            forward = false;+        }

The if() block above seems to be new logic/code.
@bukepo can you please help explain what it does (why we need it)? Thanks.

bukepo

comment created time in 3 hours

Pull request review commentopenthread/openthread

[ip6] enable multicast loop

 otError Ip6::HandleExtensionHeaders(Message &    aMessage,     return error; } -otError Ip6::HandlePayload(Message &aMessage, MessageInfo &aMessageInfo, uint8_t aIpProto)+void Ip6::HandlePayload(Message &          aMessage,+                        MessageInfo &      aMessageInfo,+                        uint8_t            aIpProto,+                        Message::Ownership aMessageOwnership) {-    otError error = OT_ERROR_NONE;+    otError  error = OT_ERROR_NONE;+    Message *message;++    switch (aMessageOwnership)+    {+    case Message::kTakeCustody:+        message = &aMessage;+        break;++    case Message::kCopyToUse:+        VerifyOrExit((message = aMessage.Clone()) != nullptr, error = OT_ERROR_NO_BUFS);+        break;++    default:

We can consider removing the default case here (mainly since the Ownership is an enum type with two enumerator values and we get a warning/error if a enumerator case value is not covered in switch().

bukepo

comment created time in 3 hours

Pull request review commentopenthread/openthread

[ip6] enable multicast loop

 otError Ip6::HandleExtensionHeaders(Message &    aMessage,     return error; } -otError Ip6::HandlePayload(Message &aMessage, MessageInfo &aMessageInfo, uint8_t aIpProto)+void Ip6::HandlePayload(Message &          aMessage,+                        MessageInfo &      aMessageInfo,+                        uint8_t            aIpProto,+                        Message::Ownership aMessageOwnership) {-    otError error = OT_ERROR_NONE;+    otError  error = OT_ERROR_NONE;+    Message *message;+

We use the message only if the aIpProto is UDP or ICMP6. Can we check this at the top of this method, before potentially creating a Clone() of message (which may not then be used)?

bukepo

comment created time in 3 hours

Pull request review commentopenthread/openthread

[ip6] enable multicast loop

 typedef struct otMessageInfo                                  ///< Otherwise, specifies the IPv6 Hop Limit.     bool mIsHostInterface : 1;   ///< TRUE if packets sent/received via host interface, FALSE otherwise.     bool mAllowZeroHopLimit : 1; ///< TRUE to allow IPv6 Hop Limit 0 in `mHopLimit`, FALSE otherwise.+    bool mMulticastLoop : 1;     ///< TRUE to allow looping back mutlicast, FALSE otherwise.

With this we allow users to select which msgs would allow loop back and which won't. Can we consider allowing it for all msgs ? Any side-effect/reason not to? Thanks. Or can we somehow deduce this in another way? Thanks.

bukepo

comment created time in 4 hours

Pull request review commentopenthread/openthread

[ip6] enable multicast loop

 class Message : public Buffer      */     bool IsSubTypeMle(void) const; +    /**+     * This method checks whether this multicast message may be looped back.+     *+     * @retval TRUE   If message may be looped back.+     * @retval FALSE  If message must not be looped back.+     *+     */+    bool GetMulticastLoop(void) const { return GetMetadata().mMulticastLoop; }

How about GetAllowMulticastLoop() and SetAllowMulticastLoop()?

bukepo

comment created time in 3 hours

pull request commentopenthread/openthread

[mle] simplify parsing and appending of 'TimeRequestTlv'

Size Report of OpenThread

Merging #5849 into master(6af97d61b5449fac52b66145abaf1e38d739ad62).

name branch text data bss total
ot-cli-ftd_1.1 master 383532 736 51076 435344
#5849 383516 736 51076 435328
+/- -16 0 0 -16
ot-cli-mtd_1.1 master 311068 736 42484 354288
#5849 311052 736 42484 354272
+/- -16 0 0 -16
ot-ncp-ftd_1.1 master 377404 736 50356 428496
#5849 377388 736 50356 428480
+/- -16 0 0 -16
ot-ncp-mtd_1.1 master 307916 736 41764 350416
#5849 307900 736 41764 350400
+/- -16 0 0 -16
ot-rcp_1.1 master 64328 636 7656 72620
#5849 64328 636 7656 72620
+/- 0 0 0 0
libopenthread-cli-ftd.a_1.1 master 38296 0 3108 41404
#5849 38296 0 3108 41404
+/- 0 0 0 0
libopenthread-cli-mtd.a_1.1 master 31115 0 3108 34223
#5849 31115 0 3108 34223
+/- 0 0 0 0
libopenthread-ftd.a_1.1 master 189254 4 33224 222482
#5849 189240 4 33224 222468
+/- -14 0 0 -14
libopenthread-mtd.a_1.1 master 129567 4 24632 154203
#5849 129553 4 24632 154189
+/- -14 0 0 -14
libopenthread-ncp-ftd.a_1.1 master 48131 0 2388 50519
#5849 48131 0 2388 50519
+/- 0 0 0 0
libopenthread-ncp-mtd.a_1.1 master 43327 0 2388 45715
#5849 43327 0 2388 45715
+/- 0 0 0 0
libopenthread-rcp.a_1.1 master 27200 0 1532 28732
#5849 27200 0 1532 28732
+/- 0 0 0 0
libopenthread-radio.a_1.1 master 13383 0 150 13533
#5849 13383 0 150 13533
+/- 0 0 0 0
ot-cli-ftd_1.2 master 416468 736 61120 478324
#5849 416452 736 61120 478308
+/- -16 0 0 -16
ot-cli-mtd_1.2 master 328084 736 42968 371788
#5849 328068 736 42968 371772
+/- -16 0 0 -16
ot-ncp-ftd_1.2 master 405044 736 60400 466180
#5849 405028 736 60400 466164
+/- -16 0 0 -16
ot-ncp-mtd_1.2 master 320548 736 42248 363532
#5849 320532 736 42248 363516
+/- -16 0 0 -16
ot-rcp_1.2 master 71004 636 16528 88168
#5849 71004 636 16528 88168
+/- 0 0 0 0
libopenthread-cli-ftd.a_1.2 master 41477 0 3108 44585
#5849 41477 0 3108 44585
+/- 0 0 0 0
libopenthread-cli-mtd.a_1.2 master 33420 0 3108 36528
#5849 33420 0 3108 36528
+/- 0 0 0 0
libopenthread-ftd.a_1.2 master 217813 4 43168 260985
#5849 217799 4 43168 260971
+/- -14 0 0 -14
libopenthread-mtd.a_1.2 master 143090 4 25016 168110
#5849 143076 4 25016 168096
+/- -14 0 0 -14
libopenthread-ncp-ftd.a_1.2 master 48131 0 2388 50519
#5849 48131 0 2388 50519
+/- 0 0 0 0
libopenthread-ncp-mtd.a_1.2 master 43327 0 2388 45715
#5849 43327 0 2388 45715
+/- 0 0 0 0
libopenthread-rcp.a_1.2 master 27200 0 1532 28732
#5849 27200 0 1532 28732
+/- 0 0 0 0
libopenthread-radio.a_1.2 master 14801 0 174 14975
#5849 14801 0 174 14975
+/- 0 0 0 0
abtink

comment created time in 3 hours

pull request commentproject-chip/connectedhomeip

Add light button control RPC to lighting-app

Size increase report for "nrfconnect-example-build" from 5379d6b6261a9274dd721a19d26ad4614de080f5

File Section File VM
chip-lighting.elf rodata 0 -4
chip-lighting.elf log_const_sections -8 -8
chip-lighting.elf shell_root_cmds_sections -8 -8

<details> <summary>Full report output</summary>

BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.debug_info,0,57
.debug_line,0,17
.shstrtab,0,-2
rodata,-4,0
log_const_sections,-8,-8
shell_root_cmds_sections,-8,-8
.strtab,0,-14
.symtab,0,-48
.debug_abbrev,0,-66

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize


</details>

szatmz

comment created time in 3 hours

pull request commentproject-chip/connectedhomeip

Add light button control RPC to lighting-app

Size increase report for "nrfconnect-example-build" from 5379d6b6261a9274dd721a19d26ad4614de080f5

File Section File VM
chip-lighting.elf rodata 0 -4
chip-lighting.elf log_const_sections -8 -8
chip-lighting.elf shell_root_cmds_sections -8 -8

<details> <summary>Full report output</summary>

BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lighting.elf and ./pull_artifact/chip-lighting.elf:

sections,vmsize,filesize
.debug_info,0,57
.debug_line,0,17
.shstrtab,0,-2
rodata,-4,0
log_const_sections,-8,-8
shell_root_cmds_sections,-8,-8
.strtab,0,-14
.symtab,0,-48
.debug_abbrev,0,-66

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize


</details>

szatmz

comment created time in 5 hours

pull request commentproject-chip/connectedhomeip

Add light button control RPC to lighting-app

According to our meeting with @Damian-Nordic today, several changes were made to this PR.

  1. Everything RPC related is guarded by CONFIG_CHIP_PW_RPC.
  2. A new .conf file prj_with_rpc.conf was added that has the necessary configurations set for RPC-aware builds of lighting-app. This .conf file is NOT THE DEFAULT. If you want to build the RPCs, you have to invoke this command:

west build -b nrf52840dk_nrf52840 -- -DCONF_FILE='prj_with_rpc.conf;../../../config/nrfconnect/sample-defaults.conf'

  1. GN build was adapted to recent changes in Pigweed, e.g. pw_python_script was replaced by pw_python_action. (See first commit of this PR.)
szatmz

comment created time in 5 hours

delete branch project-chip/connectedhomeip

delete branch : restyled/pull-3930

delete time in 5 hours

PR closed project-chip/connectedhomeip

Restyle Add light button control RPC to lighting-app controller examples integrations restyled scripts

A duplicate of #3930 with additional commits that automatically address incorrect style, created by Restyled.

Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it with only the style fixes.

The following Restylers made fixes:

  • whitespace
  • clang-format

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

    <details> <summary>Expand for example instructions</summary>

    ```console
    git remote add upstream https://github.com/project-chip/connectedhomeip.git
    git fetch upstream pull/<this PR number>/head
    git merge --ff-only FETCH_HEAD
    git push
    ```
    

    </details>

NOTE: As work continues on the original Pull Request, this process will re-run and update (force-push) this Pull Request with updated style fixes as necessary. If the style is fixed manually at any point (i.e. this process finds no fixes to make), this Pull Request will be closed automatically.

Sorry if this was unexpected. To disable it, see our documentation.

+262 -10

0 comment

25 changed files

restyled-io[bot]

pr closed time in 5 hours

Pull request review commentopenthread/openthread

[utils] adding 'DatasetUpdater'

+/*+ *  Copyright (c) 2020, The OpenThread Authors.+ *  All rights reserved.+ *+ *  Redistribution and use in source and binary forms, with or without+ *  modification, are permitted provided that the following conditions are met:+ *  1. Redistributions of source code must retain the above copyright+ *     notice, this list of conditions and the following disclaimer.+ *  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.+ *  3. Neither the name of the copyright holder nor the+ *     names of its contributors may be used to endorse or promote products+ *     derived from this software without specific prior written permission.+ *+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+ *  POSSIBILITY OF SUCH DAMAGE.+ */++/**+ * @file+ *   This file includes definitions for Dataset Updater.+ */++#ifndef DATASET_UPDATER_HPP_+#define DATASET_UPDATER_HPP_++#include "openthread-core-config.h"++#include <openthread/dataset_updater.h>++#include "common/locator.hpp"+#include "common/message.hpp"+#include "common/non_copyable.hpp"+#include "common/notifier.hpp"+#include "common/timer.hpp"+#include "meshcop/dataset.hpp"+#include "meshcop/meshcop_tlvs.hpp"++namespace ot {+namespace Utils {++#if (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD++/**+ * This class implements the Dataset Updater.+ *+ */+class DatasetUpdater : public InstanceLocator, private NonCopyable+{+    friend class ot::Notifier;++public:+    /**+     * This constructor initializes a `DatasetUpdater` object.+     *+     * @param[in]   aInstance  A reference to the OpenThread instance.+     *+     */+    explicit DatasetUpdater(Instance &aInstance);++    /**+     * This type represents the callback function pointer which is called when a Dataset update request finishes,+     * reporting success or failure status of the request.+     *+     * The function pointer has the syntax `void (*Callback)(otError aError, void *aContext)`.+     *+     * @param[in] aError   The error status.+     *                     OT_ERROR_NONE           indicates Dataset update successfully finished.+     *                     OT_ERROR_INVALID_STATE  indicates failure due invalid state (MLE being disabled).+     *                     OT_ERROR_ALREADY        indicates failure due to another device within network requesting+     *                                             a conflicting Dataset update.+     * @param[in] aContext A pointer to the arbitrary context provided by the user.+     *+     */+    typedef otDatasetUpdaterCallback Callback;++    /**+     * This method requests an update to Operational Dataset.+     *+     * @p aDataset should contain the fields to be updated and their new value. It must not contain Active or Pending+     * Timestamp fields. The Delay field is optional, if not provided a default value (`kDefaultDelay`) would be used.+     *+     * @param[in]  aDataset                Dataset info containing fields to change.+     * @param[in]  aCallback               A callback to indicate when Dataset update request finishes.+     * @param[in]  aContext                An arbitrary context passed to callback.+     * @param[in]  aRetryWaitInterval      The wait time after sending Pending dataset before retrying (interval in ms).+     *+     * @retval OT_ERROR_NONE           Dataset update started successfully (@p aCallback will be invoked on completion).+     * @retval OT_ERROR_INVALID_STATE  Device is disabled (MLE is disabled).+     * @retval OT_ERROR_INVALID_ARGS   The @p aDataset is not valid (contains Active or Pending Timestamp).+     * @retval OT_ERROR_BUSY           Cannot start update, a previous one is ongoing
     * @retval OT_ERROR_BUSY           Cannot start update, a previous one is ongoing.
abtink

comment created time in 6 hours

Pull request review commentopenthread/openthread

[utils] adding 'DatasetUpdater'

+/*+ *  Copyright (c) 2020, The OpenThread Authors.+ *  All rights reserved.+ *+ *  Redistribution and use in source and binary forms, with or without+ *  modification, are permitted provided that the following conditions are met:+ *  1. Redistributions of source code must retain the above copyright+ *     notice, this list of conditions and the following disclaimer.+ *  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.+ *  3. Neither the name of the copyright holder nor the+ *     names of its contributors may be used to endorse or promote products+ *     derived from this software without specific prior written permission.+ *+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+ *  POSSIBILITY OF SUCH DAMAGE.+ */++/**+ * @file+ * @brief+ *   This file includes the OpenThread API for Dataset Updater module.+ */++#ifndef OPENTHREAD_DATASET_UPDATER_H_+#define OPENTHREAD_DATASET_UPDATER_H_++#include <openthread/dataset.h>+#include <openthread/instance.h>++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @addtogroup api-dataset-updater+ *+ * @brief+ *   This module includes functions for Dataset Updater.+ *+ *   The functions in this module are available when Dataset Updater feature is enabled (i.e.+ *   `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is set to 1). Further this feature is available only on an FTD build.+ *+ * @{+ *+ */++/**+ * This callback function pointer is called when a Dataset update request finishes, reporting success or failure status+ * of the Dataset update request.+ *+ * @param[in] aError   The error status.+ *                     OT_ERROR_NONE            indicates successful Dataset update.+ *                     OT_ERROR_INVALID_STATE   indicates failure due invalid state (MLE being disabled).+ *                     OT_ERROR_ALREADY         indicates failure due to another device within network requesting+ *                                              a conflicting Dataset update.+ *+ * @param[in] aContext A pointer to the arbitrary context (provided by user in `otDatasetUpdaterRequestUpdate()`).+ *+ */+typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext);++/**+ * This function requests an update to Operational Dataset.+ *+ * @p aDataset should contain the fields to be updated and their new value. It must not contain Active or Pending+ * Timestamp fields. The Delay field is optional, if not provided a default value (1000 ms) would be used.+ *+ * @param[in]  aInstance               A pointer to an OpenThread instance.+ * @param[in]  aDataset                A pointer to the Dataset containing the fields to change.+ * @param[in]  aCallback               A callback to indicate when Dataset update request finishes.+ * @param[in]  aContext                An arbitrary context passed to callback.+ * @param[in]  aRetryWaitInterval      The wait time after sending Pending dataset before retrying (interval in ms).+ *+ * @retval OT_ERROR_NONE           Dataset update started successfully (@p aCallback will be invoked on completion).+ * @retval OT_ERROR_INVALID_STATE  Device is disabled (MLE is disabled).+ * @retval OT_ERROR_INVALID_ARGS   The @p aDataset is not valid (contains Active or Pending Timestamp).+ * @retval OT_ERROR_BUSY           Cannot start update, a previous one is ongoing
 * @retval OT_ERROR_BUSY           Cannot start update, a previous one is ongoing.
abtink

comment created time in 6 hours

Pull request review commentopenthread/openthread

[utils] adding 'DatasetUpdater'

 class Dataset             mComponents.mIsSecurityPolicyPresent = true;         } +        /**+         * This method sets the Security Policy in the Dataset.+         *+         * @param[in] aRotationTime  A value for Key Rotation (in units of hours).+         * @param[in] aFlags         Security policy flags

Inconsistent doxygen.

abtink

comment created time in 7 hours

Pull request review commentopenthread/openthread

[low-power] fix CSL scheduler issues to avoid packets stuck in queue for a long time

 typedef struct     int8_t       mLastRssi;             ///< Last observed RSSI     uint16_t     mFrameErrorRate;       ///< Frame error rate (0xffff->100%). Requires error tracking feature.     uint16_t     mMessageErrorRate;     ///< (IPv6) msg error rate (0xffff->100%). Requires error tracking feature.+    uint16_t     mQueuedMessageCnt;     ///< Number of queued indirect messages for the child.

Can we update the comment to match what was intended?

brianljt

comment created time in 7 hours

pull request commentopenthread/openthread

[nrf52840] Improved nrf security - fix for first packet coming unencrypted

@piotrkoziar , please review when you have a chance. Thanks!

MarekPorwisz

comment created time in 7 hours

pull request commentproject-chip/connectedhomeip

Add Workflow for ZAP templates generation

@mspang @BroderickCarlin @andy31415 could we speed up the merge of this PR ? Sooner the CI is in master, the less issues will have with templates updates.

jepenven-silabs

comment created time in 7 hours

more