Loading...
Searching...
No Matches
bplib_riot_nc.h File Reference

A wrapper for the NC operations. More...

Detailed Description

A wrapper for the NC operations.

Author
Simon Grund mail@.nosp@m.simo.nosp@m.ngrun.nosp@m.d.de

Definition in file bplib_riot_nc.h.

#include "bplib.h"
+ Include dependency graph for bplib_riot_nc.h:

Go to the source code of this file.

Macros

#define CONFIG_BPLIB_MAX_SEQ_NUM   1000000
 Max sequence number, after which it wraps back to 0.
 

Enumerations

enum  bplib_nc_canonical_block_t { BPLIB_PREVIOUS_NODE_BLOCK = 0 , BPLIB_BUNDLE_AGE_BLOCK = 1 , BPLIB_HOP_COUNT_BLOCK = 2 , BPLIB_PAYLOAD_BLOCK = 3 }
 block type indicator for bplib_channel_set_block_*() functions More...
 

Functions

BPLib_Status_t bplib_riot_nc_init (BPLib_NC_ConfigPtrs_t *ConfigPtrs)
 Initializes bplib's NC.
 
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_service_no (uint32_t channel, uint64_t service_no)
 Set the local service number of the channel.
 
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_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_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_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_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_num (uint32_t channel, bplib_nc_canonical_block_t block, uint32_t num)
 Set the block number of a canonical block.
 
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_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_contact_set_out_addr (uint32_t contact, const char *addr, uint16_t port)
 Set the out address of a contact.
 
BPLib_Status_t bplib_contact_set_in_addr (uint32_t contact, const char *addr, uint16_t port)
 Set the in address of a contact.