OS Abstractions
-
uint64_t millis()
Current time in milliseconds since epoch.
This is a paragraph, written in markdown (see Doxygen markdown flavor - https://www.doxygen.nl/manual/markdown.html)
- Returns:
milliseconds since epoch
-
class SysFS_File
sysfsfilesysfsfiles are used to represent attributes to userspace in the form of files. Usually these files contain only small amounts of information; for example the value of GPIO pin 25 is represented as file/sys/class/gpio/gpio25/valuewhich contains either0or1.Public Functions
-
SysFS_File(const std::string &path)
Constructor
- Parameters:
path – path to sysfs file; e.g.
/sys/class/gpio/gpio25/value
-
int64_t read_int64()
Read file contents as
int64_t
-
void write_int64(int64_t value)
Write
int64_t
-
uint64_t read_uint64()
Read file contents as
uint64_t
-
void write_uint64(uint64_t)
Write
uint64_t
-
std::string read_string()
Read file contents as
std::string
-
void write_string(const std::string&)
Write
std::string
-
SysFS_File(const std::string &path)