mirror of
https://github.com/espressif/openthread.git
synced 2026-08-05 18:37:45 +00:00
[style] use prefix a for function/method argument names (#2437)
This commit is contained in:
committed by
Jonathan Hui
parent
fb5faeb6f8
commit
16f3213973
@@ -140,9 +140,9 @@ void otCliUartAppendResult(otError aError);
|
||||
* @param[in] aLogLevel The log level.
|
||||
* @param[in] aLogRegion The log region.
|
||||
* @param[in] aFormat A pointer to the format string.
|
||||
* @param[in] ap va_list matching aFormat.
|
||||
* @param[in] aArgs va_list matching aFormat.
|
||||
*/
|
||||
void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap);
|
||||
void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -62,13 +62,13 @@ void otDiagInit(otInstance *aInstance);
|
||||
/**
|
||||
* This function processes a factory diagnostics command line.
|
||||
*
|
||||
* @param[in] argc The argument counter of diagnostics command line.
|
||||
* @param[in] argv The argument vector of diagnostics command line.
|
||||
* @param[in] aArgc The argument counter of diagnostics command line.
|
||||
* @param[in] aArgv The argument vector of diagnostics command line.
|
||||
*
|
||||
* @returns A pointer to the output string.
|
||||
*
|
||||
*/
|
||||
char *otDiagProcessCmd(int argc, char *argv[]);
|
||||
char *otDiagProcessCmd(int aArgc, char *aArgv[]);
|
||||
|
||||
/**
|
||||
* This function processes a factory diagnostics command line.
|
||||
|
||||
@@ -166,8 +166,8 @@ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler);
|
||||
* May be zero.
|
||||
*
|
||||
*/
|
||||
otError otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage,
|
||||
const otMessageInfo *aMessageInfo, uint16_t aIdentifier);
|
||||
otError otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo,
|
||||
uint16_t aIdentifier);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -103,7 +103,8 @@ typedef void (OTCALL *otDeviceAvailabilityChangedCallback)(bool aAdded, const GU
|
||||
*
|
||||
*/
|
||||
OTAPI void OTCALL otSetDeviceAvailabilityChangedCallback(otApiInstance *aApiInstance,
|
||||
otDeviceAvailabilityChangedCallback aCallback, void *aCallbackContext);
|
||||
otDeviceAvailabilityChangedCallback aCallback,
|
||||
void *aCallbackContext);
|
||||
|
||||
/**
|
||||
* This function querys the list of OpenThread device contexts on the system.
|
||||
|
||||
@@ -347,13 +347,13 @@ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntrie
|
||||
/**
|
||||
* Test if two IPv6 addresses are the same.
|
||||
*
|
||||
* @param[in] a A pointer to the first IPv6 address to compare.
|
||||
* @param[in] b A pointer to the second IPv6 address to compare.
|
||||
* @param[in] aFrist A pointer to the first IPv6 address to compare.
|
||||
* @param[in] aSecond A pointer to the second IPv6 address to compare.
|
||||
*
|
||||
* @retval TRUE The two IPv6 addresses are the same.
|
||||
* @retval FALSE The two IPv6 addresses are not the same.
|
||||
*/
|
||||
OTAPI bool OTCALL otIp6IsAddressEqual(const otIp6Address *a, const otIp6Address *b);
|
||||
OTAPI bool OTCALL otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond);
|
||||
|
||||
/**
|
||||
* Convert a human-readable IPv6 address string into a binary representation.
|
||||
|
||||
@@ -208,9 +208,9 @@ void otNcpRegisterLegacyHandlers(const otNcpLegacyHandlers *aHandlers);
|
||||
* @param[in] aLogLevel The log level.
|
||||
* @param[in] aLogRegion The log region.
|
||||
* @param[in] aFormat A pointer to the format string.
|
||||
* @param[in] ap va_list matching aFormat.
|
||||
* @param[in] aArgs va_list matching aFormat.
|
||||
*/
|
||||
void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap);
|
||||
void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -294,14 +294,14 @@ void Uart::SendDoneTask(void)
|
||||
Send();
|
||||
}
|
||||
|
||||
extern "C" void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap)
|
||||
extern "C" void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs)
|
||||
{
|
||||
if (NULL == Uart::sUartServer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Uart::sUartServer->OutputFormatV(aFormat, ap);
|
||||
Uart::sUartServer->OutputFormatV(aFormat, aArgs);
|
||||
Uart::sUartServer->OutputFormat("\r\n");
|
||||
|
||||
OT_UNUSED_VARIABLE(aLogLevel);
|
||||
|
||||
@@ -86,18 +86,19 @@ const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance)
|
||||
return instance.GetThreadNetif().GetUnicastAddresses();
|
||||
}
|
||||
|
||||
otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *address)
|
||||
otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *aAddress)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
return instance.GetThreadNetif().AddExternalUnicastAddress(*static_cast<const Ip6::NetifUnicastAddress *>(address));
|
||||
return instance.GetThreadNetif().AddExternalUnicastAddress(
|
||||
*static_cast<const Ip6::NetifUnicastAddress *>(aAddress));
|
||||
}
|
||||
|
||||
otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *address)
|
||||
otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
return instance.GetThreadNetif().RemoveExternalUnicastAddress(*static_cast<const Ip6::Address *>(address));
|
||||
return instance.GetThreadNetif().RemoveExternalUnicastAddress(*static_cast<const Ip6::Address *>(aAddress));
|
||||
}
|
||||
|
||||
const otNetifMulticastAddress *otIp6GetMulticastAddresses(otInstance *aInstance)
|
||||
@@ -233,14 +234,14 @@ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntrie
|
||||
return instance.GetThreadNetif().GetIp6Filter().GetUnsecurePorts(*aNumEntries);
|
||||
}
|
||||
|
||||
bool otIp6IsAddressEqual(const otIp6Address *a, const otIp6Address *b)
|
||||
bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond)
|
||||
{
|
||||
return *static_cast<const Ip6::Address *>(a) == *static_cast<const Ip6::Address *>(b);
|
||||
return *static_cast<const Ip6::Address *>(aFirst) == *static_cast<const Ip6::Address *>(aSecond);
|
||||
}
|
||||
|
||||
otError otIp6AddressFromString(const char *str, otIp6Address *address)
|
||||
otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress)
|
||||
{
|
||||
return static_cast<Ip6::Address *>(address)->FromString(str);
|
||||
return static_cast<Ip6::Address *>(aAddress)->FromString(aString);
|
||||
}
|
||||
|
||||
uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond)
|
||||
|
||||
@@ -48,21 +48,21 @@ void otDiagInit(otInstance *aInstance)
|
||||
Diag::Init(aInstance);
|
||||
}
|
||||
|
||||
char *otDiagProcessCmd(int argc, char *argv[])
|
||||
char *otDiagProcessCmd(int aArgc, char *aArgv[])
|
||||
{
|
||||
return Diag::ProcessCmd(argc, argv);
|
||||
return Diag::ProcessCmd(aArgc, aArgv);
|
||||
}
|
||||
|
||||
char *otDiagProcessCmdLine(char *string)
|
||||
char *otDiagProcessCmdLine(char *aString)
|
||||
{
|
||||
char *argv[8];
|
||||
int argc = 0;
|
||||
int length = static_cast<int>(strlen(string));
|
||||
int length = static_cast<int>(strlen(aString));
|
||||
char *cmd;
|
||||
|
||||
for (; *string == ' '; string++, length--);
|
||||
for (; *aString == ' '; aString++, length--);
|
||||
|
||||
for (cmd = string + 1; (cmd < string + length) && (cmd != NULL); ++cmd)
|
||||
for (cmd = aString + 1; (cmd < aString + length) && (cmd != NULL); ++cmd)
|
||||
{
|
||||
if (*cmd == ' ' || *cmd == '\r' || *cmd == '\n')
|
||||
{
|
||||
|
||||
@@ -2124,12 +2124,12 @@ otError otNcpStreamWrite(int aStreamId, const uint8_t *aDataPtr, int aDataLen)
|
||||
}
|
||||
|
||||
|
||||
extern "C" void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap)
|
||||
extern "C" void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs)
|
||||
{
|
||||
char logString[128];
|
||||
int charsWritten;
|
||||
|
||||
if ((charsWritten = vsnprintf(logString, sizeof(logString), aFormat, ap)) > 0)
|
||||
if ((charsWritten = vsnprintf(logString, sizeof(logString), aFormat, aArgs)) > 0)
|
||||
{
|
||||
if (charsWritten > static_cast<int>(sizeof(logString) - 1))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user