F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
PassiveComponentBase.cpp
Go to the documentation of this file.
2 #include <Fw/Types/Assert.hpp>
3 #include <FpConfig.hpp>
4 
5 #include <stdio.h>
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  (void)snprintf(buffer, size, "Comp: %s", this->m_objName);
16  // null terminate
17  buffer[size-1] = 0;
18  }
19 #endif
20 
22  }
23 
25  ObjBase::init();
26  this->m_instance = instance;
27  }
28 
30  return this->m_instance;
31  }
32 
34  setIdBase(const U32 idBase)
35  {
36  this->m_idBase = idBase;
37  }
38 
40  getIdBase(void) const
41  {
42  return this->m_idBase;
43  }
44 
45 }
PassiveComponentBase.hpp
Fw::PassiveComponentBase::getIdBase
U32 getIdBase(void) const
Definition: PassiveComponentBase.cpp:40
Fw::PassiveComponentBase::getInstance
NATIVE_INT_TYPE getInstance(void) const
Definition: PassiveComponentBase.cpp:29
Fw::PassiveComponentBase::setIdBase
void setIdBase(const U32)
Set the ID base.
Definition: PassiveComponentBase.cpp:34
Assert.hpp
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Fw::PassiveComponentBase::~PassiveComponentBase
virtual ~PassiveComponentBase()
Destructor.
Definition: PassiveComponentBase.cpp:21
FW_ASSERT
#define FW_ASSERT(...)
Definition: Assert.hpp:9
FpConfig.hpp
ISF configuration file.
Fw::PassiveComponentBase::m_instance
NATIVE_INT_TYPE m_instance
instance of component object
Definition: PassiveComponentBase.hpp:30
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Fw
Definition: BufferGetPortAc.cpp:6