mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
Minor updates to openthread API signatures (#799)
This commit is contained in:
@@ -175,7 +175,7 @@ const char *otGetVersionString(void);
|
||||
* @retval otInstance* The new OpenThread instance structure.
|
||||
*
|
||||
*/
|
||||
otInstance *otInstanceInit(void *aInstanceBuffer, uint64_t *aInstanceBufferSize);
|
||||
otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize);
|
||||
#else
|
||||
/**
|
||||
* This function initializes the static instance of the OpenThread library.
|
||||
@@ -894,7 +894,7 @@ ThreadError otGetActiveDataset(otInstance *aInstance, otOperationalDataset *aDat
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
ThreadError otSetActiveDataset(otInstance *aInstance, otOperationalDataset *aDataset);
|
||||
ThreadError otSetActiveDataset(otInstance *aInstance, const otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function gets the Pending Operational Dataset.
|
||||
@@ -919,7 +919,7 @@ ThreadError otGetPendingDataset(otInstance *aInstance, otOperationalDataset *aDa
|
||||
* @retval kThreadError_InvalidArgs @p aDataset was NULL.
|
||||
*
|
||||
*/
|
||||
ThreadError otSetPendingDataset(otInstance *aInstance, otOperationalDataset *aDataset);
|
||||
ThreadError otSetPendingDataset(otInstance *aInstance, const otOperationalDataset *aDataset);
|
||||
|
||||
/**
|
||||
* This function sends MGMT_ACTIVE_GET.
|
||||
@@ -2308,7 +2308,8 @@ ThreadError otSendUdp(otUdpSocket *aSocket, otMessage aMessage, const otMessageI
|
||||
* @param[in] aTlvTypes An array of Network Diagnostic TLV types.
|
||||
* @param[in] aCount Number of types in aTlvTypes
|
||||
*/
|
||||
ThreadError otSendDiagnosticGet(otInstance *aInstance, otIp6Address *aDestination, uint8_t aTlvTypes[], uint8_t aCount);
|
||||
ThreadError otSendDiagnosticGet(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[],
|
||||
uint8_t aCount);
|
||||
|
||||
/**
|
||||
* Send a Network Diagnostic Reset request
|
||||
@@ -2318,7 +2319,7 @@ ThreadError otSendDiagnosticGet(otInstance *aInstance, otIp6Address *aDestinatio
|
||||
* @param[in] aTlvTypes An array of Network Diagnostic TLV types. Currently only Type 9 is allowed.
|
||||
* @param[in] aCount Number of types in aTlvTypes
|
||||
*/
|
||||
ThreadError otSendDiagnosticReset(otInstance *aInstance, otIp6Address *aDestination, uint8_t aTlvTypes[],
|
||||
ThreadError otSendDiagnosticReset(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[],
|
||||
uint8_t aCount);
|
||||
|
||||
/**
|
||||
|
||||
+10
-7
@@ -964,7 +964,7 @@ ThreadError otSetPreferredRouterId(otInstance *aInstance, uint8_t aRouterId)
|
||||
|
||||
#ifdef OPENTHREAD_MULTIPLE_INSTANCE
|
||||
|
||||
otInstance *otInstanceInit(void *aInstanceBuffer, uint64_t *aInstanceBufferSize)
|
||||
otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize)
|
||||
{
|
||||
otInstance *aInstance = NULL;
|
||||
|
||||
@@ -1003,17 +1003,20 @@ exit:
|
||||
|
||||
#endif
|
||||
|
||||
ThreadError otSendDiagnosticGet(otInstance *aInstance, otIp6Address *aDestination, uint8_t aTlvTypes[], uint8_t aCount)
|
||||
ThreadError otSendDiagnosticGet(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[],
|
||||
uint8_t aCount)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetNetworkDiagnostic().SendDiagnosticGet(*static_cast<Ip6::Address *>(aDestination),
|
||||
return aInstance->mThreadNetif.GetNetworkDiagnostic().SendDiagnosticGet(*static_cast<const Ip6::Address *>
|
||||
(aDestination),
|
||||
aTlvTypes,
|
||||
aCount);
|
||||
}
|
||||
|
||||
ThreadError otSendDiagnosticReset(otInstance *aInstance, otIp6Address *aDestination, uint8_t aTlvTypes[],
|
||||
ThreadError otSendDiagnosticReset(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[],
|
||||
uint8_t aCount)
|
||||
{
|
||||
return aInstance->mThreadNetif.GetNetworkDiagnostic().SendDiagnosticReset(*static_cast<Ip6::Address *>(aDestination),
|
||||
return aInstance->mThreadNetif.GetNetworkDiagnostic().SendDiagnosticReset(*static_cast<const Ip6::Address *>
|
||||
(aDestination),
|
||||
aTlvTypes,
|
||||
aCount);
|
||||
}
|
||||
@@ -1340,7 +1343,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otSetActiveDataset(otInstance *aInstance, otOperationalDataset *aDataset)
|
||||
ThreadError otSetActiveDataset(otInstance *aInstance, const otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
@@ -1364,7 +1367,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
ThreadError otSetPendingDataset(otInstance *aInstance, otOperationalDataset *aDataset)
|
||||
ThreadError otSetPendingDataset(otInstance *aInstance, const otOperationalDataset *aDataset)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ NetworkDiagnostic::NetworkDiagnostic(ThreadNetif &aThreadNetif) :
|
||||
mCoapMessageId = static_cast<uint8_t>(otPlatRandomGet());
|
||||
}
|
||||
|
||||
ThreadError NetworkDiagnostic::SendDiagnosticGet(const Ip6::Address &aDestination, uint8_t aTlvTypes[], uint8_t aCount)
|
||||
ThreadError NetworkDiagnostic::SendDiagnosticGet(const Ip6::Address &aDestination, const uint8_t aTlvTypes[],
|
||||
uint8_t aCount)
|
||||
{
|
||||
ThreadError error;
|
||||
Ip6::SockAddr sockaddr;
|
||||
@@ -140,7 +141,7 @@ exit:
|
||||
(void)aMessageInfo;
|
||||
}
|
||||
|
||||
ThreadError NetworkDiagnostic::SendDiagnosticReset(const Ip6::Address &aDestination, uint8_t aTlvTypes[],
|
||||
ThreadError NetworkDiagnostic::SendDiagnosticReset(const Ip6::Address &aDestination, const uint8_t aTlvTypes[],
|
||||
uint8_t aCount)
|
||||
{
|
||||
ThreadError error;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
* @param[in] aCount Number of types in aTlvTypes
|
||||
*
|
||||
*/
|
||||
ThreadError SendDiagnosticGet(const Ip6::Address &aDestination, uint8_t aTlvTypes[], uint8_t aCount);
|
||||
ThreadError SendDiagnosticGet(const Ip6::Address &aDestination, const uint8_t aTlvTypes[], uint8_t aCount);
|
||||
|
||||
/**
|
||||
* This method sends Diagnostic Reset request.
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
* @param[in] aCount Number of types in aTlvTypes
|
||||
*
|
||||
*/
|
||||
ThreadError SendDiagnosticReset(const Ip6::Address &aDestination, uint8_t aTlvTypes[], uint8_t aCount);
|
||||
ThreadError SendDiagnosticReset(const Ip6::Address &aDestination, const uint8_t aTlvTypes[], uint8_t aCount);
|
||||
|
||||
/**
|
||||
* This method fills IPv6AddressListTlv.
|
||||
|
||||
Reference in New Issue
Block a user