mirror of
https://github.com/espressif/openthread.git
synced 2026-07-29 15:17:47 +00:00
[docs] cli cmd doc updates (mliid - multiradio neighbor) (#9155)
This commit is contained in:
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (330)
|
||||
#define OPENTHREAD_API_VERSION (331)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -731,7 +731,7 @@ otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageI
|
||||
/**
|
||||
* Indicates whether the SLAAC module is enabled or not.
|
||||
*
|
||||
* Requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled.
|
||||
* `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` build-time feature must be enabled.
|
||||
*
|
||||
* @retval TRUE SLAAC module is enabled.
|
||||
* @retval FALSE SLAAC module is disabled.
|
||||
@@ -742,7 +742,7 @@ bool otIp6IsSlaacEnabled(otInstance *aInstance);
|
||||
/**
|
||||
* Enables/disables the SLAAC module.
|
||||
*
|
||||
* Requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled.
|
||||
* `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` build-time feature must be enabled.
|
||||
*
|
||||
* When SLAAC module is enabled, SLAAC addresses (based on on-mesh prefixes in Network Data) are added to the interface.
|
||||
* When SLAAC module is disabled any previously added SLAAC address is removed.
|
||||
@@ -772,7 +772,7 @@ typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix
|
||||
/**
|
||||
* Sets the SLAAC module filter handler.
|
||||
*
|
||||
* Requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled.
|
||||
* `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` build-time feature must be enabled.
|
||||
*
|
||||
* The filter handler is called by SLAAC module when it is about to add a SLAAC address based on a prefix to decide
|
||||
* whether the address should be added or not.
|
||||
@@ -812,8 +812,8 @@ typedef void (*otIp6RegisterMulticastListenersCallback)(void *aCon
|
||||
/**
|
||||
* Registers Multicast Listeners to Primary Backbone Router.
|
||||
*
|
||||
* Note: only available when both `OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE` and
|
||||
* `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` are enabled)
|
||||
* `OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE` and `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE`
|
||||
* must be enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aAddresses A Multicast Address Array to register.
|
||||
@@ -845,7 +845,7 @@ otError otIp6RegisterMulticastListeners(otInstance *
|
||||
/**
|
||||
* Sets the Mesh Local IID (for test purpose).
|
||||
*
|
||||
* Only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.
|
||||
* `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` must be enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aIid A pointer to the Mesh Local IID to set.
|
||||
@@ -897,7 +897,7 @@ typedef struct otBorderRoutingCounters
|
||||
/**
|
||||
* Gets the Border Routing counters.
|
||||
*
|
||||
* Requires the build-time feature `OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE` to be enabled.
|
||||
* `OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE` build-time feature must be enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
*
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct otMultiRadioNeighborInfo
|
||||
/**
|
||||
* Gets the multi radio link information associated with a neighbor with a given Extended Address.
|
||||
*
|
||||
* Requires the multi radio link feature to be enabled (please see `config/radio_link.h`).
|
||||
* `OPENTHREAD_CONFIG_MULTI_RADIO` must be enabled.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aExtAddress The Extended Address of neighbor.
|
||||
|
||||
+97
-1
@@ -4101,6 +4101,20 @@ exit:
|
||||
#endif // OPENTHREAD_FTD
|
||||
|
||||
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||
/**
|
||||
* @cli mliid
|
||||
* @code
|
||||
* mliid 1122334455667788
|
||||
* Done
|
||||
* @endcode
|
||||
* @par
|
||||
* It must be used before Thread stack is enabled.
|
||||
* @par
|
||||
* Only for testing/reference device.
|
||||
* @par api_copy
|
||||
* #otIp6SetMeshLocalIid
|
||||
* @cparam mliid @ca{iid}
|
||||
*/
|
||||
template <> otError Interpreter::Process<Cmd("mliid")>(Arg aArgs[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
@@ -4117,7 +4131,37 @@ exit:
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
|
||||
|
||||
/**
|
||||
* @cli mlr reg
|
||||
* @code
|
||||
* mlr reg ff04::1
|
||||
* status 0, 0 failed
|
||||
* Done
|
||||
* @endcode
|
||||
* @code
|
||||
* mlr reg ff04::1 ff04::2 ff02::1
|
||||
* status 2, 1 failed
|
||||
* ff02:0:0:0:0:0:0:1
|
||||
* Done
|
||||
* @endcode
|
||||
* @code
|
||||
* mlr reg ff04::1 ff04::2 1000
|
||||
* status 0, 0 failed
|
||||
* Done
|
||||
* @endcode
|
||||
* @code
|
||||
* mlr reg ff04::1 ff04::2 0
|
||||
* status 0, 0 failed
|
||||
* Done
|
||||
* @endcode
|
||||
* @par
|
||||
* Omit timeout to use the default MLR timeout on the Primary Backbone Router.
|
||||
* @par
|
||||
* Use timeout = 0 to deregister Multicast Listeners.
|
||||
* @par api_copy
|
||||
* #otIp6RegisterMulticastListeners
|
||||
* @cparam mlr reg @ca{ipaddr} [@ca{timeout}]
|
||||
*/
|
||||
template <> otError Interpreter::Process<Cmd("mlr")>(Arg aArgs[])
|
||||
{
|
||||
otError error = OT_ERROR_INVALID_COMMAND;
|
||||
@@ -4205,6 +4249,24 @@ template <> otError Interpreter::Process<Cmd("mode")>(Arg aArgs[])
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @cli mode (get,set)
|
||||
* @code
|
||||
* mode rdn
|
||||
* Done
|
||||
* @endcode
|
||||
* @code
|
||||
* mode -
|
||||
* Done
|
||||
* @endcode
|
||||
* @par api_copy
|
||||
* #otThreadSetLinkMode
|
||||
* @cparam mode [@ca{rdn}]
|
||||
* - `-`: -: no flags set (rx-off-when-idle, minimal Thread device, stable network data)
|
||||
* - `r`: rx-on-when-idle
|
||||
* - `d`: Full Thread Device
|
||||
* - `n`: Full Network Data
|
||||
*/
|
||||
if (aArgs[0] != "-")
|
||||
{
|
||||
for (const char *arg = aArgs[0].GetCString(); *arg != '\0'; arg++)
|
||||
@@ -4235,6 +4297,18 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
/**
|
||||
* @cli multiradio
|
||||
* @code
|
||||
* multiradio
|
||||
* [15.4, TREL]
|
||||
* Done
|
||||
* @endcode
|
||||
* @par
|
||||
* Get the list of supported radio links by the device.
|
||||
* @par
|
||||
* This command is always available, even when only a single radio is supported by the device.
|
||||
*/
|
||||
template <> otError Interpreter::Process<Cmd("multiradio")>(Arg aArgs[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
@@ -4262,6 +4336,17 @@ template <> otError Interpreter::Process<Cmd("multiradio")>(Arg aArgs[])
|
||||
{
|
||||
otMultiRadioNeighborInfo multiRadioInfo;
|
||||
|
||||
/**
|
||||
* @cli multiradio neighbor list
|
||||
* @code
|
||||
* multiradio neighbor list
|
||||
* ExtAddr:3a65bc38dbe4a5be, RLOC16:0xcc00, Radios:[15.4(255), TREL(255)]
|
||||
* ExtAddr:17df23452ee4a4be, RLOC16:0x1300, Radios:[15.4(255)]
|
||||
* Done
|
||||
* @endcode
|
||||
* @par api_copy
|
||||
* #otMultiRadioGetNeighborInfo
|
||||
*/
|
||||
if (aArgs[1] == "list")
|
||||
{
|
||||
otNeighborInfoIterator iterator = OT_NEIGHBOR_INFO_ITERATOR_INIT;
|
||||
@@ -4283,6 +4368,17 @@ template <> otError Interpreter::Process<Cmd("multiradio")>(Arg aArgs[])
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* @cli multiradio neighbor
|
||||
* @code
|
||||
* multiradio neighbor 3a65bc38dbe4a5be
|
||||
* [15.4(255), TREL(255)]
|
||||
* Done
|
||||
* @endcode
|
||||
* @par api_copy
|
||||
* #otMultiRadioGetNeighborInfo
|
||||
* @cparam multiradio neighbor @ca{ext-address}
|
||||
*/
|
||||
otExtAddress extAddress;
|
||||
|
||||
SuccessOrExit(error = aArgs[1].ParseAsHexString(extAddress.m8));
|
||||
|
||||
Reference in New Issue
Block a user