Skip to content

Commit

Permalink
FHSS API: Added callback to read synch info
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarkko Paso committed Jan 12, 2018
1 parent f94b2ab commit f9a31e9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nanostack/fhss_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,18 @@ typedef int mac_broadcast_notify(const fhss_api_t *fhss_api, uint32_t broadcast_
*/
typedef int mac_read_coordinator_mac_address(const fhss_api_t *fhss_api, uint8_t *mac_address);

/**
* @brief Read synchronization info for a specific peer.
* @param fhss_api FHSS instance.
* @param info_ptr Pointer to info data.
* @param mac_address MAC address pointer.
* @param info_type Type of the read info (UTT-IE, BT-IE, US-IE, BS-IE).
* @param rx_timestamp Time of reception of the element.
* @return >=0 Length of the info.
* @return -1 Fail.
*/
typedef int mac_read_synch_info(const fhss_api_t *fhss_api, uint8_t *info_ptr, uint8_t *mac_address, int info_type, uint32_t rx_timestamp);

/**
* \brief Struct fhss_callback defines functions that software MAC needs to implement.
* Function pointers are passed to FHSS using fhss_init_callbacks function.
Expand All @@ -290,6 +302,7 @@ struct fhss_callback {
mac_tx_poll *tx_poll; /**< Poll TX queue. */
mac_broadcast_notify *broadcast_notify; /**< Broadcast channel notification from FHSS. */
mac_read_coordinator_mac_address *read_coord_mac_address; /**< Read coordinator MAC address. */
mac_read_synch_info *read_synch_info; /**< Read information element for a specific MAC address. */
};

#ifdef __cplusplus
Expand Down

0 comments on commit f9a31e9

Please sign in to comment.