F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
PassiveComponentBase.cpp
Go to the documentation of this file.
2#include <Fw/Types/Assert.hpp>
3#include <FpConfig.hpp>
4
5#include <cstdio>
6
7namespace Fw {
8
9 PassiveComponentBase::PassiveComponentBase(const char* name) : Fw::ObjBase(name), m_idBase(0), m_instance(0) {
10 }
11
12#if FW_OBJECT_TO_STRING == 1 && FW_OBJECT_NAMES == 1
13 void PassiveComponentBase::toString(char* buffer, NATIVE_INT_TYPE size) {
14 FW_ASSERT(buffer);
15 FW_ASSERT(size > 0);
16 if (snprintf(buffer, size, "Comp: %s", this->m_objName) < 0) {
17 buffer[0] = 0;
18 }
19 }
20#endif
21
23 }
24
27 this->m_instance = instance;
28 }
29
31 return this->m_instance;
32 }
33
34 void PassiveComponentBase ::
35 setIdBase(const U32 idBase)
36 {
37 this->m_idBase = idBase;
38 }
39
40 U32 PassiveComponentBase ::
41 getIdBase() const
42 {
43 return this->m_idBase;
44 }
45
46}
#define FW_ASSERT(...)
Definition Assert.hpp:7
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
C++-compatible configuration header for fprime configuration.
Brief class description.
Definition ObjBase.hpp:32
void init()
Object initializer.
Definition ObjBase.cpp:27
NATIVE_INT_TYPE getInstance() const
PassiveComponentBase(const char *name)
Named constructor.
virtual ~PassiveComponentBase()
Destructor.
Definition Buffer.cpp:21