You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal of a cleaner architecture for Wakaama. This ensures that the library is modular and easier to maintain and extend.
Layered Architecture
Each layer is allowed to access code from itself and all layers below it (the layers are open). But it is not allowed to access code from higher layers.
Support Layer
This forms the basis for the library and supports an abstraction to the environment. They are necessary for the functionality of the library, but cannot be implemented in a generic way.
Abstractions in this layer include:
OS (Platform)
Transport (TLS, dTLS, ...)
Event Loop (select, epoll, ...)
Customization in this layer is mainly achieved by link-time polymorphism:
For example, a POSIX platform module implements the set of functions declared in platform.h and is linked to the library. Another module for and embedded system would implement the same functions. But only one of these modules are linked to the final library.
Base Layer
This layer contains the core LwM2M functionality.
Customization in this layer is done with conditional compilation (#ifdefs).
Add On's Layer
This layer includes additional functionality, that might be useful for some application, but that can be omitted for others. This might include modules for:
Command Line Interface (CLI)
IPSO Object Registry
Modules from this layer can be added with the build system (CMake).
Folder Structure
The folder structure should reflect the architecture layers.
With a nice folder structure and a correct build system, some architectual rules can be enfored (i.e. no circular dependencies, accessing only lower layers).
The text was updated successfully, but these errors were encountered:
This is a proposal of a cleaner architecture for Wakaama. This ensures that the library is modular and easier to maintain and extend.
Layered Architecture
Each layer is allowed to access code from itself and all layers below it (the layers are open). But it is not allowed to access code from higher layers.
Support Layer
This forms the basis for the library and supports an abstraction to the environment. They are necessary for the functionality of the library, but cannot be implemented in a generic way.
Abstractions in this layer include:
select
,epoll
, ...)Customization in this layer is mainly achieved by link-time polymorphism:
For example, a POSIX platform module implements the set of functions declared in
platform.h
and is linked to the library. Another module for and embedded system would implement the same functions. But only one of these modules are linked to the final library.Base Layer
This layer contains the core LwM2M functionality.
Customization in this layer is done with conditional compilation (
#ifdef
s).Add On's Layer
This layer includes additional functionality, that might be useful for some application, but that can be omitted for others. This might include modules for:
Modules from this layer can be added with the build system (CMake).
Folder Structure
The folder structure should reflect the architecture layers.
With a nice folder structure and a correct build system, some architectual rules can be enfored (i.e. no circular dependencies, accessing only lower layers).
The text was updated successfully, but these errors were encountered: