Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_MeshTopologyPackets.h
Go to the documentation of this file.
1
/*
2
* Author: Crownstone Team
3
* Copyright: Crownstone (https://crownstone.rocks)
4
* Date: Apr 30, 2021
5
* License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
6
*/
7
8
#pragma once
9
10
#include <
protocol/cs_RssiAndChannel.h
>
11
#include <
protocol/cs_Typedefs.h
>
12
13
#include <cstdint>
14
15
static
constexpr
uint8_t
MESH_TOPOLOGY_CHANNEL_COUNT
= 3;
16
17
struct
__attribute__((packed))
mesh_topology_neighbour_rssi_uart_t
{
18
uint8_t type = 0;
19
stone_id_t
receiverId
;
20
stone_id_t
senderId
;
21
int8_t
rssiChannel37
;
22
int8_t
rssiChannel38
;
23
int8_t
rssiChannel39
;
24
uint8_t
lastSeenSecondsAgo
;
// How many seconds ago the sender was last seen by the receiver.
25
uint8_t
msgNumber
;
// Number that is increased by 1 for each message.
26
};
27
34
struct
__attribute__((packed))
mesh_topology_neighbour_research_rssi_t
{
35
stone_id_t
receiverId
;
36
stone_id_t
senderId
;
37
uint8_t count[
MESH_TOPOLOGY_CHANNEL_COUNT
];
38
uint8_t rssi[
MESH_TOPOLOGY_CHANNEL_COUNT
];
39
uint8_t standardDeviation[
MESH_TOPOLOGY_CHANNEL_COUNT
];
40
};
MESH_TOPOLOGY_CHANNEL_COUNT
static constexpr uint8_t MESH_TOPOLOGY_CHANNEL_COUNT
Definition:
cs_MeshTopologyPackets.h:15
cs_RssiAndChannel.h
cs_Typedefs.h
stone_id_t
uint8_t stone_id_t
Definition:
cs_Typedefs.h:23
mesh_topology_neighbour_research_rssi_t
Message format to be sent over uart.
Definition:
cs_MeshTopologyPackets.h:34
mesh_topology_neighbour_research_rssi_t::senderId
stone_id_t senderId
Definition:
cs_MeshTopologyPackets.h:36
mesh_topology_neighbour_research_rssi_t::receiverId
stone_id_t receiverId
Definition:
cs_MeshTopologyPackets.h:35
mesh_topology_neighbour_rssi_uart_t
Definition:
cs_MeshTopologyPackets.h:17
mesh_topology_neighbour_rssi_uart_t::rssiChannel37
int8_t rssiChannel37
Definition:
cs_MeshTopologyPackets.h:21
mesh_topology_neighbour_rssi_uart_t::lastSeenSecondsAgo
uint8_t lastSeenSecondsAgo
Definition:
cs_MeshTopologyPackets.h:24
mesh_topology_neighbour_rssi_uart_t::msgNumber
uint8_t msgNumber
Definition:
cs_MeshTopologyPackets.h:25
mesh_topology_neighbour_rssi_uart_t::senderId
stone_id_t senderId
Definition:
cs_MeshTopologyPackets.h:20
mesh_topology_neighbour_rssi_uart_t::rssiChannel38
int8_t rssiChannel38
Definition:
cs_MeshTopologyPackets.h:22
mesh_topology_neighbour_rssi_uart_t::rssiChannel39
int8_t rssiChannel39
Definition:
cs_MeshTopologyPackets.h:23
mesh_topology_neighbour_rssi_uart_t::receiverId
stone_id_t receiverId
Definition:
cs_MeshTopologyPackets.h:19
source
include
protocol
cs_MeshTopologyPackets.h
Generated by
1.9.5