andrey
94084fb351
Merge branch 'master' into webasm
...
Переработка ветки под систему фиче-флагов master:
- CMake-секция PIP_WASM (платформа, аналог PICO/FREERTOS): принудительный
OFF PIP_HAS_SOCKET/PROCESS/DYNLIB/SERIAL и PIP_BUILD_CONSOLE/USB/OPENCL/
FFTW/LUA/MQTT_CLIENT/HTTP_SERVER/HTTP_CLIENT до pip_resolve_feature_flags();
таблица зависимостей довыключает client_server/cloud/introspection
- Файлы, покрытые фиче-флагами master (piethernet/piserial/pican/pilibrary/
piprocess): взята master-версия, EMSCRIPTEN-стубы webasm удалены как
мёртвый код (нет флага — нет класса)
- Сохранены EMSCRIPTEN-гварды там, где флаги не покрывают поведение:
pihidevice (компилируется под wasm), piinit (initSignals/initLocale/
initUsername/initOSname/initHWInfo), pisysteminfo (instance/machineKey),
pithread (gettid-фоллбэк), picout (EM_ASM console.log),
pibase_macros (PIP_MIN_MSLEEP), pipiplatform.h (EMSCRIPTEN/ARCH_BITS)
- Исправлен AUTO-merge в PISystemInfo::machineKey() (семантический баг:
пустой результат при PIP_HAS_FILESYSTEM=OFF)
Проверено: нативный ctest 364/364 (build-verify), wasm-сборка (build_wasm,
лишь libpip.a + libpip_io_utils.a + pcre2), node-смоук-тест PICout/PISystemInfo
2026-09-19 11:01:39 +03:00
andrey
efede9e6bc
small fix
2026-08-28 21:22:27 +03:00
andrey
74390a9678
fix: restore clang-format off guard and platform include order in piethernet.cpp
2026-08-27 12:29:35 +03:00
andrey
c1b8e97311
Merge branch 'master' into pico_sdk
2026-08-23 17:19:34 +03:00
andrey
d323ebae88
fix: register type names inside feature guards and shrink embedded I/O buffers
...
- 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)
2026-08-23 09:25:32 +03:00
andrey
32066e3a8c
fix: make PIP buildable for no-threads and no-filesystem flag combinations
...
Found while verifying -DPIP_HAS_THREADS=OFF / -DPIP_HAS_FILESYSTEM=OFF
smoke builds (pre-existing gaps of the branch):
- piinit.cpp: full implementation now requires PIP_HAS_THREADS as well
(the PIInit class is declared in piinit.h only with threads; without
threads PIInit is absent altogether, stub/absent branches unchanged)
- PIWaitEvent: drop the PIP_HAS_THREADS guard - it is a plain
pipe/select/WaitForMultipleObjects wrapper with no thread usage
(master had no guard), restores unistd.h include for PICAN etc.
- PIEthernet: guard server_thread_ member, server_func(), threaded
listen/stop parts and writeThreaded() calls by PIP_HAS_THREADS
- PIPeer: guard class/impl by PIP_HAS_THREADS (uses PIThread/PITimer/
PIDiagnostics), openDevice() /etc/pip.conf read by PIP_HAS_FILESYSTEM
- PIBinaryLog::restart(): guard threaded-read restart by PIP_HAS_THREADS
- PIIODevice::configure(config_file,...), PIConnection::configureFromConfig,
PIConfig include resolution: guard path-based bodies by PIP_HAS_FILESYSTEM
- PISerial::availableDevicesInfo(): guard /dev and /proc/tty scan by
PIP_HAS_FILESYSTEM
- PIHIDevice impl: requires filesystem (sysfs scan) in addition to threads
- PIPluginLoader::pluginsDirectories/findLibrary: guard PIFile/PIDir use
by PIP_HAS_FILESYSTEM (fallback: empty list / path as-is)
2026-08-22 14:33:34 +03:00
peri4
b1060fd572
PIEthernet fix: no more close outdated fd on disconnect (error at work with MHD)
2026-08-17 20:26:36 +03:00
andrey
077ac9887b
refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic
...
All feature flags now use positive naming (enabled by default):
- PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET
- PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL
Preprocessor guards inverted:
- #ifndef PIP_NO_X → #ifdef PIP_HAS_X
- #ifdef PIP_NO_X → #ifndef PIP_HAS_X
CMake options default ON instead of OFF.
Platform blocks set flags OFF to disable features.
85 files transformed via Python script + 2 manual fixes.
2026-08-11 19:51:42 +03:00
andrey
1db0dfea43
Merge branch 'master' into pico_sdk
2026-08-11 18:21:50 +03:00
andrey
75bab5a4b9
feat: add WebAssembly (Emscripten) build support
...
- Platform detection: EMSCRIPTEN/WASM macros in piplatform.h
- CMake: PIP_WASM option, auto-detect, STATIC lib, pthread flags,
disable incompatible modules (console, usb, fftw, opencl, lua,
http_server, http_client, mqtt_client)
- Macros: environ, SHUT_RDWR, HAS_LOCALE off, PIP_MIN_MSLEEP=10ms
- System stubs: process, signals, library, systeminfo, hidevice
- IO stubs: serial, ethernet, can, sharedmemory
- Thread: gettid() fallback via pthread_self()
- Core: locale/init adjustments, console.log routing via EM_ASM
- Fix: toDecimal precision loss, unreachable code in createPipe
2026-08-11 18:19:54 +03:00
andrey
87c53d45a4
Merge branch 'master' into pico_sdk
2026-08-11 09:56:27 +03:00
andrey
3ea5af750e
feat: add WebAssembly (Emscripten) build support
...
- Platform detection: EMSCRIPTEN/WASM macros in piplatform.h
- CMake: PIP_WASM option, auto-detect, STATIC lib, pthread flags,
disable incompatible modules (console, usb, fftw, opencl, lua,
http_server, http_client, mqtt_client)
- Macros: environ, SHUT_RDWR, HAS_LOCALE off, PIP_MIN_MSLEEP=10ms
- System stubs: process, signals, library, systeminfo, hidevice
- IO stubs: serial, ethernet, can, sharedmemory
- Thread: gettid() fallback via pthread_self()
- Core: locale/init adjustments, console.log routing via EM_ASM
- Fix: toDecimal precision loss, unreachable code in createPipe
2026-08-11 01:52:14 +03:00
andrey
736acbd419
fix: interfaceAddress buffer overflow on long interface names
2026-08-06 17:01:30 +03:00
andrey
27ed1bc9a7
fix: SIOCGIFMTU passes int* instead of ifreq* (Android)
2026-08-06 17:01:30 +03:00
andrey
38253effc6
fix: SIOCGIFNETMASK reads ifr_addr instead of ifr_netmask
2026-08-06 17:01:30 +03:00
andrey
9cd56ab66c
fix(PIEthernet): check open() return value with >= 0 instead of != 0
...
open() returns -1 on error. The check fd != 0 treated -1 as a
valid fd (since -1 != 0 is true), causing devctl(-1, ...) and
close(-1) on QNX. Fixed to fd >= 0.
2026-08-05 17:39:36 +03:00
andrey
427130e2ca
fix 2
2026-08-05 12:48:40 +03:00
andrey
42dd5945dd
review fixes
2026-08-05 12:46:43 +03:00
andrey
dc69ebe5ae
fix memleak in PIEthernet::interfaces for android
2026-08-05 12:06:03 +03:00
andrey
11d6f7b0db
piethernet replace inet_ntoa by threadsafe inet_ntop
2026-08-05 12:05:09 +03:00
andrey
c53f1d39aa
fix piethernet blocking write return value
2026-08-05 12:03:56 +03:00
andrey
4e7a5d58aa
Merge branch 'master' into pico_sdk
2026-03-29 12:28:36 +03:00
andrey
c02b627d47
some fixes
...
PIEthernet::listen
PIClientServer::Server::~Server
PISystemTime const sleep
ClientServer tests fast and stable
2026-03-17 20:14:22 +03:00
andrey
cf89d77981
pip micro disable piintrospection piwaitevent
...
PIP_NO_SOCET
2025-10-18 11:20:18 +03:00
peri4
daab41e41e
add options for fftw3 precisions
...
configureFromFullPathDevice for all devices now trim() components
2025-09-23 21:16:54 +03:00
andrey
7b52f6d70d
fix get mtu ( #186 )
...
Reviewed-on: #186
2025-06-26 10:52:36 +03:00
peri4
8e96750046
version 4.7.0
...
add PIEthernet socket options setReadBufferSize() and setWriteBufferSize()
add PIByteArray::dataAs
2025-02-06 11:13:43 +03:00
peri4
15548de79c
version 4.5.0
...
PIThread::stopAndWait now returns bool
PIKbdListener on Linux now use piwaitevent_p and can immediately stop
new base method piZeroMemory, also migrate all "memset 0" to piZeroMemory
2024-12-29 11:48:24 +03:00
peri4
caa7880cc4
get rid of piForeach
...
apply some code analyzer recommendations
ICU flag now check if libicu exists
prepare for more accurate growth of containers (limited PoT, then constantly increase size)
2024-11-20 20:01:47 +03:00
peri4
57f8c1313e
first release of translation facility
...
* runtime - loading and translating
* design-time - works with *.ts file (pip_tr utility)
* compile-time - CMake macro for compile *.ts
2024-11-05 13:49:00 +03:00
peri4
aa963a4bda
PIEthernet on error close disconnect
2024-09-17 16:50:22 +03:00
peri4
bdd18b614f
PIEthernet more accuracy construct
...
PIThread windows fix
2024-09-17 16:11:18 +03:00
peri4
f105f616f6
PIThread more accurate end, PIEthernet tcpserver client no reinit
2024-09-17 13:22:20 +03:00
peri4
da4b09be9e
PIEthernet fix tcp-server close (properly delete all clients)
...
PIEthernet::stopThreadedListen() method
decompose client to 2 implementations - server-side and client-side
2024-09-11 21:41:55 +03:00
peri4
0d94699206
first try, works
2024-09-11 10:18:45 +03:00
peri4
1c7fc39b6c
version 4.0.0_alpha
...
in almost all methods removed timeouts in milliseconds, replaced to PISystemTime
PITimer rewrite, remove internal impl, now only thread implementation, API similar to PIThread
PITimer API no longer pass void*
PIPeer, PIConnection improved stability on reinit and exit
PISystemTime new methods
pisd now exit without hanging
2024-07-30 14:18:02 +03:00
peri4
3fa5d9d9df
cloud inspecting ...
2024-03-15 19:49:37 +03:00
peri4
50bff12364
map and cloud fix, add cloud debug
2024-02-22 17:10:38 +03:00
peri4
ccae1a7311
more literals, use some in PIP, small refactor PIThread::start (clang-format mistakes)
2023-07-02 14:02:10 +03:00
andrey
d66f7efb3c
fix include
2023-03-21 14:48:08 +03:00
peri4
0cd1206f94
version 3.9.0, add PIEthernet::NoDelay parameter
2023-03-21 10:14:05 +03:00
peri4
2ac215c19e
separate PIEthernet::Address to PINetworkAddress, typedef PIEthernet::Address to PINetworkAddress and mark as deprecated
...
PIValueTree new attributes for File and Dir
2022-12-19 14:29:18 +03:00
peri4
c2b8a8d6da
code format
2022-12-14 14:13:52 +03:00
peri4
e9128771db
version 3.6.0
...
another fixes in PIEthernet
remove PIThread::interrupt()
piwaitevent patches
2022-11-12 13:31:26 +03:00
Бычков Андрей
cb59017ebb
PICloud many important fixes
2022-11-11 16:18:05 +03:00
Бычков Андрей
16c09ae6e9
PIEthernet atomic connected exchange
2022-11-10 14:08:42 +03:00
Бычков Андрей
8738043dce
some PICloud and PIEthernet fixes
2022-11-09 17:04:13 +03:00
peri4
d3dd3fb32b
blocking PIEthernet write works
2022-11-08 17:34:06 +03:00
Бычков Андрей
f08a07cab0
небольшая чистка и улучшение кода, попытка исправить picloud
2022-11-07 17:16:27 +03:00
peri4
8a5e72c723
migrate to async IO model
...
new PIIODevice::interrupt() virtual method
new PIWaitEvent private class
PIEthernet and PISerial basically tested on Windows and Linux
2022-11-05 23:43:07 +03:00