Lukas Woodtli
7b517347a3
cmake: Light client as individual project
...
The light client project now uses Wakaama as a direct dependency. The
CI and integration tests were adjusted for the new project.
2024-10-31 17:34:17 +01:00
Lukas Woodtli
d638712749
cmake: Bootstrap server as individual project
...
The bootstrap server project now uses Wakaama as a direct dependent
project. The CI and integration tests were adjusted for the new project.
2024-10-31 09:36:53 +01:00
Lukas Woodtli
7e1d606d9c
cmake: Server as individual project
...
The server project now uses Wakaama as a direct dependent project. The
CI and integration tests were adjusted for the new project.
2024-10-30 16:50:21 +01:00
Lukas Woodtli
cc0b92644d
doc: Build doxygen documentation
...
The Doxygen documentation is generated and uploaded with GitHub actions.
Currently the code is not yet thoroughly documented.
2024-10-29 14:50:18 +01:00
Lukas Woodtli
1623d69eda
ci: Use Ubuntu 24.04 on GH actions
...
Use the latest LTS version of Ubuntu.
2024-10-21 15:54:51 +02:00
Lukas Woodtli
ee0c98da74
cmake: Add Wakaama static library
...
The static library can be configured with CMake variables and then be
linked to user applications.
Wakaama became difficult to build and to maintain. Among other things,
there are defines and compiler flags that have to be set, the right set
of source files need to be selected and the correct include directories
have to be provided.
Therefore we rely on CMake and provide the users of Wakaama a static
library, which is relatively simple to build with a given set of
requested features.
This also helps with modularizing Wakaama to improve maintainability.
2024-10-03 14:36:14 +02:00
Lukas Woodtli
e73ff3ddd5
ci: Allow to build in different directory
...
The CI build script now supports a flag to provide a custom build
directory.
2024-10-03 14:36:14 +02:00
Lukas Woodtli
f8e4068c42
cmake: Use server mode as default
...
Server mode is enabled, if no mode (client, server or bootstrap-server)
is selected. A warning is submitted to inform the user of Wakaama about
the default. This simplifies testing and CI.
2024-10-03 14:36:14 +02:00
Lukas Woodtli
47d9f73e60
Extract small function to set up resources in client example
...
This removes a small duplication of the code.
2024-09-23 16:56:08 +02:00
Lukas Woodtli
6c5d5820a6
Extract loop for getting all resource values
...
The loop is put in an own function for maintainability reasons.
2024-09-23 16:56:08 +02:00
Lukas Woodtli
8feb7be20d
Reduce code duplication in client example
...
Some parts of the code were copy-and-pasted several times.
2024-09-23 16:56:08 +02:00
Lukas Woodtli
3f54642dba
Remove code duplication in client example
...
A lot of code was copy-and-pasted several times.
2024-09-23 16:56:08 +02:00
Lukas Woodtli
29677349d8
tests: Add test for lists
...
The test is checking that counting the length of a list is done
properly.
2024-09-23 13:11:11 +02:00
Lukas Woodtli
7d3a1e767a
lwm2mserver: Clean up list functions
...
Each function for list manipulations is wrapped in a macro. This makes
the code more consistent.
2024-09-23 13:11:11 +02:00
Lukas Woodtli
6f7c77a3e7
Add function for counting length of list
...
The function returns the number of node in the list.
2024-09-23 13:11:11 +02:00
Lukas Woodtli
c8d76edf8a
cmake: Allow setting CLI library from CMake
...
Wakaama provides a simple command-line interface library that can be
used together with the library. It is used in the examples.
2024-09-03 10:53:36 +02:00
Lukas Woodtli
b15e2f81e0
cmake: Allow setting platform abstraction layer from CMake
...
Wakaama provides a layer for the POSIX platform. If it is not suitable a
custom layer needs to be provided by the user of the library.
2024-09-03 10:53:36 +02:00
Lukas Woodtli
96ac07b24a
cmake: Require version 3.21
...
CMake 3.21 does not remove a normal variable if a cache variable of the
same name is set. This is the CMake policy CMP0126.
2024-09-03 10:53:36 +02:00
Lukas Woodtli
0c811ae3ed
cmake: Extract connection for testing in library
...
The testing implementation of the transport layer is extracted in an own
object library and linked directly to the unit tests.
Also other needed libraries (CLI and platform) are directly linked to
the testing executable.
The possibility to select the testing transport layer from CMake is
removed. This special transport layer implementation is meant to be used
only in the unit tests internally.:X
2024-08-28 15:16:01 +02:00
Lukas Woodtli
03e2a63fb8
tests: Clean up test variants
...
We use now CMake presets for testing different configurations. Therefore
the CMake code for test variants is not needed anymore.
2024-08-28 15:16:01 +02:00
Lukas Woodtli
1d6dfdebb0
tests: Add more CMake presets to test multiple configuration
...
To enable the tests for different combinations of configuration options
we rely on CMake presets. Previously these combinations were handled in
the CMake project.
2024-08-28 15:16:01 +02:00
Lukas Woodtli
c997c59ea2
ci: Improve running tests and collecting coverage in CI script
...
We set the default mode for Wakaama to server. This way we can build a
library without any hacks in CMake.
After creating the coverage report we clean up the intermediate files.
2024-08-28 15:16:01 +02:00
Lukas Woodtli
a4e3f2726c
tests: Build and run tests dependent on configuration
...
Some tests can only be compiled when the corresponding configuration is
enabled. Other test don't give a compilation error but they need the
correct configuration at runtime.
Therefore tests are disabled if the needed configuration is not set.
2024-08-28 15:16:01 +02:00
Lukas Woodtli
f419ad278b
tests: Improve setting defines for tests
...
The defines are now set in the same way as for other targets.
2024-08-28 15:16:01 +02:00
Lukas Woodtli
cc8ac858d8
cmake: Set endianess globally
...
The endianess needs to be the same for all parts of the project. So it
is set globally.
2024-08-28 15:16:01 +02:00
Lukas Woodtli
2175575bb0
Fix CMake variables for data types
...
The CMake cache variables had a typo. Moreover they weren't declared as
options. Therefore the correct defines were not set on the targets.
2024-08-21 20:57:08 +02:00
Lukas Woodtli
76f42e24c3
tests: Enable LwM2M 1.0 client test only if suitable
...
The test for client functionality with LwM2M 1.0 is only enabled, if the
corresponding configuration is selected.
2024-08-21 20:57:08 +02:00
Lukas Woodtli
d655f2b518
tests: Disable incompatible tests
...
Some tests are not compatible with certain defines. If these defines are
set the corresponding tests are disabled.
2024-08-21 20:57:08 +02:00
Lukas Woodtli
047f5dab5f
Get rid of macro to specify LwM2M version 1.1
...
LwM2M version 1.1 is the default for Wakaama. We need only a macro for
the version 1.0 to handle special cases.
2024-08-21 20:57:08 +02:00
Lukas Woodtli
847ff35daa
tests: Include unit test code in coverage report
...
This helps to make sure that all unit test are run.
2024-08-21 20:57:08 +02:00
Lukas Woodtli
d658d7311c
cmake: Extract 'tinydtls' transport into a library
...
The DTLS transport layer implementation with 'tinydtls' is now
encapsulated into an object library in the CMake project. This makes the
project more modular.
2024-08-19 10:07:05 +02:00
Lukas Woodtli
4cdbd18bdd
cmake: Extract UDP transport into a library
...
The UDP transport layer implementation for POSIX is now encapsulated
into an object library in the CMake project. This makes the project more
modular.
2024-08-19 10:07:05 +02:00
Lukas Woodtli
5de25aa11f
cmake: Extract POSIX platform layer into a library
...
The platform layer for POSIX is now encapsulated into an object library
in the CMake project. This makes the project more modular.
2024-08-19 10:07:05 +02:00
Lukas Woodtli
949549a760
cmake: Extract command line functionality into library
...
The command line functionality is now encapsulated into an object library
in the CMake project. This makes the project more modular.
2024-08-19 10:07:05 +02:00
Lukas Woodtli
5d42449283
cmake: Allow transport layer selection from CMake
...
The implementation of the transport layer can now be selected with a
CMake cache variable.
2024-08-19 10:07:05 +02:00
Lukas Woodtli
206b688781
cmake: Fix linking CUnit
...
Link CUnit to target in modern CMake manner.
2024-08-19 10:07:05 +02:00
Lukas Woodtli
402a305afe
Move declaration for 'logging' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
7ab798caad
Move declaration for 'packet' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
17c9238628
Move declaration for 'uri' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
befa878121
Move declaration for 'objects' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
7c8e81c256
Move declaration for 'management' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
e82738d675
Move declaration for 'observe' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
ec91f25f2b
Move declaration for 'registration' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
6383ce8671
Move declaration for 'bootstrap' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
7a4adf858a
Move declaration for 'discover' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
b0061b92e0
Move declaration for 'utils' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
e59c2ce0b3
Move declaration for 'reporting' into own header
...
This is more C like and leads to a better modularized project.
2024-08-19 10:06:15 +02:00
Lukas Woodtli
5ec7c099ae
refactor: Extract common code
...
Some code to extract an opaque value was duplicated. A function was
extracted in order to remove the duplication.
2024-08-14 10:35:46 +02:00
Lukas Woodtli
31238b1a2e
refactor: Extract some small functions
...
This make the code better to maintain.
2024-08-14 10:35:46 +02:00
Lukas Woodtli
f6c0ddad7e
ci: Disable some sonar hints
...
The issues in the code have been there before. Sonar doesn't recognize
moved files and assumes that these files are new.
2024-08-14 10:35:46 +02:00