Dawn Framework 1.0
Universal data acquisition framework for embedded systems
oot.cxx
1// dawn/src/oot.cxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Weak default implementations of the OOT user-extension hooks (factories
6// and app lifecycle callbacks). Out-of-tree projects override any subset
7// with strong definitions in <oot>/external/dawn_oot_hooks.cxx, which
8// dawn/apps/dawn/CMakeLists.txt compiles into the application target.
9
10#include <nuttx/compiler.h>
11#include <unistd.h>
12
13#include "dawn/oot.hxx"
14
15namespace dawn::oot
16{
17
18// Factory hooks.
19
20weak_function IIOFactory *user_io_factory()
21{
22 return nullptr;
23}
24
25weak_function IProgFactory *user_prog_factory()
26{
27 return nullptr;
28}
29
30weak_function IProtoFactory *user_proto_factory()
31{
32 return nullptr;
33}
34
35// Lifecycle hooks.
36
37weak_function int user_init()
38{
39 return OK;
40}
41
42weak_function int user_post_load(CDawn *dawn)
43{
44 (void)dawn;
45 return OK;
46}
47
48weak_function void user_on_idle(CDawn *dawn)
49{
50 (void)dawn;
51 sleep(1);
52}
53
54weak_function int user_pre_shutdown(CDawn *dawn)
55{
56 (void)dawn;
57 return OK;
58}
59
60} // namespace dawn::oot
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13