mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[ncp] fix spacing/alignments and typos in comment (#1994)
This commit is contained in:
committed by
Jonathan Hui
parent
e350d4e49f
commit
4a1bbc8044
@@ -979,7 +979,7 @@ typedef struct otNetifAddress
|
||||
uint8_t mPrefixLength; ///< The Prefix length.
|
||||
bool mPreferred : 1; ///< TRUE if the address is preferred, FALSE otherwise.
|
||||
bool mValid : 1; ///< TRUE if the address is valid, FALSE otherwise.
|
||||
bool mScopeOverrideValid : 1; ///< TRUE if the mScopeOverride value is valid, FALSE othewrise.
|
||||
bool mScopeOverrideValid : 1; ///< TRUE if the mScopeOverride value is valid, FALSE otherwise.
|
||||
unsigned int mScopeOverride : 4; ///< The IPv6 scope of this address.
|
||||
bool mRloc : 1; ///< TRUE if the address is an RLOC, FALSE otherwise.
|
||||
struct otNetifAddress *mNext; ///< A pointer to the next network interface address.
|
||||
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* This method schedules the timer to fire a @p dt microseconds from now.
|
||||
* This method schedules the timer to fire a @p aDt microseconds from now.
|
||||
*
|
||||
* @param[in] aDt The expire time in microseconds from now.
|
||||
* (aDt must be smaller than or equal to kMaxDt).
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
otError GetNextAddress(otMacFilterIterator &aIterator, Entry &aEntry);
|
||||
|
||||
/**
|
||||
* This method sets the received signal strength for the messsages from the Extended Address.
|
||||
* This method sets the received signal strength for the messages from the Extended Address.
|
||||
* The default received signal strength for all received messages would be set if no Extended Address is specified.
|
||||
*
|
||||
* @param[in] aExtAddress A pointer to the Extended Address, or NULL to set the default received signal strength.
|
||||
|
||||
+80
-63
@@ -2166,7 +2166,6 @@ exit:
|
||||
// MARK: Individual Property Getters
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
otError NcpBase::GetPropertyHandler_LAST_STATUS(uint8_t aHeader, spinel_prop_key_t aKey)
|
||||
{
|
||||
return SendPropertyUpdate(aHeader, SPINEL_CMD_PROP_VALUE_IS, aKey, SPINEL_DATATYPE_UINT_PACKED_S, mLastStatus);
|
||||
@@ -3009,10 +3008,12 @@ otError NcpBase::GetPropertyHandler_THREAD_CHILD_TABLE(uint8_t aHeader, spinel_p
|
||||
continue;
|
||||
}
|
||||
|
||||
modeFlags = LinkFlagsToFlagByte(childInfo.mRxOnWhenIdle,
|
||||
childInfo.mSecureDataRequest,
|
||||
childInfo.mFullFunction,
|
||||
childInfo.mFullNetworkData);
|
||||
modeFlags = LinkFlagsToFlagByte(
|
||||
childInfo.mRxOnWhenIdle,
|
||||
childInfo.mSecureDataRequest,
|
||||
childInfo.mFullFunction,
|
||||
childInfo.mFullNetworkData
|
||||
);
|
||||
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
@@ -3057,15 +3058,22 @@ otError NcpBase::GetPropertyHandler_THREAD_NEIGHBOR_TABLE(uint8_t aHeader, spine
|
||||
mDisableStreamWrite = true;
|
||||
|
||||
SuccessOrExit(error = OutboundFrameBegin(aHeader));
|
||||
SuccessOrExit(error = OutboundFrameFeedPacked(SPINEL_DATATYPE_COMMAND_PROP_S, aHeader, SPINEL_CMD_PROP_VALUE_IS,
|
||||
aKey));
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_COMMAND_PROP_S,
|
||||
aHeader,
|
||||
SPINEL_CMD_PROP_VALUE_IS,
|
||||
aKey
|
||||
));
|
||||
|
||||
while (otThreadGetNextNeighborInfo(mInstance, &iter, &neighInfo) == OT_ERROR_NONE)
|
||||
{
|
||||
modeFlags = LinkFlagsToFlagByte(neighInfo.mRxOnWhenIdle,
|
||||
neighInfo.mSecureDataRequest,
|
||||
neighInfo.mFullFunction,
|
||||
neighInfo.mFullNetworkData);
|
||||
modeFlags = LinkFlagsToFlagByte(
|
||||
neighInfo.mRxOnWhenIdle,
|
||||
neighInfo.mSecureDataRequest,
|
||||
neighInfo.mFullFunction,
|
||||
neighInfo.mFullNetworkData
|
||||
);
|
||||
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
@@ -3108,8 +3116,13 @@ otError NcpBase::GetPropertyHandler_THREAD_ASSISTING_PORTS(uint8_t aHeader, spin
|
||||
const uint16_t *ports = otIp6GetUnsecurePorts(mInstance, &numEntries);
|
||||
|
||||
SuccessOrExit(error = OutboundFrameBegin(aHeader));
|
||||
SuccessOrExit(error = OutboundFrameFeedPacked(SPINEL_DATATYPE_COMMAND_PROP_S, aHeader, SPINEL_CMD_PROP_VALUE_IS,
|
||||
aKey));
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_COMMAND_PROP_S,
|
||||
aHeader,
|
||||
SPINEL_CMD_PROP_VALUE_IS,
|
||||
aKey
|
||||
));
|
||||
|
||||
for (; numEntries != 0; ports++, numEntries--)
|
||||
{
|
||||
@@ -3175,20 +3188,21 @@ otError NcpBase::GetPropertyHandler_THREAD_ON_MESH_NETS(uint8_t aHeader, spinel_
|
||||
|
||||
flags = BorderRouterConfigToFlagByte(borderRouterConfig);
|
||||
|
||||
SuccessOrExit(error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_IPv6ADDR_S // IPv6 Prefix
|
||||
SPINEL_DATATYPE_UINT8_S // Prefix Length (in bits)
|
||||
SPINEL_DATATYPE_BOOL_S // isStable
|
||||
SPINEL_DATATYPE_UINT8_S // Flags
|
||||
SPINEL_DATATYPE_BOOL_S // isLocal
|
||||
),
|
||||
&borderRouterConfig.mPrefix,
|
||||
64,
|
||||
borderRouterConfig.mStable,
|
||||
flags,
|
||||
false
|
||||
));
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_IPv6ADDR_S // IPv6 Prefix
|
||||
SPINEL_DATATYPE_UINT8_S // Prefix Length (in bits)
|
||||
SPINEL_DATATYPE_BOOL_S // isStable
|
||||
SPINEL_DATATYPE_UINT8_S // Flags
|
||||
SPINEL_DATATYPE_BOOL_S // isLocal
|
||||
),
|
||||
&borderRouterConfig.mPrefix,
|
||||
64,
|
||||
borderRouterConfig.mStable,
|
||||
flags,
|
||||
false
|
||||
));
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_BORDER_ROUTER
|
||||
@@ -3204,20 +3218,21 @@ otError NcpBase::GetPropertyHandler_THREAD_ON_MESH_NETS(uint8_t aHeader, spinel_
|
||||
|
||||
flags = BorderRouterConfigToFlagByte(borderRouterConfig);
|
||||
|
||||
SuccessOrExit(error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_IPv6ADDR_S // IPv6 Prefix
|
||||
SPINEL_DATATYPE_UINT8_S // Prefix Length (in bits)
|
||||
SPINEL_DATATYPE_BOOL_S // isStable
|
||||
SPINEL_DATATYPE_UINT8_S // Flags
|
||||
SPINEL_DATATYPE_BOOL_S // isLocal
|
||||
),
|
||||
&borderRouterConfig.mPrefix,
|
||||
64,
|
||||
borderRouterConfig.mStable,
|
||||
flags,
|
||||
true
|
||||
));
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_IPv6ADDR_S // IPv6 Prefix
|
||||
SPINEL_DATATYPE_UINT8_S // Prefix Length (in bits)
|
||||
SPINEL_DATATYPE_BOOL_S // isStable
|
||||
SPINEL_DATATYPE_UINT8_S // Flags
|
||||
SPINEL_DATATYPE_BOOL_S // isLocal
|
||||
),
|
||||
&borderRouterConfig.mPrefix,
|
||||
64,
|
||||
borderRouterConfig.mStable,
|
||||
flags,
|
||||
true
|
||||
));
|
||||
}
|
||||
#endif // OPENTHREAD_ENABLE_BORDER_ROUTER
|
||||
|
||||
@@ -3990,14 +4005,14 @@ otError NcpBase::GetPropertyHandler_MAC_WHITELIST(uint8_t aHeader, spinel_prop_k
|
||||
while (otLinkFilterGetNextAddress(mInstance, &iterator, &entry) == OT_ERROR_NONE)
|
||||
{
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_EUI64_S // Extended address
|
||||
SPINEL_DATATYPE_INT8_S // Rss
|
||||
),
|
||||
entry.mExtAddress.m8,
|
||||
entry.mRssIn
|
||||
));
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_EUI64_S // Extended address
|
||||
SPINEL_DATATYPE_INT8_S // Rss
|
||||
),
|
||||
entry.mExtAddress.m8,
|
||||
entry.mRssIn
|
||||
));
|
||||
}
|
||||
|
||||
SuccessOrExit(error = OutboundFrameSend());
|
||||
@@ -4041,11 +4056,11 @@ otError NcpBase::GetPropertyHandler_MAC_BLACKLIST(uint8_t aHeader, spinel_prop_k
|
||||
while (otLinkFilterGetNextAddress(mInstance, &iterator, &entry) == OT_ERROR_NONE)
|
||||
{
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_EUI64_S // Extended address
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_EUI64_S // Extended address
|
||||
),
|
||||
entry.mExtAddress.m8
|
||||
entry.mExtAddress.m8
|
||||
));
|
||||
}
|
||||
|
||||
@@ -4090,13 +4105,13 @@ otError NcpBase::GetPropertyHandler_MAC_FIXED_RSS(uint8_t aHeader, spinel_prop_k
|
||||
while (otLinkFilterGetNextRssIn(mInstance, &iterator, &entry) == OT_ERROR_NONE)
|
||||
{
|
||||
SuccessOrExit(
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_EUI64_S // Extended address
|
||||
SPINEL_DATATYPE_INT8_S // Rss
|
||||
error = OutboundFrameFeedPacked(
|
||||
SPINEL_DATATYPE_STRUCT_S(
|
||||
SPINEL_DATATYPE_EUI64_S // Extended address
|
||||
SPINEL_DATATYPE_INT8_S // Rss
|
||||
),
|
||||
entry.mExtAddress.m8,
|
||||
entry.mRssIn
|
||||
entry.mExtAddress.m8,
|
||||
entry.mRssIn
|
||||
));
|
||||
}
|
||||
|
||||
@@ -4128,10 +4143,12 @@ otError NcpBase::GetPropertyHandler_THREAD_MODE(uint8_t aHeader, spinel_prop_key
|
||||
uint8_t numericMode;
|
||||
otLinkModeConfig modeConfig = otThreadGetLinkMode(mInstance);
|
||||
|
||||
numericMode = LinkFlagsToFlagByte(modeConfig.mRxOnWhenIdle,
|
||||
modeConfig.mSecureDataRequests,
|
||||
modeConfig.mDeviceType,
|
||||
modeConfig.mNetworkData);
|
||||
numericMode = LinkFlagsToFlagByte(
|
||||
modeConfig.mRxOnWhenIdle,
|
||||
modeConfig.mSecureDataRequests,
|
||||
modeConfig.mDeviceType,
|
||||
modeConfig.mNetworkData
|
||||
);
|
||||
|
||||
return SendPropertyUpdate(
|
||||
aHeader,
|
||||
|
||||
Reference in New Issue
Block a user