[posix] use Url instead of RadioUrl in headers (#6543)

This commit is contained in:
Yakun Xu
2021-05-03 22:55:54 -07:00
committed by GitHub
parent cc7b7d991b
commit 864c4be9e5
7 changed files with 16 additions and 15 deletions
+3 -3
View File
@@ -140,7 +140,7 @@ void HdlcInterface::OnRcpReset(void)
mHdlcDecoder.Reset();
}
otError HdlcInterface::Init(const RadioUrl &aRadioUrl)
otError HdlcInterface::Init(const Url::Url &aRadioUrl)
{
otError error = OT_ERROR_NONE;
struct stat st;
@@ -411,7 +411,7 @@ exit:
return error;
}
int HdlcInterface::OpenFile(const RadioUrl &aRadioUrl)
int HdlcInterface::OpenFile(const Url::Url &aRadioUrl)
{
int fd = -1;
int rval = 0;
@@ -587,7 +587,7 @@ exit:
}
#if OPENTHREAD_POSIX_CONFIG_RCP_PTY_ENABLE
int HdlcInterface::ForkPty(const RadioUrl &aRadioUrl)
int HdlcInterface::ForkPty(const Url::Url &aRadioUrl)
{
int fd = -1;
int pid = -1;
+3 -3
View File
@@ -81,7 +81,7 @@ public:
* @retval OT_ERROR_INVALID_ARGS The UART device or executable cannot be found or failed to open/run.
*
*/
otError Init(const RadioUrl &aRadioUrl);
otError Init(const Url::Url &aRadioUrl);
/**
* This method deinitializes the interface to the RCP.
@@ -212,9 +212,9 @@ private:
static void HandleHdlcFrame(void *aContext, otError aError);
void HandleHdlcFrame(otError aError);
int OpenFile(const RadioUrl &aRadioUrl);
int OpenFile(const Url::Url &aRadioUrl);
#if OPENTHREAD_POSIX_CONFIG_RCP_PTY_ENABLE
static int ForkPty(const RadioUrl &aRadioUrl);
static int ForkPty(const Url::Url &aRadioUrl);
#endif
enum
+1 -1
View File
@@ -53,8 +53,8 @@
#include "common/logging.hpp"
#include "radio_url.hpp"
#include "lib/platform/exit_code.h"
#include "lib/url/url.hpp"
/**
* @def OPENTHREAD_POSIX_VIRTUAL_TIME
+6 -6
View File
@@ -92,12 +92,12 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable)
void platformRadioInit(otUrl *aRadioUrl)
{
ot::Posix::RadioUrl &radioUrl = *static_cast<ot::Posix::RadioUrl *>(aRadioUrl);
bool resetRadio = (radioUrl.GetValue("no-reset") == nullptr);
bool restoreDataset = (radioUrl.GetValue("ncp-dataset") != nullptr);
bool skipCompatibilityCheck = (radioUrl.GetValue("skip-rcp-compatibility-check") != nullptr);
const char * parameterValue;
const char * region;
ot::Url::Url &radioUrl = *static_cast<ot::Url::Url *>(aRadioUrl);
bool resetRadio = (radioUrl.GetValue("no-reset") == nullptr);
bool restoreDataset = (radioUrl.GetValue("ncp-dataset") != nullptr);
bool skipCompatibilityCheck = (radioUrl.GetValue("skip-rcp-compatibility-check") != nullptr);
const char * parameterValue;
const char * region;
#if OPENTHREAD_POSIX_CONFIG_MAX_POWER_TABLE_ENABLE
const char *maxPowerTable;
#endif
+1 -1
View File
@@ -105,7 +105,7 @@ void SpiInterface::OnRcpReset(void)
usleep(static_cast<useconds_t>(mSpiResetDelay) * kUsecPerMsec);
}
otError SpiInterface::Init(const RadioUrl &aRadioUrl)
otError SpiInterface::Init(const Url::Url &aRadioUrl)
{
const char *spiGpioIntDevice;
const char *spiGpioResetDevice;
+1 -1
View File
@@ -86,7 +86,7 @@ public:
* @retval OT_ERROR_INVALID_ARGS The UART device or executable cannot be found or failed to open/run.
*
*/
otError Init(const RadioUrl &aRadioUrl);
otError Init(const Url::Url &aRadioUrl);
/**
* This method deinitializes the interface to the RCP.
+1
View File
@@ -47,6 +47,7 @@
#include <openthread/platform/radio.h>
#include "common/code_utils.hpp"
#include "posix/platform/radio_url.hpp"
#if OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE || OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
static void processStateChange(otChangedFlags aFlags, void *aContext)