VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
vitroio::sdk::impl::Timestamp Class Reference

Class for maintaining timestamp tracking. More...

#include <timestamp.h>

Collaboration diagram for vitroio::sdk::impl::Timestamp:

Classes

struct  CurrentTime_t
 

Static Public Member Functions

static void start (Transport_layer *comm, EnvironmentInterface *env_if)
 Initializes timestamp counting. More...
 
static void start (uint32_t sync_time, Transport_layer *comm, EnvironmentInterface *env_if)
 Initializes timestamp counting. More...
 
static uint32_t get_timestamp ()
 Get the timestamp object. More...
 
static void updater_runner ()
 

Static Public Attributes

static CurrentTime_t current_time
 
static Thread updater
 
static Transport_layercomm_port
 
static EnvironmentInterfaceenv
 

Detailed Description

Class for maintaining timestamp tracking.

This class uses Timer for counting and calculation of timestamps.

Note
If the timestamp is not set, either by passing its value in constructor or by Timestamp::set_timestamp , the value returned by Timestamp::get_timestamp will be time, given in ms, from boot to now.

Member Function Documentation

◆ get_timestamp()

static uint32_t vitroio::sdk::impl::Timestamp::get_timestamp ( )
static

Get the timestamp object.

Returns
uint32_t Current timestamp

◆ start() [1/2]

static void vitroio::sdk::impl::Timestamp::start ( Transport_layer comm,
EnvironmentInterface env_if 
)
static

Initializes timestamp counting.

Parameters
commCommunication layer to get timestamp from.
env_ifEnvironment interface for timestamp saving

◆ start() [2/2]

static void vitroio::sdk::impl::Timestamp::start ( uint32_t  sync_time,
Transport_layer comm,
EnvironmentInterface env_if 
)
static

Initializes timestamp counting.

Parameters
sync_timeTime between timestamp synchronization, given in hours
commCommunication layer to get timestamp from.
env_ifEnvironment interface for timestamp saving

◆ updater_runner()

static void vitroio::sdk::impl::Timestamp::updater_runner ( )
static

Member Data Documentation

◆ comm_port

Transport_layer* vitroio::sdk::impl::Timestamp::comm_port
static

◆ current_time

CurrentTime_t vitroio::sdk::impl::Timestamp::current_time
static

◆ env

EnvironmentInterface* vitroio::sdk::impl::Timestamp::env
static

◆ updater

Thread vitroio::sdk::impl::Timestamp::updater
static