Lines Matching +full:default +full:- +full:cli
31 * This file implements a simple CLI for the CoAP Secure service.
41 #include "cli/cli.hpp"
47 namespace Cli { namespace
64 mResourceContent[sizeof(mResourceContent) - 1] = '\0'; in CoapSecure()
72 uint16_t length = otMessageGetLength(aMessage) - otMessageGetOffset(aMessage); in PrintPayload()
85 length -= bytesToPrint; in PrintPayload()
94 * @cli coaps resource (get,set)
96 * coaps resource test-resource
101 * test-resource
104 * @cparam coaps resource [@ca{uri-path}]
131 strncpy(mUriPath, aArgs[0].GetCString(), sizeof(mUriPath) - 1); in Process()
148 * @cli coaps set
153 * @cparam coaps set @ca{new-content}
165 mResourceContent[sizeof(mResourceContent) - 1] = '\0'; in Process()
177 * @cli coaps start
190 * @cparam coaps start [@ca{check-peer-cert} | @ca{max-conn-attempts}]
191 * The `check-peer-cert` parameter determines if the peer-certificate check is
192 * enabled (default) or disabled.
193 * The `max-conn-attempts` parameter sets the maximum number of allowed
195 * The default value of this parameter is `0`, which means that there is
197 * The `check-peer-cert` and `max-conn-attempts` parameters work
201 * * Setting `check-peer-cert` to `true`:
203 * `check-peer-cert` value is `true`, and the `max-conn-attempts` value is 0.
204 * * Setting `check-peer-cert` to `false`:
205 * `check-peer-cert` value is `false`, and the `max-conn-attempts` value is 0.
207 * `check-peer-cert` is `true`, and the `max-conn-attempts` value is the
252 * @cli coaps stop
285 * @cli coaps isclosed
301 * @cli coaps isconnected
317 * @cli coaps isconnactive
346 * @cli coaps get
348 * coaps get test-resource
352 * coaps get test-resource block-1024
355 * @cparam coaps get @ca{uri-path} [@ca{type}]
356 * * `uri-path`: URI path of the resource.
359 * * `non-con`: Non-confirmable (default)
360 * * `block-`: Use this option, followed by the block-wise value,
361 * if the response should be transferred block-wise.
362 * Valid values are: `block-16`, `block-32`, `block-64`, `block-128`,
363 * `block-256`, `block-512`, or `block-1024`.
371 * @cli coaps post
373 * coaps post test-resource con hellothere
377 * coaps post test-resource block-1024 10
380 * @cparam @ca{uri-path} [@ca{type}] [@ca{payload}]
381 * * `uri-path`: URI path of the resource.
384 * * `non-con`: Non-confirmable (default)
385 * * `block-`: Use this option, followed by the block-wise value,
387 * Valid values are: `block-16`, `block-32`, `block-64`, `block-128`,
388 * `block-256`, `block-512`, or `block-1024`.
390 * or an integer, depending on the `type`. If the `type` is `con` or `non-con`,
394 * `type` is `block-`, the value of the payload parameter must be an
395 * integer that specifies the number of blocks to send. The `block-` type
403 * @cli coaps put
405 * coaps put test-resource con hellothere
409 * coaps put test-resource block-1024 10
412 * @cparam @ca{uri-path} [@ca{type}] [@ca{payload}]
413 * * `uri-path`: URI path of the resource.
416 * * `non-con`: Non-confirmable (default)
417 * * `block-`: Use this option, followed by the block-wise value,
419 * Valid values are: `block-16`, `block-32`, `block-64`, `block-128`,
420 * `block-256`, `block-512`, or `block-1024`.
422 * or an integer, depending on the `type`. If the `type` is `con` or `non-con`,
426 * `type` is `block-`, the value of the payload parameter must be an
427 * integer that specifies the number of blocks to send. The `block-` type
435 * @cli coaps delete
437 * coaps delete test-resource con hellothere
440 * @cparam coaps delete @ca{uri-path} [@ca{type}] [@ca{payload}]
441 * * `uri-path`: URI path of the resource.
444 * * `non-con`: Non-confirmable (default)
460 // Default parameters in ProcessRequest()
480 else if (aArgs[1] == "block-16") in ProcessRequest()
486 else if (aArgs[1] == "block-32") in ProcessRequest()
492 else if (aArgs[1] == "block-64") in ProcessRequest()
498 else if (aArgs[1] == "block-128") in ProcessRequest()
504 else if (aArgs[1] == "block-256") in ProcessRequest()
510 else if (aArgs[1] == "block-512") in ProcessRequest()
516 else if (aArgs[1] == "block-1024") in ProcessRequest()
605 * @cli coaps connect
639 * @cli coaps disconnect
659 * <!--- This tag is before the IF statement so that Doxygen imports the command. --->
660 * @cli coaps psk
665 * @cparam coaps psk @ca{psk-value} @ca{psk-id}
666 * * `psk-value`: The pre-shared key
667 * * `psk-id`: The pre-shared key identifier.
669 * Sets the pre-shared key (PSK) and cipher suite DTLS_PSK_WITH_AES_128_CCM_8.
670 * @note This command requires the build-time feature
701 * <!--- This tag is before the IF statement so that Doxygen imports the command. --->
702 * @cli coaps x509
712 * The X.509 certificate is stored in the location: `src/cli/x509_cert_key.hpp`.
770 error = (this->*command->mHandler)(aArgs + 1); in Process()
788 static_cast<CoapSecure *>(aContext)->HandleConnected(aConnected); in HandleConnected()
811 static_cast<CoapSecure *>(aContext)->HandleRequest(aMessage, aMessageInfo); in HandleRequest()
826 OutputIp6Address(aMessageInfo->mPeerAddr); in HandleRequest()
855 default: in HandleRequest()
935 static_cast<CoapSecure *>(aContext)->HandleResponse(aMessage, aMessageInfo, aError); in HandleResponse()
949 OutputIp6Address(aMessageInfo->mPeerAddr); in HandleResponse()
958 static_cast<CoapSecure *>(aContext)->DefaultHandler(aMessage, aMessageInfo); in DefaultHandler()
994 …return static_cast<CoapSecure *>(aContext)->BlockwiseReceiveHook(aBlock, aPosition, aBlockLength, … in BlockwiseReceiveHook()
1023 …return static_cast<CoapSecure *>(aContext)->BlockwiseTransmitHook(aBlock, aPosition, aBlockLength,… in BlockwiseTransmitHook()
1041 if (blockCount == mBlockCount - 1) in BlockwiseTransmitHook()
1056 } // namespace Cli