change CMAKE_CXX_STANDARD to 17
add PIByteArray(PIMemoryBlock)
PIJSON print functions now correctly handle top-level node, print name only for non-top-level
PIThread:
- remove old V singleton V, migrate to modern STATIC_INITIALIZER and common singleton
- add PowerPolicy - now implemented only for Windows, if SetThreadInformation available, then use, else try to use SetThreadIdealProcessor. Mixed cores not supported for SetThreadIdealProcessor case.
PIThreadPoolLoop: add setPriority() and setPowerPolicy()
The operator<< / operator>> templates for MessageConst / MessageMutable
added in 4d8b7430 have no users in the tree (libs, tests, utils, main).
Drop them along with the pibinarystream.h include they required; the
binary-stream fallback static_assert in pibinarystream.h already gives a
clear compile error if external code ever streams an MQTT message.
Replace scattered option() calls, PIP_HAS_DEPS_* variables, and while-loop
resolver with pip_feature_flag() function and pip_resolve_feature_flags()
macro. Dependencies are declared inline and resolved in a single pass.
- CMake: drop PIP_HAS_SERIAL -> PIP_HAS_THREADS dependency and the forced
PIP_HAS_SERIAL=OFF for PICO_BOARD, so serial can be built on Pico
- piserial.cpp: guard termios/stty code (tcgetattr/tcsetattr/tcflush/tcdrain,
TIOCSBRK/TIOCCBRK, TIOCMBIS/TIOCMBIC/TIOCMGET, termios members, sys/ioctl.h
and termios.h includes) with PIP_HAS_TTY; O_NOCTTY replaced by
PISERIAL_NOCTTY (0 on no-TTY targets)
- add missing #ifndef fallbacks for B110..B115200 used by convertSpeed()
when termios.h is absent
- guard thread-only PIIODevice API calls (isThreadedRead/stopThreadedRead)
with PIP_HAS_THREADS in closeDevice/readDevice
- gate the availableDevicesInfo() test loop with PIP_HAS_FILESYSTEM||WINDOWS
(device enumeration is a filesystem feature)
- AGENTS.md: note that clang-format-18 is applied automatically on file edits
- use LFS64 file/stat APIs only on glibc/Windows (absent in musl)
- use plain sched_priority outside glibc
- do not declare pow10(double) where the system provides C23 pow10() (musl)
- ICU is off by default: modern ICU (>= 75) needs C++17 for its headers,
the project is built with C++11; enable explicitly with -DICU=ON
- fix latent crash: PIThread::setThreadName() read the thread handle from
inside the new thread; the handle is not guaranteed to be visible before
start (musl publishes it later), rename the calling thread via
pthread_self() instead
- drop INTROSPECTION conjunctions (CMake dep table already forces THREADS+SOCKET)
- remove whole-file guards in client_server/process tests (CMake only compiles them when flags are ON)
- normalize single-flag '#if defined(PIP_HAS_X)' to '#ifdef PIP_HAS_X'
Guard PIConnection, thread primitives, PICodeParser and other feature
code behind PIP_HAS_THREADS/PIP_HAS_FILESYSTEM. In CMake generate the
feature flags summary from the single PIP_HAS_FLAGS list (used by the
add_definitions loop as well), default ICU to OFF and make introspection
also require PIP_HAS_SOCKET. Build system/thread test suites only when
the corresponding feature flags are enabled.
Replace the ad-hoc if-blocks with a PIP_HAS_DEPS_<feature> dependency table
(analogous to __deps_* module dependencies in FindPIP.cmake) resolved to a
fixpoint. The table now also covers http_server (threads+socket) and fftw
(has_fft), and adds the hard client_server/cloud -> io_utils module
dependency. Restore client_server/cloud under the sodium_FOUND guard, put
-ftemplate-depth-32 back before the CMAKE_C_FLAGS copy, and fix the console
block indentation.
- Rename __PIP_TYPENAME_DECLARE to PIP_REGISTER_TYPENAME across all headers
- Add PIP_DECLARE_TYPENAME(name) macro for in-class type name declaration
- Replace all static const char * __pip_typename__() member functions with PIP_DECLARE_TYPENAME
- move __PIP_TYPENAME_DECLARE() calls inside PIP_HAS_* guards so -fno-rtti
builds compile with arbitrary reduced flag combinations
- guard PISerial declaration by PIP_HAS_SERIAL like other feature-gated classes
- reduce threaded read buffers to 1 KiB on embedded targets (PIIODevice,
PIPacketExtractor, PIEthernet)