Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
rpble.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2021 Freie Universität Berlin
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
#include <string.h>
19
#if IS_USED(MODULE_NIMBLE_RPBLE)
20
#include "
nimble_rpble.h
"
21
#endif
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#if IS_USED(MODULE_NIMBLE_RPBLE)
28
static
inline
void
gnrc_rpl_rpble_update(
const
gnrc_rpl_dodag_t
*dodag)
29
{
30
nimble_rpble_ctx_t
ctx;
31
ctx.
inst_id
= dodag->instance->id;
32
memcpy(ctx.
dodag_id
, &dodag->dodag_id, 16);
33
ctx.
version
= dodag->version;
34
ctx.
rank
= dodag->my_rank;
35
ctx.
role
= dodag->node_status;
36
nimble_rpble_update
(&ctx);
37
}
38
#else
39
static
inline
void
gnrc_rpl_rpble_update(
const
gnrc_rpl_dodag_t
*dodag)
40
{
41
(void)dodag;
42
/* do nothing here */
43
}
44
#endif
45
46
#ifdef __cplusplus
47
}
48
#endif
49
nimble_rpble_update
int nimble_rpble_update(const nimble_rpble_ctx_t *ctx)
Update the current RPL context.
nimble_rpble.h
Interface for the nimble_rpble module.
nimble_rpble_ctx_t
RPL DODAG information.
Definition:
nimble_rpble.h:125
nimble_rpble_ctx_t::rank
uint16_t rank
the node's rank in the DODAG
Definition:
nimble_rpble.h:130
nimble_rpble_ctx_t::dodag_id
uint8_t dodag_id[16]
DODAG ID.
Definition:
nimble_rpble.h:127
nimble_rpble_ctx_t::role
uint8_t role
RPL role of the node.
Definition:
nimble_rpble.h:129
nimble_rpble_ctx_t::version
uint8_t version
DODAG version.
Definition:
nimble_rpble.h:128
nimble_rpble_ctx_t::inst_id
uint8_t inst_id
instance ID
Definition:
nimble_rpble.h:126
gnrc_rpl_dodag_t
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition:
structs.h:221
Generated on Mon Nov 24 2025 18:43:16 by
1.9.1