Skip to content

Commit

Permalink
[tcat] TCAT documentation cleanup.
Browse files Browse the repository at this point in the history
Commit adds documentation to tcat CLi commands, also removes incorrect
parameter form `otBleSecureTcatStart`.
  • Loading branch information
Przemyslaw Bida committed Sep 6, 2024
1 parent 4459c54 commit 1930255
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
2 changes: 0 additions & 2 deletions include/openthread/ble_secure.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ otError otBleSecureSetTcatVendorInfo(otInstance *aInstance, const otTcatVendorIn
* Enables the TCAT protocol over BLE Secure.
*
* @param[in] aInstance A pointer to an OpenThread instance.
* @param[in] aVendorInfo A pointer to the Vendor Information (must remain valid after the method call, may be
* NULL).
* @param[in] aHandler A pointer to a function that is called when the join operation completes.
*
* @retval OT_ERROR_NONE Successfully started the BLE Secure Joiner role.
Expand Down
51 changes: 51 additions & 0 deletions src/cli/cli_tcat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,23 @@ static void HandleBleSecureReceive(otInstance *aInstance,
IgnoreReturnValue(otBleSecureFlush(aInstance));
}

/**
* @cli tcat advid
* @code
* tcat advid ianapen f378aabb
* Done
* @endcode
* @cparam tcat advid [@ca{id_type}] [@ca{value}]
* * The `id_type` has three possible values:
* * `clear` - removes all previously set advertised IDs.
* * `oui24` - sets OUI24 ID type.
* * `oui36` - sets OUI36 ID type.
* * `discriminator` - sets discriminator ID type.
* * `ianapen` - sets ianapen ID type.
* * The `value` hexstring value of the ID.
* @par
* Sets/clears advertised ID type and value.
*/
template <> otError Tcat::Process<Cmd("advid")>(Arg aArgs[])
{
otError error = OT_ERROR_NONE;
Expand Down Expand Up @@ -212,6 +229,17 @@ template <> otError Tcat::Process<Cmd("advid")>(Arg aArgs[])
return error;
}

/**
* @cli tcat devid
* @code
* tcat devid ianapen f378aabb
* Done
* @endcode
* @cparam tcat devid [@ca{value}]
* * The `value` hexstring value of the ID. `clear` is a special value removing previously set ID.
* @par
* Sets/clears vendor specific device ID.
*/
template <> otError Tcat::Process<Cmd("devid")>(Arg aArgs[])
{
otError error = OT_ERROR_NONE;
Expand Down Expand Up @@ -241,6 +269,20 @@ template <> otError Tcat::Process<Cmd("devid")>(Arg aArgs[])
return error;
}

/**
* @cli tcat start
* @code
* tcat start
* Done
* @endcode
* Starts TCAT operation.
* @sa otBleSecureSetCertificate
* @sa otBleSecureSetCaCertificateChain
* @sa otBleSecureSetSslAuthMode
* @sa otBleSecureSetTcatVendorInfo
* @sa otBleSecureStart
* @sa otBleSecureTcatStart
*/
template <> otError Tcat::Process<Cmd("start")>(Arg aArgs[])
{
OT_UNUSED_VARIABLE(aArgs);
Expand Down Expand Up @@ -279,6 +321,15 @@ template <> otError Tcat::Process<Cmd("start")>(Arg aArgs[])
return error;
}

/**
* @cli tcat stop
* @code
* tcat stop
* Done
* @endcode
* Stops TCAT operation.
* @sa otBleSecureStop
*/
template <> otError Tcat::Process<Cmd("stop")>(Arg aArgs[])
{
OT_UNUSED_VARIABLE(aArgs);
Expand Down

0 comments on commit 1930255

Please sign in to comment.