Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
rpble.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 Freie Universität Berlin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#pragma once
10
21
#include <string.h>
22
#if IS_USED(MODULE_NIMBLE_RPBLE)
23
#include "
nimble_rpble.h
"
24
#endif
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
30
#if IS_USED(MODULE_NIMBLE_RPBLE)
31
static
inline
void
gnrc_rpl_rpble_update(
const
gnrc_rpl_dodag_t
*dodag)
32
{
33
nimble_rpble_ctx_t
ctx;
34
ctx.
inst_id
= dodag->instance->id;
35
memcpy(ctx.
dodag_id
, &dodag->dodag_id, 16);
36
ctx.
version
= dodag->version;
37
ctx.
rank
= dodag->my_rank;
38
ctx.
role
= dodag->node_status;
39
nimble_rpble_update
(&ctx);
40
}
41
#else
42
static
inline
void
gnrc_rpl_rpble_update(
const
gnrc_rpl_dodag_t
*dodag)
43
{
44
(void)dodag;
45
/* do nothing here */
46
}
47
#endif
48
49
#ifdef __cplusplus
50
}
51
#endif
52
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:126
nimble_rpble_ctx_t::rank
uint16_t rank
the node's rank in the DODAG
Definition:
nimble_rpble.h:131
nimble_rpble_ctx_t::dodag_id
uint8_t dodag_id[16]
DODAG ID.
Definition:
nimble_rpble.h:128
nimble_rpble_ctx_t::role
uint8_t role
RPL role of the node.
Definition:
nimble_rpble.h:130
nimble_rpble_ctx_t::version
uint8_t version
DODAG version.
Definition:
nimble_rpble.h:129
nimble_rpble_ctx_t::inst_id
uint8_t inst_id
instance ID
Definition:
nimble_rpble.h:127
gnrc_rpl_dodag_t
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition:
structs.h:224
Generated on Thu Jun 26 2025 14:14:46 by
1.9.1