Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_TimeSyncMessage.h
Go to the documentation of this file.
1/*
2 * Author: Crownstone Team
3 * Copyright: Crownstone (https://crownstone.rocks)
4 * Date: May 6, 2020
5 * License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)
6 */
7#pragma once
8
10
11#include <cstdint>
12
16struct __attribute__((__packed__)) high_resolution_time_stamp_t {
17 uint32_t posix_s = 0; // seconds since epoch
18 uint16_t posix_ms = 0; // milliseconds passed since posix_s.
19 uint8_t version = 0; // synchronization version, when 0, the timestamp is not posix based.
20};
21
26struct __attribute__((__packed__)) time_sync_message_t {
28 stone_id_t srcId; // The stone ID of this time. Set to 0 to force using this timestamp.
29};
uint8_t stone_id_t
Definition: cs_Typedefs.h:23
Versioned timestamp with milliseconds precision.
Definition: cs_TimeSyncMessage.h:16
event sent over the internal event bus upon reception of new mesh time stamp msg.
Definition: cs_TimeSyncMessage.h:26
high_resolution_time_stamp_t stamp
Definition: cs_TimeSyncMessage.h:27
stone_id_t srcId
Definition: cs_TimeSyncMessage.h:28