mirror of
https://github.com/espressif/openthread.git
synced 2026-10-09 01:07:39 +00:00
[mesh-forwarder] change Start() and Stop() to be void (no error return) (#3509)
This commit is contained in:
committed by
Jonathan Hui
parent
249bc59874
commit
f13e35d5f7
@@ -97,23 +97,18 @@ MeshForwarder::MeshForwarder(Instance &aInstance)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
otError MeshForwarder::Start(void)
|
void MeshForwarder::Start(void)
|
||||||
{
|
{
|
||||||
otError error = OT_ERROR_NONE;
|
|
||||||
|
|
||||||
if (mEnabled == false)
|
if (mEnabled == false)
|
||||||
{
|
{
|
||||||
GetNetif().GetMac().SetRxOnWhenIdle(true);
|
GetNetif().GetMac().SetRxOnWhenIdle(true);
|
||||||
mEnabled = true;
|
mEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
otError MeshForwarder::Stop(void)
|
void MeshForwarder::Stop(void)
|
||||||
{
|
{
|
||||||
ThreadNetif &netif = GetNetif();
|
ThreadNetif &netif = GetNetif();
|
||||||
otError error = OT_ERROR_NONE;
|
|
||||||
Message * message;
|
Message * message;
|
||||||
|
|
||||||
VerifyOrExit(mEnabled == true);
|
VerifyOrExit(mEnabled == true);
|
||||||
@@ -147,7 +142,7 @@ otError MeshForwarder::Stop(void)
|
|||||||
netif.GetMac().SetRxOnWhenIdle(false);
|
netif.GetMac().SetRxOnWhenIdle(false);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return error;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshForwarder::RemoveMessage(Message &aMessage)
|
void MeshForwarder::RemoveMessage(Message &aMessage)
|
||||||
|
|||||||
@@ -181,18 +181,14 @@ public:
|
|||||||
/**
|
/**
|
||||||
* This method enables mesh forwarding and the IEEE 802.15.4 MAC layer.
|
* This method enables mesh forwarding and the IEEE 802.15.4 MAC layer.
|
||||||
*
|
*
|
||||||
* @retval OT_ERROR_NONE Successfully enabled the mesh forwarder.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
otError Start(void);
|
void Start(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method disables mesh forwarding and the IEEE 802.15.4 MAC layer.
|
* This method disables mesh forwarding and the IEEE 802.15.4 MAC layer.
|
||||||
*
|
*
|
||||||
* @retval OT_ERROR_NONE Successfully disabled the mesh forwarder.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
otError Stop(void);
|
void Stop(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method submits a message to the mesh forwarder for forwarding.
|
* This method submits a message to the mesh forwarder for forwarding.
|
||||||
|
|||||||
Reference in New Issue
Block a user