mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 23:57:47 +00:00
move types to openthread-types.h (#1299)
This commit is contained in:
@@ -1036,6 +1036,61 @@ typedef struct otUdpSocket
|
||||
struct otUdpSocket *mNext; ///< A pointer to the next UDP socket (internal use only).
|
||||
} otUdpSocket;
|
||||
|
||||
#ifdef OTDLL
|
||||
|
||||
/**
|
||||
* This function pointer is called to notify addition and removal of OpenThread devices.
|
||||
*
|
||||
* @param[in] aAdded A flag indicating if the device was added or removed.
|
||||
* @param[in] aDeviceGuid A GUID indicating which device state changed.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otDeviceAvailabilityChangedCallback)(bool aAdded, const GUID *aDeviceGuid, void *aContext);
|
||||
|
||||
#endif // OTDLL
|
||||
|
||||
/**
|
||||
* This function pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or
|
||||
* the scan completes.
|
||||
*
|
||||
* @param[in] aResult A valid pointer to the beacon information or NULL when the active scan completes.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext);
|
||||
|
||||
/**
|
||||
* This function pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the
|
||||
* scan completes.
|
||||
*
|
||||
* @param[in] aResult A valid pointer to the energy scan result information or NULL when the energy scan completes.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext);
|
||||
|
||||
/**
|
||||
* This function pointer is called to notify certain configuration or state changes within OpenThread.
|
||||
*
|
||||
* @param[in] aFlags A bit-field indicating specific state that has changed.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otStateChangedCallback)(uint32_t aFlags, void *aContext);
|
||||
|
||||
/**
|
||||
* This function pointer is called when Network Diagnostic Get response is received.
|
||||
*
|
||||
* @param[in] aMessage A pointer to the message buffer containing the received Network Diagnostic
|
||||
* Get response payload.
|
||||
* @param[in] aMessageInfo A pointer to the message info for @p aMessage.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (*otReceiveDiagnosticGetCallback)(otMessage aMessage, const otMessageInfo *aMessageInfo,
|
||||
void *aContext);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
@@ -148,16 +148,6 @@ OTAPI void OTCALL otApiFinalize(otApiInstance *aApiInstance);
|
||||
*/
|
||||
OTAPI void OTCALL otFreeMemory(const void *aMem);
|
||||
|
||||
/**
|
||||
* This function pointer is called to notify addition and removal of OpenThread devices.
|
||||
*
|
||||
* @param[in] aAdded A flag indicating if the device was added or removed.
|
||||
* @param[in] aDeviceGuid A GUID indicating which device state changed.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otDeviceAvailabilityChangedCallback)(bool aAdded, const GUID *aDeviceGuid, void *aContext);
|
||||
|
||||
/**
|
||||
* This function registers a callback to indicate OpenThread devices come and go.
|
||||
*
|
||||
@@ -336,16 +326,6 @@ OTAPI ThreadError OTCALL otThreadStop(otInstance *aInstance);
|
||||
*/
|
||||
OTAPI bool OTCALL otIsSingleton(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or
|
||||
* the scan completes.
|
||||
*
|
||||
* @param[in] aResult A valid pointer to the beacon information or NULL when the active scan completes.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext);
|
||||
|
||||
/**
|
||||
* This function starts an IEEE 802.15.4 Active Scan
|
||||
*
|
||||
@@ -371,16 +351,6 @@ OTAPI ThreadError OTCALL otActiveScan(otInstance *aInstance, uint32_t aScanChann
|
||||
*/
|
||||
OTAPI bool OTCALL otIsActiveScanInProgress(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the
|
||||
* scan completes.
|
||||
*
|
||||
* @param[in] aResult A valid pointer to the energy scan result information or NULL when the energy scan completes.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext);
|
||||
|
||||
/**
|
||||
* This function starts an IEEE 802.15.4 Energy Scan
|
||||
*
|
||||
@@ -871,15 +841,6 @@ OTAPI ThreadError OTCALL otAddUnicastAddress(otInstance *aInstance, const otNeti
|
||||
*/
|
||||
OTAPI ThreadError OTCALL otRemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress);
|
||||
|
||||
/**
|
||||
* This function pointer is called to notify certain configuration or state changes within OpenThread.
|
||||
*
|
||||
* @param[in] aFlags A bit-field indicating specific state that has changed.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (OTCALL *otStateChangedCallback)(uint32_t aFlags, void *aContext);
|
||||
|
||||
/**
|
||||
* This function registers a callback to indicate when certain configuration or state changes within OpenThread.
|
||||
*
|
||||
@@ -1935,18 +1896,6 @@ OTAPI ThreadError OTCALL otGetParentInfo(otInstance *aInstance, otRouterInfo *aP
|
||||
*/
|
||||
OTAPI uint8_t OTCALL otGetStableNetworkDataVersion(otInstance *aInstance);
|
||||
|
||||
/**
|
||||
* This function pointer is called when Network Diagnostic Get response is received.
|
||||
*
|
||||
* @param[in] aMessage A pointer to the message buffer containing the received Network Diagnostic
|
||||
* Get response payload.
|
||||
* @param[in] aMessageInfo A pointer to the message info for @p aMessage.
|
||||
* @param[in] aContext A pointer to application-specific context.
|
||||
*
|
||||
*/
|
||||
typedef void (*otReceiveDiagnosticGetCallback)(otMessage aMessage, const otMessageInfo *aMessageInfo,
|
||||
void *aContext);
|
||||
|
||||
/**
|
||||
* This function registers a callback to provide received raw Network Diagnostic Get response payload.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user