nrfxlib API 3.3.99
Loading...
Searching...
No Matches
nrf_802154_ack_data.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017, Nordic Semiconductor ASA
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
18 * contributors may be used to endorse or promote products derived from this
19 * software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
34
41#ifndef NRF_802154_ACK_DATA_H
42#define NRF_802154_ACK_DATA_H
43
44#include <stdbool.h>
45#include <stdint.h>
46
47#include "nrf_802154_types.h"
49
51typedef struct
52{
54 uint8_t len;
56
65
70
76void nrf_802154_ack_data_enable(bool enabled);
77
91bool nrf_802154_peer_rec_get(const uint8_t * p_addr,
92 bool extended,
93 nrf_802154_peer_rec_t * p_peer_rec);
94
108bool nrf_802154_peer_rec_write(const uint8_t * p_addr,
109 bool extended,
110 const nrf_802154_peer_rec_t * p_peer_rec);
111
124bool nrf_802154_peer_rec_delete(const uint8_t * p_addr,
125 bool extended);
126
133void nrf_802154_peer_table_clear(bool extended);
134
151bool nrf_802154_ack_data_for_addr_set(const uint8_t * p_addr,
152 bool extended,
153 nrf_802154_ack_data_t data_type,
154 const void * p_data,
155 uint8_t data_len);
156
171bool nrf_802154_ack_data_for_addr_clear(const uint8_t * p_addr,
172 bool extended,
173 nrf_802154_ack_data_t data_type);
174
183
196
210 const nrf_802154_peer_rec_t * p_peer_rec);
211
212#endif /* NRF_802154_ACK_DATA_H */
#define NRF_802154_MAX_ACK_IE_SIZE
Definition nrf_802154_config.h:483
uint8_t nrf_802154_src_addr_match_t
Methods of source address matching.
Definition nrf_802154_types.h:197
uint8_t nrf_802154_ack_data_t
Types of data that can be set in an ACK message.
Definition nrf_802154_types.h:181
bool nrf_802154_peer_rec_write(const uint8_t *p_addr, bool extended, const nrf_802154_peer_rec_t *p_peer_rec)
Write a peer record for given peer addres to the peer table.
void nrf_802154_ack_data_init(void)
Initialize the ACK data generator module.
bool nrf_802154_peer_rec_get(const uint8_t *p_addr, bool extended, nrf_802154_peer_rec_t *p_peer_rec)
Retrieve a peer record for given peer address from the peer table.
bool nrf_802154_peer_rec_delete(const uint8_t *p_addr, bool extended)
Delete a peer record for given peer address from the peer table.
void nrf_802154_peer_table_clear(bool extended)
Delete all peer records from given peer table.
void nrf_802154_ack_data_enable(bool enabled)
Enable or disable the ACK data generator module.
void nrf_802154_ack_data_reset(bool extended, nrf_802154_ack_data_t data_type)
Remove all addresses of a given length from the ACK data list.
bool nrf_802154_ack_data_for_addr_clear(const uint8_t *p_addr, bool extended, nrf_802154_ack_data_t data_type)
Remove an address from the ACK data list.
bool nrf_802154_ack_data_for_addr_set(const uint8_t *p_addr, bool extended, nrf_802154_ack_data_t data_type, const void *p_data, uint8_t data_len)
Add an address to the ACK data list.
void nrf_802154_ack_data_src_addr_matching_method_set(nrf_802154_src_addr_match_t match_method)
Select the source matching algorithm.
bool nrf_802154_ack_data_pending_bit_should_be_set(const nrf_802154_frame_t *p_frame_data, const nrf_802154_peer_rec_t *p_peer_rec)
Check if a pending bit is to be set in the ACK frame sent in response to a given frame.
Definition nrf_802154_frame.h:139
uint8_t len
Definition nrf_802154_ack_data.h:54
Module that contains an ACK data generator for the nRF 802.15.4 radio driver.
Definition nrf_802154_ack_data.h:52
bool pending_bit
Pending bit to be set for ACK frames sent back to given peer.
Definition nrf_802154_ack_data.h:61
nrf_802154_peer_ie_data_t ie_data
IE data generated for the peer.
Definition nrf_802154_ack_data.h:63
Information record about a peer.
Definition nrf_802154_ack_data.h:59