- Sep 01, 2019
-
-
kongr45gpen authored
Logging This adds a Logging "library" to the ECSS Services repo. This library allows logging messages with different severities, and allows the user of the services to choose which severity they want displayed. A comparison between [Google (glog)](https://github.com/google/glog), [spdlog](https://github.com/gabime/spdlog), [plog](https://github.com/SergiusTheBest/plog) and [Boost::Log](https://www.boost.org/doc/libs/1_63_0/libs/log/doc/html/index.html) was made, and we decided to go with a custom lite solution, also compatible with `etl::string`. The following log levels are supported, but they are up for discussion: |Level|Description| |---|---| | **trace** | Very detailed information, useful for tracking the individual steps of an operation.| | **debug** | General debugging information.| | **info** | Noteworthy or periodical events.| | **notice** | Uncommon but expected events.| | **warning** | Unexpected events that do not compromise the operability of a function.| | **error** | Unexpected failure of an operation.| | **emergency** | Unexpected failure that renders the entire system unusable.| | **disabled** | Use this log level to disable logging entirely. No message should be logged as disabled.| The library uses `#define`s that allow logging in this way: ```c++ LOG_ERROR << "Configuration not found"; LOG_INFO << "The camera took " << 15 << " pictures today"; LOG_DEBUG << "Ran function " << functionName << " with " << getId(functionName); ``` Closes #18. It is lite enough to be used [on a microcontroller](https://gitlab.com/acubesat/obc/mockup-4/commit/4aaa55bb72030cee6cf4eca7b082297cf60edf37). **See https://acubesat.gitlab.io/obc/ecss-services/docs/classLogger.html for more detailed documentation of the Logger functionality**. The following images show a sample log output on x86 and on an MCU via UART:  See merge request acubesat/obc/ecss-services!44
-
kongr45gpen authored
-
kongr45gpen authored
-
kongr45gpen authored
Use a non-templated version of etl::string Set the etl format as a static variable for the Logger This prevents wasting time recreating the format variable every time the LOG function is called. Force inlining the LOG function This forces the compiler to check the `if constexpr` structure, and disable the logging line entirely if needed. Never redefine the log level Move `disabled` logging level to ease level checks
-
kongr45gpen authored
Thanks @xlxs41 for the suggestion!
-
kongr45gpen authored
Reinstantiate log level checks Fix documentation, as suggested by @thodkatz Add a few more documentation lines to LogEntry Fixes for cppcheck-misra and vera checks due to updates & false positives
-
kongr45gpen authored
Apply suggestion to inc/Logger.hpp Be explicit about the type used in the LogLevel enumeration This makes LogLevel an unscoped strongly-type enumeration, making sure there is consistency between the expected log level of uint8_t
-
kongr45gpen authored
Thanks @xlxs41 for the suggestion!
-
kongr45gpen authored
-
kongr45gpen authored
Fix a bug with error names not showing up in the logs
-
kongr45gpen authored
Take care of MISRA and vera++ concerns
-
kongr45gpen authored
-
kongr45gpen authored
-
kongr45gpen authored
-
kongr45gpen authored
Add the function that stores the logs
-
kongr45gpen authored
-
kongr45gpen authored
Switch order of execution to improve performance Fix the build
-
kongr45gpen authored
-
kongr45gpen authored
CI pipeline optimization Resolves #46 and #40. The average pipeline time is ~11 minutes until failure or success with the current CI configuration. Main causes of this are: - The original Docker image used for the runners (`lycantropos/cmake`) is bloated, weighing at about **600 MB** for the [latest tag](https://hub.docker.com/r/lycantropos/cmake/tags). This image is downloaded for every stage of the pipeline separately, and due to its size, there is a huge delay between setup and start of the stage. - There are too many calls to `apt-get update` and `install`, that are executed at every stage without reason. Plus, downloading and installing additional packages *for every stage* is also time-consuming, which contributes to the delays. This problem is solved by creating a lighter Docker image (`lightspot21/acubesat-ci`), based on Alpine Linux, which contains all the necessary tools for linting and building (`cmake`, `cppcheck`, `clang-tidy`, `gcc`, `vera++`) plus the code coverage tools `gcovr` and `lcov`. The whole package weighs at **168 MB** for the [latest tag](https://cloud.docker.com/repository/docker/lightspot21/acubesat-ci/tags), which is **73%** less than what we use currently. Gains: - Average pipeline time down to **5-7 minutes** from 11-13 (variation is due to server load) with some times even earlier when failing, resulting in quicker fixes. - Ability to directly control tool versions. All comments/ideas are welcome, especially on optimizing the Docker image size even more! See merge request acubesat/obc/ecss-services!51
-
Grigoris Pavlakis authored
-
kongr45gpen authored
-
kongr45gpen authored
Reenable clang-tidy on new pipeline Fix vera and clang-tidy Update the used Dockerfile to include clang-tidy Clean up commented out stuff from CI configuration Update Dockerfile according to suggestions Fix the virtual package Move update to initialization to ensure latest version of everything Merge branch 'faster-ci' of https://gitlab.com/acubesat/obc/ecss-services into faster-ci Fixes for new broken clang-tidy rules
-
Grigoris Pavlakis authored
# This is the 1st commit message: Add the Dockerfile used to generate the image # This is the commit message #2: Reenable clang-tidy on new pipeline # This is the commit message #3: Fix vera and clang-tidy # This is the commit message #4: Update the used Dockerfile to include clang-tidy # This is the commit message #5: Clean up commented out stuff from CI configuration # This is the commit message #6: Update Dockerfile according to suggestions # This is the commit message #7: Fix the virtual package # This is the commit message #8: Move update to initialization to ensure latest version of everything
-
Grigoris Pavlakis authored
Fix missing script directive Update .gitlab-ci.yml Override image entrypoint to include '-c' argument Revert previous override due to broken .gitlab-ci.yml Remove -Werror argument Update .gitlab-ci.yml
-
Grigoris Pavlakis authored
-
- Aug 09, 2019
-
-
kongr45gpen authored
-
- Aug 08, 2019
-
-
kongr45gpen authored
Since main.cpp only refers to desktop content
-
Orestis Ousoultzoglou authored
Update doxygen configuration See merge request acubesat/obc/ecss-services!42
-
- Aug 07, 2019
-
-
kongr45gpen authored
A small string overhaul This commit adds functions to: - Append strings of fixed size - Read strings with or without a trailing `\0` There is also a string-related fix for the function management service. This takes care of issues #43 and #11. Don't mind the irrelevant commits, they show up because `ci-1` is not merged to master yet. See merge request acubesat/obc/ecss-services!41
-
kongr45gpen authored
-
kongr45gpen authored
-
kongr45gpen authored
Fix cppcheck errors Fix pipeline issues. See merge request acubesat/obc/ecss-services!43
-
Dimitrios Stoupis authored
-
kongr45gpen authored
Fix the build This MR: - fixes a regression with the new version of cppcheck (`1.88`) on some testing code - disables the 13.4 MISRA rule due to a false positive - removes the clutter created by .dump files See merge request acubesat/obc/ecss-services!40
-
kongr45gpen authored
-
kongr45gpen authored
Show less of the irrelevant files, and use the correct link in the README file
-
- Aug 06, 2019
-
-
kongr45gpen authored
ECSS ST13 Split Function **ECSS ST13 Split Function** After the initial development of the ECSS ST13 Large Packet Transfer Service, it is time to * *drumroll* * add the required function that is used to split the Large Messages into smaller ones. Currently it works with normal messages. However, the function should be changed in the future, perhaps with the addition of messages that are able to contain an amount of data larger than the current Message class can hold. Right now the Message::data can contain up to 1024 bytes. The max octet string size is 256. The testing was based on these numbers. **Things to consider about this Service && Function** * A new class that fosters all the needs of a large message might be needed * Sensors or any device that will produce any kind of data, might use this class, for the purposes of ignoring the data size limit imposed by the protocol See merge request acubesat/obc/ecss-services!37
-
athatheo authored
-
- Jul 30, 2019
-
-
Orestis Ousoultzoglou authored
Maybe a thrown error isn't displayed: https://trac.cppcheck.net/ticket/5746
-
- May 04, 2019
-
-
Dimitrios Stoupis authored
-