[cli] enhance Cli::Coap and CoapSecure (#6707)

This commit simplifies the handling of request commands (get, post,
put, delete, and observe) in `Cli::Coap` and `Cli:CoapSecure`
classes. It also updates parsing and processing of arguments for
`CoapSecure` request command by removing the optional and actually
unused dest IPv6 address argument. Finally, it removes the use of
OT core headers/types (mainly the `ot:Coap::Message::BlockType`
enumeration) in CLI CoAP modules.
This commit is contained in:
Abtin Keshavarzian
2021-06-07 21:45:45 -07:00
committed by GitHub
parent 1fceb4c490
commit afa427b7f6
5 changed files with 156 additions and 188 deletions
+6 -6
View File
@@ -52,21 +52,21 @@ expect_line "Done"
send "coaps connect $addr_1 5684\n"
expect_line "Done"
expect "coaps connected"
send "coaps get $addr_1 test/resource\n"
send "coaps get test/resource\n"
expect_line "Done"
expect "coaps response from $addr_1 with payload: 54657374696e67313233" # ASCII of "Testing123"
send "coaps post $addr_1 test/resource con Testing123\n"
send "coaps post test/resource con Testing123\n"
expect_line "Done"
expect "coaps response from $addr_1"
send "coaps put $addr_1 test/resource con Testing123\n"
send "coaps put test/resource con Testing123\n"
expect_line "Done"
expect "coaps response from $addr_1"
send "coaps delete $addr_1 test/resource con\n"
send "coaps delete test/resource con\n"
expect_line "Done"
expect "coaps response from $addr_1"
send "coaps post $addr_1 test/resource none Testing123\n"
send "coaps post test/resource none Testing123\n"
expect_line "Done"
send "coaps get $addr_1 default\n"
send "coaps get default\n"
expect_line "Done"
expect "coaps response from $addr_1"
set addr_2 [get_ipaddr mleid]