SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::lib::bsp::chrono Class Referenceabstract

Chrono device abstraction. More...

#include <chrono.hpp>

Inheritance diagram for satnogs::comms::lib::bsp::chrono:
satnogs::comms::chrono_bsp

Public Member Functions

 chrono ()
 Construct a new chrono(time-related) object.
virtual void delay_us (size_t us)=0
 Delays the execution of the active task for at least us microseconds.
virtual void busy_wait_us (size_t us)=0
 Delay execution using busy wait.
virtual int64_t time_ms ()=0
 Retrieves the current time in milliseconds.

Detailed Description

Chrono device abstraction.

This class provides an abstraction for time related operations like measurering time and introducing delay.

Warning
Depending on the target platform/RTOS users are expected to define a class that inherits this one and implement at least the pure virtual methods

Definition at line 40 of file chrono.hpp.

Constructor & Destructor Documentation

◆ chrono()

satnogs::comms::lib::bsp::chrono::chrono ( )
inline

Construct a new chrono(time-related) object.

Definition at line 46 of file chrono.hpp.

Member Function Documentation

◆ busy_wait_us()

virtual void satnogs::comms::lib::bsp::chrono::busy_wait_us ( size_t us)
pure virtual

Delay execution using busy wait.

Parameters
usthe amount of microseconds to delay the execution

◆ delay_us()

virtual void satnogs::comms::lib::bsp::chrono::delay_us ( size_t us)
pure virtual

Delays the execution of the active task for at least us microseconds.

Note
On bare metal execution environments this can be a busy-wait loop
Parameters
usthe amount of microseconds to delay the execution

◆ time_ms()

virtual int64_t satnogs::comms::lib::bsp::chrono::time_ms ( )
pure virtual

Retrieves the current time in milliseconds.

Returns
int64_t with the current time in milliseconds

The documentation for this class was generated from the following file:
  • libsatnogs-comms/include/satnogs-comms-lib/bsp/chrono.hpp