Skip to main content

otHistoryTrackerQueryNetInfo

Function otHistoryTrackerQueryNetInfo 

Source
pub unsafe extern "C" fn otHistoryTrackerQueryNetInfo(
    aInstance: *mut otInstance,
    aRloc16: u16,
    aMaxEntries: u16,
    aMaxEntryAge: u32,
    aCallback: otHistoryTrackerNetInfoCallback,
    aContext: *mut c_void,
) -> otError
Expand description

Queries for Network Info history entries from a specified RLOC16.

Requires OPENTHREAD_CONFIG_HISTORY_TRACKER_CLIENT_ENABLE.

Upon successful initiation of the query, the provided @p aCallback will be invoked to report the requested entries.

The callback parameter aError indicates if any error occurs. If there are more entries to be provided, aError will be set to OT_ERROR_PENDING. The end of the list is indicated by aError being set to OT_ERROR_NONE with a null entry pointer. Any other errors, such as OT_ERROR_RESPONSE_TIMEOUT or OT_ERROR_PARSE (if the received response has an invalid format), will also be indicated by aError.

@param[in] aInstance The OpenThread instance. @param[in] aRloc16 The RLOC16 of the device to query. @param[in] aMaxEntries The maximum number of entries to request (0 indicates all available entries). @param[in] aMaxEntryAge The maximum age (in milliseconds) of entries to request (0 indicates no age limit). @param[in] aCallback A pointer to a callback function to be called when the query response is received. @param[in] aContext A user-defined context pointer to be passed to the callback function.

@retval OT_ERROR_NONE If the query was successfully sent. @retval OT_ERROR_BUSY If a query is already in progress. @retval OT_ERROR_NO_BUFS If there are insufficient message buffers to send the query. @retval OT_ERROR_INVALID_STATE If device is not attached.