added weakptr link to settings and checks
it wont crash on deinitialized setings now
Pseuto UT are passing
Added:
- deregistration on Settings destrution
- weak referencing of Service to not crash Settings on missuse
- Proxy as initialization parameter to Settings
Unused code removed
Enabled tests to be written for Settings
Removed dependency from freertos in test global file
EntryPath tests updated and compilation slimed
added weakptr link to settings and checks
it wont crash on deinitialized setings now
Pseuto UT are passing
Added:
- deregistration on Settings destrution
- weak referencing of Service to not crash Settings on missuse
- Proxy as initialization parameter to Settings
Unused code removed
Enabled tests to be written for Settings
Forced each message to have declared type as parts of Bus logic
depends on it and previously we encountered undefined
behaviours. Added tests and messages validators.
Added queries:
- list quotes from selected category,
- enable/disable category,
- enable/disable single quote,
- list enabled quotes,
Other fixes:
- move `msgHandled` and `msgNotHandled` to `Message.hpp`,
- use `typeid` in `QuotesAgent::registerMessages`,
- change `Quotes::Queries` style,
- make `quotesList` private
Queries to add in next PR:
- add/read/write quote
Allow configuring stack size of a worker by a child class for a better
system heap utilization control.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
The system watchdog monitors whether there is message traffic
on the Bus. If no message was sent for an extended period of time,
a reset will occur. It should also protect against system-wide hangs.
On Linux, watchdog is simulated by a FreeRTOS task that will call exit
on timeout.
Added Gui timer auto refresh window on count and additional
name based API to detach timer from window. Added
TimerIDGenerator and exception throw on creating user timer
with same name.
In order to synchronize the Low Power mode, the services were
immediately informed about the frequency change,
so that they can update their resources (e.g. PWM filling)
and services may request the maximum CPU frequency in order
to perform a task (e.g. screen redraw, telephone conversation)
Due to a race condition between source and sink voice is not always
starting when calling. Introduce audio stream connections to avoid
race condition and improve handling of audio start and stop operations.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
* allow workers to run independently from service
* change worker to use FreeRTOS wrapper Queue class instead of
freeRTOS native queues
* fix bug disallowing to destruct worker that have never ran
* fixed worker bad state transition to Running state
* [EGD-3688] Relax retries count for send
enable ServiceDesktop
* [EGD-3688] Relax retries count for send
enable ServiceDesktop
* [EGD-4318] enable service desktop and USB communication
CDC for serial port (communication with Mudita Center)
MTP for file transfer
* [EGD-4318] include path fix
* [egd-4318] constexpr brought back
* [EGD-4318]: review changes
- all BSP specific code moved to bsp files
- added a device listener class for USB
- simplified WorkerDesktop
* [EGD-4318] more reivew fixes mostly include paths and enums
* [EGD-4319] review fixes for SP2FET
* [EGD-4318] updates for large messages sent from phone
* [EGD-4318] more review fixes
- error checks on linux (ptms open and ptsname)
- removed all vfs
- service-desktop won't start if worker init fails
* [EGD-4318] updated return values for usbInit
* Update module-services/service-desktop/WorkerDesktop.cpp
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
* Update module-services/service-desktop/endpoints/update/UpdateMuditaOS.hpp
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
* [EGD-4318] review fixes
- removed #define
- return values for usbInit
* Update module-bsp/board/linux/usb_cdc/usb_cdc.cpp
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
* [EGD-4318] updated taglib
* [EGD-4318] style fixes
* Update module-bsp/board/linux/usb_cdc/usb_cdc.cpp
Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
* [EGD-4318] switches from freertos Timer class to sys::Timer
* Update module-services/service-desktop/WorkerDesktop.cpp
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
* Update module-services/service-desktop/WorkerDesktop.cpp
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
* [EGD-4318] added mutex/lock during raw data transfers
* [EGD-4318] if the TAR file is zero size or invalid
mtar_close causes HF. This is a workaround
* [EGD-4318] timer should not start on constructor
* [EGD-4318] getRawMode is const noecept
Co-authored-by: unknown <atom@prostate.local>
Co-authored-by: Piotr Tanski <piotr.tanski@mudita.com>
Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
Reduce firmware size by refactoring global data defined in public
headers.
Each global variable which require runtime initialization adds
initialization code to every translation unit which includes the header
where the variable is defined and declared.
* EGD-3585 SerwiceGUI and ServiceEink initial cleanup
* moved code to one function per message handling
* removed dead code from comments
* added Service.cpp demangling to debug messages for clear output
* added Response value to return messages to `connect()`
* Timers now are Application thread safe
* Timers now have consistent API independend of Application (no more c style timers)
* Timers can have either: callback or override onTimer() method - this
way we can create more complicated timers or just use existing ones
* gui::Timer added via adapter class GuiTimer to decouple sys::Timer
with gui::Timer
* Fixed race in wrapper
* Updated docs
* fixed using std and cpp_freertos and DataReceivedHandler hidden in Application.hpp
Implement termination of worker threads. To achieve the goal so called
control queue has been introduced which is handled in Worker base class.
Once worker thread receives stop message it tries to kill itself. It is
possible to join a worker thread before deinit know thanks to a
semaphore given before thread termination.
Some improvements to the interface and implementation has been made
including state sanity checks. It is assumed that only service that owns
the worker is allowed to stop it, which allows not to consider code
reentrancy.
Worker destroying procedure has been updated in services that already
own workers.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>