F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
PassiveComponentBase.cpp
Go to the documentation of this file.
1
#include <
Fw/Comp/PassiveComponentBase.hpp
>
2
#include <Fw/Types/Assert.hpp>
3
#include <FpConfig.hpp>
4
5
#include <cstdio>
6
7
namespace
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
22
PassiveComponentBase::~PassiveComponentBase
() {
23
}
24
25
void
PassiveComponentBase::init
(
NATIVE_INT_TYPE
instance) {
26
ObjBase::init
();
27
this->m_instance = instance;
28
}
29
30
NATIVE_INT_TYPE
PassiveComponentBase::getInstance
()
const
{
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
}
PassiveComponentBase.hpp
Fw::ObjBase
Brief class description.
Definition:
ObjBase.hpp:33
Fw::PassiveComponentBase::getIdBase
U32 getIdBase() const
Definition:
PassiveComponentBase.cpp:41
Fw::PassiveComponentBase::PassiveComponentBase
PassiveComponentBase(const char *name)
Named constructor.
Definition:
PassiveComponentBase.cpp:9
Fw::PassiveComponentBase::setIdBase
void setIdBase(const U32)
Set the ID base.
Definition:
PassiveComponentBase.cpp:35
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:27
Fw::PassiveComponentBase::~PassiveComponentBase
virtual ~PassiveComponentBase()
Destructor.
Definition:
PassiveComponentBase.cpp:22
Fw::ObjBase::init
void init()
Object initializer.
Definition:
ObjBase.cpp:27
FW_ASSERT
#define FW_ASSERT(...)
Definition:
Assert.hpp:9
Fw::PassiveComponentBase::getInstance
NATIVE_INT_TYPE getInstance() const
Definition:
PassiveComponentBase.cpp:30
Fw
Definition:
SerIds.hpp:20
Fw
Comp
PassiveComponentBase.cpp
Generated by
1.8.17