Loading...
Searching...
No Matches
bplib_riot_nc.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2026 Hamburg University of Technology (TUHH)
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5#pragma once
59
60#include "bplib.h"
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
69#ifndef CONFIG_BPLIB_MAX_SEQ_NUM
70# define CONFIG_BPLIB_MAX_SEQ_NUM 1000000
71#endif
72
76typedef enum {
77 BPLIB_PREVIOUS_NODE_BLOCK = 0,
78 BPLIB_BUNDLE_AGE_BLOCK = 1,
79 BPLIB_HOP_COUNT_BLOCK = 2,
80 BPLIB_PAYLOAD_BLOCK = 3
82
92BPLib_Status_t bplib_riot_nc_init(BPLib_NC_ConfigPtrs_t* ConfigPtrs);
93
107 uint32_t channel, uint8_t limit);
108
120 uint32_t channel, BPLib_CRC_Type_t type);
121
134 uint32_t channel, uint64_t service_no);
135
148 uint32_t channel, uint64_t flags);
149
162 uint32_t channel, uint64_t lifetime);
163
174 uint32_t channel, BPLib_EID_t dest_eid);
175
188 uint32_t channel, BPLib_EID_t report_eid);
189
208 uint32_t channel, bplib_nc_canonical_block_t block, bool include);
209
223 uint32_t channel, bplib_nc_canonical_block_t block, BPLib_CRC_Type_t type);
224
243 uint32_t channel, bplib_nc_canonical_block_t block, uint32_t num);
244
260 uint32_t channel, bplib_nc_canonical_block_t block, uint64_t flags);
261
275BPLib_Status_t bplib_contact_set_destinations(uint32_t contact,
276 unsigned index, BPLib_EID_Pattern_t eid_pat);
277
294BPLib_Status_t bplib_contact_set_out_addr(uint32_t contact,
295 const char* addr, uint16_t port);
296
314BPLib_Status_t bplib_contact_set_in_addr(uint32_t contact,
315 const char* addr, uint16_t port);
316
317#ifdef __cplusplus
318}
319#endif
320
BPLib_Status_t bplib_contact_set_destinations(uint32_t contact, unsigned index, BPLib_EID_Pattern_t eid_pat)
Set one reachable EID pattern for a contact.
BPLib_Status_t bplib_channel_set_report_to_eid(uint32_t channel, BPLib_EID_t report_eid)
Set the report-to node endpoint of bundles in the channel.
BPLib_Status_t bplib_channel_set_block_flags(uint32_t channel, bplib_nc_canonical_block_t block, uint64_t flags)
Set the canonical block flags of a canonical block.
BPLib_Status_t bplib_channel_set_dest_eid(uint32_t channel, BPLib_EID_t dest_eid)
Set the destination of bundles in the channel.
BPLib_Status_t bplib_channel_set_hop_limit(uint32_t channel, uint8_t limit)
Set the hop limit of the channel.
BPLib_Status_t bplib_channel_set_crc_type(uint32_t channel, BPLib_CRC_Type_t type)
Set the CRC type of the primary block.
BPLib_Status_t bplib_channel_set_block_crc_type(uint32_t channel, bplib_nc_canonical_block_t block, BPLib_CRC_Type_t type)
Set the CRC type of a canonical block.
BPLib_Status_t bplib_channel_set_block_include(uint32_t channel, bplib_nc_canonical_block_t block, bool include)
Set if a block should be part of the bundle.
BPLib_Status_t bplib_channel_set_block_num(uint32_t channel, bplib_nc_canonical_block_t block, uint32_t num)
Set the block number of a canonical block.
bplib_nc_canonical_block_t
block type indicator for bplib_channel_set_block_*() functions
BPLib_Status_t bplib_channel_set_service_no(uint32_t channel, uint64_t service_no)
Set the local service number of the channel.
BPLib_Status_t bplib_contact_set_in_addr(uint32_t contact, const char *addr, uint16_t port)
Set the in address of a contact.
BPLib_Status_t bplib_riot_nc_init(BPLib_NC_ConfigPtrs_t *ConfigPtrs)
Initializes bplib's NC.
BPLib_Status_t bplib_channel_set_bundle_flags(uint32_t channel, uint64_t flags)
Set the bundle control flags of the primary block.
BPLib_Status_t bplib_channel_set_lifetime(uint32_t channel, uint64_t lifetime)
Set the lifetime of a bundle, in [ms].
BPLib_Status_t bplib_contact_set_out_addr(uint32_t contact, const char *addr, uint16_t port)
Set the out address of a contact.