|
SatCat5
|
Miscellaneous POSIX wrappers (e.g., heap allocation, log to console...)
For compatibility with microcontrollers, classes in the main "satcat5" folder use a restricted subset of the C/C++ standard library and avoid allocating memory on the heap. As a result, those classes are sometimes less convenient to use. This file defines wrappers and extensions for ease of use on platforms that do not require such limitations. It is compatible with both Linux and Windows platforms.
Definition in file posix_utils.h.
#include <satcat5/eth_switch.h>#include <satcat5/io_buffer.h>#include <satcat5/io_core.h>#include <satcat5/log.h>#include <satcat5/multi_buffer.h>#include <satcat5/pkt_buffer.h>#include <satcat5/timeref.h>#include <list>#include <string>#include <vector>Go to the source code of this file.
Macros | |
| #define | SATCAT5_WIN32 0 |
Functions | |
| std::string | satcat5::io::read_str (satcat5::io::Readable *src) |
| Read contents of a SatCat5 buffer as a string. | |
| void | satcat5::util::sleep_msec (unsigned msec) |
| Cross-platform wrapper for sleep()/Sleep()/etc. | |
| void | satcat5::util::service_msec (unsigned total_msec, unsigned msec_per_iter=10) |
| Alternate between sleep_msec() and poll::service_all(). | |
| std::string | satcat5::log::format (const satcat5::eth::MacAddr &addr) |
| Human-readable formatting for an Ethernet address. | |
| std::string | satcat5::log::format (const satcat5::ip::Addr &addr) |
| Human-readable formatting for an IPv4 address. | |