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

[cmd-parser] remove dependency of <limits> #5636

Merged
merged 3 commits into from
Oct 13, 2020
Merged

Conversation

moandor-y
Copy link
Contributor

We don't have C++ STL on some platforms, so this replaces it.

@size-report
Copy link

size-report bot commented Oct 12, 2020

Size Report of OpenThread

Merging #5636 into master(5716ff4).

name branch text data bss total
ot-cli-ftd_1.1 master 388972 736 72724 462432
#5636 388972 736 72724 462432
+/- 0 0 0 0
ot-cli-mtd_1.1 master 314124 736 64132 378992
#5636 314124 736 64132 378992
+/- 0 0 0 0
ot-ncp-ftd_1.1 master 383004 736 72004 455744
#5636 383004 736 72004 455744
+/- 0 0 0 0
ot-ncp-mtd_1.1 master 311116 736 63420 375272
#5636 311116 736 63420 375272
+/- 0 0 0 0
ot-rcp_1.1 master 63976 636 7512 72124
#5636 63976 636 7512 72124
+/- 0 0 0 0
libopenthread-cli-ftd.a_1.1 master 38055 0 3108 41163
#5636 38055 0 3108 41163
+/- 0 0 0 0
libopenthread-cli-mtd.a_1.1 master 30874 0 3100 33974
#5636 30874 0 3100 33974
+/- 0 0 0 0
libopenthread-ftd.a_1.1 master 194717 4 55016 249737
#5636 194717 4 55016 249737
+/- 0 0 0 0
libopenthread-mtd.a_1.1 master 132615 4 46432 179051
#5636 132615 4 46432 179051
+/- 0 0 0 0
libopenthread-ncp-ftd.a_1.1 master 48018 0 2388 50406
#5636 48018 0 2388 50406
+/- 0 0 0 0
libopenthread-ncp-mtd.a_1.1 master 43214 0 2388 45602
#5636 43214 0 2388 45602
+/- 0 0 0 0
libopenthread-rcp.a_1.1 master 27069 0 1532 28601
#5636 27069 0 1532 28601
+/- 0 0 0 0
libopenthread-radio.a_1.1 master 13138 0 150 13288
#5636 13138 0 150 13288
+/- 0 0 0 0
ot-cli-ftd_1.2 master 410308 736 81428 492472
#5636 410308 736 81428 492472
+/- 0 0 0 0
ot-cli-mtd_1.2 master 322996 736 64340 388072
#5636 322996 736 64340 388072
+/- 0 0 0 0
ot-ncp-ftd_1.2 master 402116 736 80708 483560
#5636 402116 736 80708 483560
+/- 0 0 0 0
ot-ncp-mtd_1.2 master 319140 736 63628 383504
#5636 319140 736 63628 383504
+/- 0 0 0 0
ot-rcp_1.2 master 68960 636 16316 85912
#5636 68960 636 16316 85912
+/- 0 0 0 0
libopenthread-cli-ftd.a_1.2 master 39383 0 3108 42491
#5636 39383 0 3108 42491
+/- 0 0 0 0
libopenthread-cli-mtd.a_1.2 master 31318 0 3100 34418
#5636 31318 0 3100 34418
+/- 0 0 0 0
libopenthread-ftd.a_1.2 master 214495 4 63664 278163
#5636 214495 4 63664 278163
+/- 0 0 0 0
libopenthread-mtd.a_1.2 master 140732 4 46584 187320
#5636 140732 4 46584 187320
+/- 0 0 0 0
libopenthread-ncp-ftd.a_1.2 master 48018 0 2388 50406
#5636 48018 0 2388 50406
+/- 0 0 0 0
libopenthread-ncp-mtd.a_1.2 master 43214 0 2388 45602
#5636 43214 0 2388 45602
+/- 0 0 0 0
libopenthread-rcp.a_1.2 master 27069 0 1532 28601
#5636 27069 0 1532 28601
+/- 0 0 0 0
libopenthread-radio.a_1.2 master 13830 0 150 13980
#5636 13830 0 150 13980
+/- 0 0 0 0

@codecov
Copy link

codecov bot commented Oct 12, 2020

Codecov Report

Merging #5636 into master will increase coverage by 2.69%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5636      +/-   ##
==========================================
+ Coverage   78.08%   80.78%   +2.69%     
==========================================
  Files         376      377       +1     
  Lines       47957    48090     +133     
==========================================
+ Hits        37449    38851    +1402     
+ Misses      10508     9239    -1269     
Impacted Files Coverage Δ
src/core/common/numeric_limits.hpp 100.00% <100.00%> (ø)
src/core/utils/parse_cmdline.cpp 100.00% <100.00%> (ø)
src/core/net/netif.cpp 93.54% <0.00%> (-2.81%) ⬇️
src/core/backbone_router/bbr_manager.cpp 90.76% <0.00%> (-1.10%) ⬇️
src/core/utils/jam_detector.cpp 17.64% <0.00%> (-0.94%) ⬇️
src/core/thread/csl_tx_scheduler.cpp 94.49% <0.00%> (-0.92%) ⬇️
examples/platforms/simulation/radio.c 89.74% <0.00%> (-0.92%) ⬇️
src/core/api/backbone_router_ftd_api.cpp 81.66% <0.00%> (-0.88%) ⬇️
...core/backbone_router/multicast_listeners_table.cpp 90.00% <0.00%> (-0.60%) ⬇️
src/core/coap/coap.cpp 89.16% <0.00%> (-0.23%) ⬇️
... and 82 more

Copy link
Member

@bukepo bukepo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:+1:

Copy link
Contributor

@Irving-cl Irving-cl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM👍

Copy link
Member

@abtink abtink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good overall. One suggestion below on moving the definition under common folder.

src/core/utils/parse_cmdline.cpp Outdated Show resolved Hide resolved
src/core/utils/parse_cmdline.cpp Outdated Show resolved Hide resolved
Copy link
Member

@simonlingoogle simonlingoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to have. Thanks!
LGTM 👍

@moandor-y moandor-y requested a review from abtink October 13, 2020 02:15
Copy link
Member

@abtink abtink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks 👍

@jwhui jwhui merged commit ee6ffd7 into openthread:master Oct 13, 2020
@moandor-y moandor-y deleted the limits branch October 13, 2020 03:58
simonlingoogle pushed a commit to simonlingoogle/openthread that referenced this pull request Nov 12, 2020
Bug: 170600902

* origin/github/master:
  [indirect-sender] remove existing supervision msg on new msg add (openthread#5638)
  [cmd-parser] remove dependency of <limits> (openthread#5636)
  [docs] update BBB guide formatting (openthread#5637)
  [posix] map address with rtnetlink API on Linux (openthread#5629)
  [expect] refactor common functions (openthread#5634)
  [bootstrap] fix link to clang-format-10 (openthread#5633)
  [thread-cert] set node addr64 to EXTENDED_ADDRESS_BASE + nodeid (openthread#5601)
  [thread-cert] refactor case 9.2.7 using pktverify (openthread#5459)
  [thread-cert] refactor case 5.5.3 using pktverify (openthread#5448)
  [tests] init joiner with different masterkey before start (openthread#5626)
  [cmake] avoid recompiling common sources multiple times (openthread#5623)
  [cmake] replace mbedcrypto with ${OT_MBEDTLS} (openthread#5622)
  [cmake] add build options for FTD, MTD, and RCP (openthread#5622)
  [toranj] add new test-case covering joiner-router behavior (openthread#5621)
  [thread-cert] enhance case 9.2.4 to avoid reverifying coap retransmission packets (openthread#5614)
  [low-power] add cli command macsend for certification (openthread#5573)
  [codecov] disable project coverage threshold (openthread#5631)
  [cli] add cli command to control child supervision (openthread#5620)
  [commissioner] specify src for c/tx (openthread#5625)
  [cmd-parser] adding helper 'ParseAs{Type}' function (openthread#5607)
  [logging] update 'otDump' to use 'ot::String' (openthread#5618)
  [cli] replace 'PRIx64' use (openthread#5615)
  [scan-build] update to clang-tools-10 (openthread#5617)
  [clang-format] update to clang-format-10 (openthread#5616)
  [docs] update BeagleBone setup guide (openthread#5606)
  [script] fix arm-gcc toolchain install on ubuntu (openthread#5613)
  [github-actions] fix expect check (openthread#5610)
  [ip6] use 'Get<Filter>()' (remove unnecessary namespace) (openthread#5605)
  [message] add new flavors of Read/Write/Append/Prepend methods (openthread#5604)
  [cli] add new helper 'ParseIp6Prefix()' (openthread#5603)
  [utils] adding 'LookupTable' class and use it in CLI (openthread#5602)
  [docs] add source for BeagleBone Black guide (openthread#5593)
  [nrf_security] use vanilla mbedtls only for AES (openthread#5596)
  [mlr] send BMLR.ntf on Backbone link (openthread#5388)
  [thread-cert] enhance case 9.2.18 for SED packet order (openthread#5584)
  [cli] do not pass user-controlled input as format string (openthread#5599)
  [github-actions] use docker/setup-buildx-action@v1 (openthread#5600)
  [thread-cert] enhance case 9.2.10 for MED packets order (openthread#5598)
  [thread-cert] enhance case 5.6.6 for potential SED packet out-of-order (openthread#5597)
  [thread-cert] enhance case 9.2.4 (openthread#5590)
  [mle] remove secure data request mode bit (openthread#5560)
  [cli] add 'OutputExtAddress()' helper method (openthread#5591)
  [linked-list] fix spelling for Indicator typename (openthread#5592)
  [cli] style fixes and smaller enhancements (openthread#5581)
  [continuous-integration] fix API change detector (openthread#5589)
  [dua] handle coap error code for DUA.rsp (openthread#5523)
  [scripts] fix test_route_table.py fails by chance (openthread#5580)
  [dua] handle AddressError (openthread#5516)
  [pktverify] verify offline test info (openthread#5525)
  [scripts] fix test_route_table.py (openthread#5558)
  [low-power] implement link metrics - single probe (openthread#5481)
  [codecov] only post coverage check statuses to PRs (openthread#5575)
  [github-actions] fix thread-wireshark missing (openthread#5577)
  [reference-device] send fake ADDR_NTF.ntf (openthread#5537)
  [thread-cert] Thread 1.2 CI with OTBR and Backbone link (openthread#5489)
  [github-actions] run Thread 1.1 cert tests for 1.2 build (openthread#5547)
  [message] add helper macros to free message (on error) (openthread#5555)
  [docs] add style guide for documentation contributions (openthread#5567)
  [script] fix output when no arguments are specified (openthread#5551)
  [thread-cert] add low power case 6_1_07 (openthread#5557)
  [gn] add missing files to BUILD.gn (openthread#5564)
  [style] fix warnings -Wextra-semi (openthread#5566)
  [thread-cert] refactor case 9.2.4 using pktverify (openthread#5412)
Change-Id: I9024ef8b7780db9f28a5815103423ffcdd57a8c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants