Dawn Framework 1.0
Universal data acquisition framework for embedded systems
factory.cxx
1// dawn/src/system/factory.cxx
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#include "dawn/system/factory.hxx"
7
8#ifdef CONFIG_DAWN_SYSTEM_LTE
9# include "dawn/system/lte.hxx"
10#endif
11
12#ifdef CONFIG_DAWN_SYSTEM_GNSS
13# include "dawn/system/gnss.hxx"
14#endif
15
16using namespace dawn;
17
18CSystemCommon *CSystemFactory::create(CDescObject &desc)
19{
20 switch (desc.getObjectCls())
21 {
22#ifdef CONFIG_DAWN_SYSTEM_LTE
24 return new CSystemLte(desc);
25#endif
26
27#ifdef CONFIG_DAWN_SYSTEM_GNSS
29 return new CSystemGnss(desc);
30#endif
31
32 default:
33 return nullptr;
34 }
35}
Descriptor wrapper for individual object configuration.
uint16_t getObjectCls() const
Get object class field.
Base class for OBJTYPE_ANY configuration objects.
Definition common.hxx:25
@ SYSTEM_CLASS_GNSS
GNSS coexistence manager (policy)
Definition common.hxx:31
@ SYSTEM_CLASS_LTE
LTE / cellular connectivity settings.
Definition common.hxx:30
GNSS coexistence manager.
Definition gnss.hxx:39
LTE connectivity object (OBJTYPE_ANY, cls = SYSTEM_CLASS_LTE).
Definition lte.hxx:22
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13