mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 04:35:25 -06:00
Merge pull request #612 from joshuaa/fix-fw-obj-names
Refactor FW_OBJECT_NAMES switches and fix building without object names
This commit is contained in:
commit
1c4e2d2d17
@ -370,36 +370,15 @@ namespace ${namespace} {
|
|||||||
// Component construction, initialization, and destruction
|
// Component construction, initialization, and destruction
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
${class_name} ::
|
|
||||||
#if $kind == "passive":
|
#if $kind == "passive":
|
||||||
\#if FW_OBJECT_NAMES == 1
|
${class_name} :: ${class_name}(const char* compName) :
|
||||||
${class_name}(const char* compName) :
|
Fw::PassiveComponentBase(compName) {
|
||||||
Fw::PassiveComponentBase(compName)
|
|
||||||
\#else
|
|
||||||
${class_name}() :
|
|
||||||
Fw::PassiveComponentBase()
|
|
||||||
\#endif
|
|
||||||
{
|
|
||||||
|
|
||||||
#else if $kind == "queued":
|
#else if $kind == "queued":
|
||||||
\#if FW_OBJECT_NAMES == 1
|
${class_name} :: ${class_name}(const char* compName) :
|
||||||
${class_name}(const char* compName) :
|
Fw::QueuedComponentBase(compName) {
|
||||||
Fw::QueuedComponentBase(compName)
|
|
||||||
\#else
|
|
||||||
${class_name}() :
|
|
||||||
Fw::QueuedComponentBase()
|
|
||||||
\#endif
|
|
||||||
{
|
|
||||||
|
|
||||||
#else:
|
#else:
|
||||||
\#if FW_OBJECT_NAMES == 1
|
${class_name} :: ${class_name}(const char* compName) :
|
||||||
${class_name}(const char* compName) :
|
Fw::ActiveComponentBase(compName) {
|
||||||
Fw::ActiveComponentBase(compName)
|
|
||||||
\#else
|
|
||||||
${class_name}() :
|
|
||||||
Fw::ActiveComponentBase()
|
|
||||||
\#endif
|
|
||||||
{
|
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
#for $ids, $tlmname, $type, $size, $update, $comment, $typeinfo in $channels:
|
#for $ids, $tlmname, $type, $size, $update, $comment, $typeinfo in $channels:
|
||||||
|
|||||||
@ -241,17 +241,11 @@ namespace ${namespace} {
|
|||||||
// Component construction, initialization, and destruction
|
// Component construction, initialization, and destruction
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
\#if FW_OBJECT_NAMES == 1
|
|
||||||
//! Construct a ${name}ComponentBase object
|
//! Construct a ${name}ComponentBase object
|
||||||
//!
|
//!
|
||||||
${name}ComponentBase(
|
${name}ComponentBase(
|
||||||
const char* compName $doxygen_post_comment("Component name")
|
const char* compName = "" $doxygen_post_comment("Component name")
|
||||||
);
|
);
|
||||||
\#else
|
|
||||||
//! Construct a ${name}ComponentBase object
|
|
||||||
//!
|
|
||||||
${name}ComponentBase(void);
|
|
||||||
\#endif
|
|
||||||
|
|
||||||
//! Initialize a ${name}ComponentBase object
|
//! Initialize a ${name}ComponentBase object
|
||||||
//!
|
//!
|
||||||
@ -1012,6 +1006,7 @@ $emit_non_port_params(8, $params)
|
|||||||
|
|
||||||
#end for
|
#end for
|
||||||
#end if
|
#end if
|
||||||
|
|
||||||
#if $needs_msg_size:
|
#if $needs_msg_size:
|
||||||
|
|
||||||
PRIVATE:
|
PRIVATE:
|
||||||
|
|||||||
@ -25,14 +25,9 @@ namespace ${namespace} {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
${name}ComponentImpl ::
|
${name}ComponentImpl ::
|
||||||
\#if FW_OBJECT_NAMES == 1
|
|
||||||
${name}ComponentImpl(
|
${name}ComponentImpl(
|
||||||
$emit_non_port_params([ $param_compName ])
|
$emit_non_port_params([ $param_compName ])
|
||||||
) :
|
) : ${component_base}(compName)
|
||||||
${component_base}(compName)
|
|
||||||
\#else
|
|
||||||
${name}ComponentImpl(void)
|
|
||||||
\#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,11 +34,7 @@ namespace ${namespace} {
|
|||||||
//! Construct object $name
|
//! Construct object $name
|
||||||
//!
|
//!
|
||||||
${name}ComponentImpl(
|
${name}ComponentImpl(
|
||||||
\#if FW_OBJECT_NAMES == 1
|
|
||||||
$emit_non_port_params([ $param_compName ])
|
$emit_non_port_params([ $param_compName ])
|
||||||
\#else
|
|
||||||
void
|
|
||||||
\#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object $name
|
//! Initialize object $name
|
||||||
|
|||||||
@ -4,16 +4,12 @@
|
|||||||
|
|
||||||
namespace Drv {
|
namespace Drv {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
BlockDriverImpl::BlockDriverImpl(const char* compName) :
|
BlockDriverImpl::BlockDriverImpl(const char* compName) :
|
||||||
BlockDriverComponentBase(compName)
|
BlockDriverComponentBase(compName), m_cycles(0)
|
||||||
#else
|
|
||||||
BlockDriverImpl::BlockDriverImpl()
|
|
||||||
#endif
|
|
||||||
,m_cycles(0)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlockDriverImpl::init(NATIVE_INT_TYPE queueDepth) {
|
void BlockDriverImpl::init(NATIVE_INT_TYPE queueDepth) {
|
||||||
BlockDriverComponentBase::init(queueDepth);
|
BlockDriverComponentBase::init(queueDepth);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,24 +5,21 @@
|
|||||||
|
|
||||||
namespace Drv {
|
namespace Drv {
|
||||||
|
|
||||||
class BlockDriverImpl : public BlockDriverComponentBase {
|
class BlockDriverImpl : public BlockDriverComponentBase {
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Only called by derived class
|
public:
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
BlockDriverImpl(const char* compName);
|
|
||||||
#else
|
|
||||||
BlockDriverImpl();
|
|
||||||
#endif
|
|
||||||
void init(NATIVE_INT_TYPE queueDepth);
|
|
||||||
~BlockDriverImpl(void);
|
|
||||||
// a little hack to get the reference running
|
|
||||||
void callIsr(void);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// downcalls for input ports
|
// Only called by derived class
|
||||||
|
BlockDriverImpl(const char* compName);
|
||||||
|
|
||||||
|
void init(NATIVE_INT_TYPE queueDepth);
|
||||||
|
~BlockDriverImpl(void);
|
||||||
|
// a little hack to get the reference running
|
||||||
|
void callIsr(void);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// downcalls for input ports
|
||||||
void InterruptReport_internalInterfaceHandler(U32 ip);
|
void InterruptReport_internalInterfaceHandler(U32 ip);
|
||||||
void BufferIn_handler(NATIVE_INT_TYPE portNum, Drv::DataBuffer& buffer);
|
void BufferIn_handler(NATIVE_INT_TYPE portNum, Drv::DataBuffer& buffer);
|
||||||
void Sched_handler(NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context);
|
void Sched_handler(NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context);
|
||||||
@ -39,8 +36,7 @@ namespace Drv {
|
|||||||
// cycle count
|
// cycle count
|
||||||
U32 m_cycles;
|
U32 m_cycles;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -31,11 +31,7 @@ namespace Drv {
|
|||||||
//! Construct object LinuxGpioDriver
|
//! Construct object LinuxGpioDriver
|
||||||
//!
|
//!
|
||||||
LinuxGpioDriverComponentImpl(
|
LinuxGpioDriverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object LinuxGpioDriver
|
//! Initialize object LinuxGpioDriver
|
||||||
|
|||||||
@ -21,18 +21,13 @@ namespace Drv {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
LinuxGpioDriverComponentImpl ::
|
LinuxGpioDriverComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxGpioDriverComponentImpl(
|
LinuxGpioDriverComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : LinuxGpioDriverComponentBase(compName),
|
||||||
LinuxGpioDriverComponentBase(compName)
|
m_gpio(-1),
|
||||||
#else
|
m_direction(GPIO_IN),
|
||||||
LinuxGpioDriverImpl(void)
|
m_fd(-1),
|
||||||
#endif
|
m_quitThread(false)
|
||||||
,m_gpio(-1)
|
|
||||||
,m_direction(GPIO_IN)
|
|
||||||
,m_fd(-1)
|
|
||||||
,m_quitThread(false)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,15 +31,10 @@ namespace Drv {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
LinuxI2cDriverComponentImpl ::
|
LinuxI2cDriverComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxI2cDriverComponentImpl(
|
LinuxI2cDriverComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : LinuxI2cDriverComponentBase(compName),
|
||||||
LinuxI2cDriverComponentBase(compName)
|
m_fd(-1)
|
||||||
#else
|
|
||||||
LinuxI2cDriverComponentImpl(void)
|
|
||||||
#endif
|
|
||||||
,m_fd(-1)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,13 +29,7 @@ namespace Drv {
|
|||||||
|
|
||||||
//! Construct object LinuxI2cDriver
|
//! Construct object LinuxI2cDriver
|
||||||
//!
|
//!
|
||||||
LinuxI2cDriverComponentImpl(
|
LinuxI2cDriverComponentImpl(const char *const compName);
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
//! Initialize object LinuxI2cDriver
|
//! Initialize object LinuxI2cDriver
|
||||||
//!
|
//!
|
||||||
|
|||||||
@ -24,15 +24,10 @@ namespace Drv {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
LinuxI2cDriverComponentImpl ::
|
LinuxI2cDriverComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxI2cDriverComponentImpl(
|
LinuxI2cDriverComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : LinuxI2cDriverComponentBase(compName),
|
||||||
LinuxI2cDriverComponentBase(compName)
|
m_fd(-1)
|
||||||
#else
|
|
||||||
LinuxI2cDriverComponentImpl(void)
|
|
||||||
#endif
|
|
||||||
,m_fd(-1)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,11 +32,7 @@ namespace Drv {
|
|||||||
//! Construct object LinuxSerialDriver
|
//! Construct object LinuxSerialDriver
|
||||||
//!
|
//!
|
||||||
LinuxSerialDriverComponentImpl(
|
LinuxSerialDriverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object LinuxSerialDriver
|
//! Initialize object LinuxSerialDriver
|
||||||
|
|||||||
@ -15,16 +15,12 @@ namespace Drv {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
LinuxSerialDriverComponentImpl ::
|
LinuxSerialDriverComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxSerialDriverComponentImpl(
|
LinuxSerialDriverComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : LinuxSerialDriverComponentBase(compName),
|
||||||
LinuxSerialDriverComponentBase(compName)
|
m_fd(-1),
|
||||||
#else
|
m_device("NOT_EXIST"),
|
||||||
LinuxSerialDriverImpl(void) :
|
m_quitReadThread(false)
|
||||||
LinuxSerialDriverComponentBase()
|
|
||||||
#endif
|
|
||||||
,m_fd(-1),m_device("NOT_EXIST"),m_quitReadThread(false)
|
|
||||||
{
|
{
|
||||||
// initialize buffer set
|
// initialize buffer set
|
||||||
for (NATIVE_INT_TYPE entry = 0; entry < DR_MAX_NUM_BUFFERS; entry++) {
|
for (NATIVE_INT_TYPE entry = 0; entry < DR_MAX_NUM_BUFFERS; entry++) {
|
||||||
|
|||||||
@ -44,12 +44,8 @@ namespace Drv {
|
|||||||
//! Construct object LinuxSpiDriver
|
//! Construct object LinuxSpiDriver
|
||||||
//!
|
//!
|
||||||
LinuxSpiDriverComponentImpl(
|
LinuxSpiDriverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char * const compName /*!< The component name*/
|
const char * const compName /*!< The component name*/
|
||||||
#else
|
);
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
//! Initialize object LinuxSpiDriver
|
//! Initialize object LinuxSpiDriver
|
||||||
//!
|
//!
|
||||||
|
|||||||
@ -20,13 +20,12 @@ namespace Drv {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
LinuxSpiDriverComponentImpl::
|
LinuxSpiDriverComponentImpl::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxSpiDriverComponentImpl(const char * const compName) :
|
LinuxSpiDriverComponentImpl(const char * const compName) :
|
||||||
LinuxSpiDriverComponentBase(compName)
|
LinuxSpiDriverComponentBase(compName),
|
||||||
#else
|
m_fd(-1),
|
||||||
LinuxSpiDriverImpl(void)
|
m_device(-1),
|
||||||
#endif
|
m_select(-1),
|
||||||
,m_fd(-1),m_device(-1),m_select(-1),m_bytes(0)
|
m_bytes(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,18 +28,10 @@ namespace Drv {
|
|||||||
|
|
||||||
SocketIpDriverComponentImpl ::
|
SocketIpDriverComponentImpl ::
|
||||||
SocketIpDriverComponentImpl(
|
SocketIpDriverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName
|
const char *const compName
|
||||||
#endif
|
) : SocketIpDriverComponentBase(compName),
|
||||||
) :
|
m_buffer(0xbeef, 0xbeef, reinterpret_cast<U64>(m_backing_data), sizeof(m_buffer)),
|
||||||
#if FW_OBJECT_NAMES == 1
|
m_stop(false)
|
||||||
SocketIpDriverComponentBase(compName)
|
|
||||||
#else
|
|
||||||
SocketIpDriverComponentBase(void)
|
|
||||||
#endif
|
|
||||||
,
|
|
||||||
m_buffer(0xbeef, 0xbeef, reinterpret_cast<U64>(m_backing_data), sizeof(m_buffer)),
|
|
||||||
m_stop(false)
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void SocketIpDriverComponentImpl ::
|
void SocketIpDriverComponentImpl ::
|
||||||
|
|||||||
@ -42,9 +42,7 @@ namespace Drv {
|
|||||||
//! Construct object SocketIpDriver
|
//! Construct object SocketIpDriver
|
||||||
//!
|
//!
|
||||||
SocketIpDriverComponentImpl(
|
SocketIpDriverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object SocketIpDriver
|
//! Initialize object SocketIpDriver
|
||||||
|
|||||||
@ -30,15 +30,10 @@ namespace Fw {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ActiveComponentBase::ActiveComponentBase(const char* name) : QueuedComponentBase(name) {
|
ActiveComponentBase::ActiveComponentBase(const char* name) : QueuedComponentBase(name) {
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
ActiveComponentBase::ActiveComponentBase() : QueuedComponentBase() {
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ActiveComponentBase::~ActiveComponentBase() {
|
ActiveComponentBase::~ActiveComponentBase() {
|
||||||
DEBUG_PRINT("ActiveComponent %s destructor.\n",this->getObjName());
|
DEBUG_PRINT("ActiveComponent %s destructor.\n",this->getObjName());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,11 +28,7 @@ namespace Fw {
|
|||||||
};
|
};
|
||||||
|
|
||||||
PROTECTED:
|
PROTECTED:
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ActiveComponentBase(const char* name); //!< Constructor
|
ActiveComponentBase(const char* name); //!< Constructor
|
||||||
#else
|
|
||||||
ActiveComponentBase(); //!< Constructor
|
|
||||||
#endif
|
|
||||||
virtual ~ActiveComponentBase(); //!< Destructor
|
virtual ~ActiveComponentBase(); //!< Destructor
|
||||||
void init(NATIVE_INT_TYPE instance); //!< initialization code
|
void init(NATIVE_INT_TYPE instance); //!< initialization code
|
||||||
virtual void preamble(void); //!< A function that will be called before the event loop is entered
|
virtual void preamble(void); //!< A function that will be called before the event loop is entered
|
||||||
|
|||||||
@ -6,13 +6,8 @@
|
|||||||
|
|
||||||
namespace Fw {
|
namespace Fw {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PassiveComponentBase::PassiveComponentBase(const char* name) : Fw::ObjBase(name), m_idBase(0), m_instance(0) {
|
PassiveComponentBase::PassiveComponentBase(const char* name) : Fw::ObjBase(name), m_idBase(0), m_instance(0) {
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
PassiveComponentBase::PassiveComponentBase() : Fw::ObjBase(), m_idBase(0), m_instance(0) {
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if FW_OBJECT_TO_STRING == 1 && FW_OBJECT_NAMES == 1
|
#if FW_OBJECT_TO_STRING == 1 && FW_OBJECT_NAMES == 1
|
||||||
void PassiveComponentBase::toString(char* buffer, NATIVE_INT_TYPE size) {
|
void PassiveComponentBase::toString(char* buffer, NATIVE_INT_TYPE size) {
|
||||||
|
|||||||
@ -18,11 +18,7 @@ namespace Fw {
|
|||||||
U32 getIdBase(void) const;
|
U32 getIdBase(void) const;
|
||||||
|
|
||||||
PROTECTED:
|
PROTECTED:
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PassiveComponentBase(const char* name); //!< Named constructor
|
PassiveComponentBase(const char* name); //!< Named constructor
|
||||||
#else
|
|
||||||
PassiveComponentBase(); //!< Unnamed constructor
|
|
||||||
#endif
|
|
||||||
virtual ~PassiveComponentBase(); //!< Destructor
|
virtual ~PassiveComponentBase(); //!< Destructor
|
||||||
void init(NATIVE_INT_TYPE instance); //!< Initialization function
|
void init(NATIVE_INT_TYPE instance); //!< Initialization function
|
||||||
NATIVE_INT_TYPE getInstance(void) const;
|
NATIVE_INT_TYPE getInstance(void) const;
|
||||||
|
|||||||
@ -7,15 +7,10 @@
|
|||||||
|
|
||||||
namespace Fw {
|
namespace Fw {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES
|
|
||||||
QueuedComponentBase::QueuedComponentBase(const char* name) : PassiveComponentBase(name),m_msgsDropped(0) {
|
QueuedComponentBase::QueuedComponentBase(const char* name) : PassiveComponentBase(name),m_msgsDropped(0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
QueuedComponentBase::QueuedComponentBase() : PassiveComponentBase(),m_msgsDropped(0) {
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
QueuedComponentBase::~QueuedComponentBase() {
|
QueuedComponentBase::~QueuedComponentBase() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,12 +30,7 @@ namespace Fw {
|
|||||||
} MsgDispatchStatus;
|
} MsgDispatchStatus;
|
||||||
|
|
||||||
PROTECTED:
|
PROTECTED:
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
QueuedComponentBase(const char* name); //!< Constructor
|
QueuedComponentBase(const char* name); //!< Constructor
|
||||||
#else
|
|
||||||
QueuedComponentBase(); //!< Constructor
|
|
||||||
#endif
|
|
||||||
virtual ~QueuedComponentBase(); //!< Destructor
|
virtual ~QueuedComponentBase(); //!< Destructor
|
||||||
void init(NATIVE_INT_TYPE instance); //!< initialization function
|
void init(NATIVE_INT_TYPE instance); //!< initialization function
|
||||||
Os::Queue m_queue; //!< queue object for active component
|
Os::Queue m_queue; //!< queue object for active component
|
||||||
|
|||||||
@ -9,7 +9,7 @@ namespace Fw {
|
|||||||
ObjRegistry* ObjBase::s_objRegistry = 0;
|
ObjRegistry* ObjBase::s_objRegistry = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES
|
#if FW_OBJECT_NAMES == 1
|
||||||
ObjBase::ObjBase(const char* objName) {
|
ObjBase::ObjBase(const char* objName) {
|
||||||
if (0 == objName) {
|
if (0 == objName) {
|
||||||
this->setObjName("NoName");
|
this->setObjName("NoName");
|
||||||
@ -18,11 +18,10 @@ namespace Fw {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
ObjBase::ObjBase(const char* objName) {
|
||||||
ObjBase::ObjBase() {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ObjBase::init(void) {
|
void ObjBase::init(void) {
|
||||||
#if FW_OBJECT_REGISTRATION
|
#if FW_OBJECT_REGISTRATION
|
||||||
|
|||||||
@ -32,7 +32,6 @@ namespace Fw {
|
|||||||
|
|
||||||
class ObjBase {
|
class ObjBase {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
#if FW_OBJECT_NAMES == 1
|
||||||
|
|
||||||
//! \brief Returns the object's name
|
//! \brief Returns the object's name
|
||||||
@ -63,6 +62,7 @@ namespace Fw {
|
|||||||
virtual void toString(char* str, NATIVE_INT_TYPE size); //!< virtual method to get description of object
|
virtual void toString(char* str, NATIVE_INT_TYPE size); //!< virtual method to get description of object
|
||||||
#endif // FW_OBJECT_TO_STRING
|
#endif // FW_OBJECT_TO_STRING
|
||||||
#endif // FW_OBJECT_NAMES
|
#endif // FW_OBJECT_NAMES
|
||||||
|
|
||||||
#if FW_OBJECT_REGISTRATION == 1
|
#if FW_OBJECT_REGISTRATION == 1
|
||||||
|
|
||||||
//! \brief static function to set object registry.
|
//! \brief static function to set object registry.
|
||||||
@ -81,7 +81,8 @@ namespace Fw {
|
|||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
#if FW_OBJECT_NAMES == 1
|
||||||
char m_objName[FW_OBJ_NAME_MAX_SIZE]; //!< stores object name
|
char m_objName[FW_OBJ_NAME_MAX_SIZE]; //!< stores object name
|
||||||
|
#endif
|
||||||
|
|
||||||
//! \brief ObjBase constructor
|
//! \brief ObjBase constructor
|
||||||
//!
|
//!
|
||||||
//! The constructor for the base class. Protected so it will only be called
|
//! The constructor for the base class. Protected so it will only be called
|
||||||
@ -89,9 +90,6 @@ namespace Fw {
|
|||||||
//!
|
//!
|
||||||
//! \param name Object name
|
//! \param name Object name
|
||||||
ObjBase(const char* name);
|
ObjBase(const char* name);
|
||||||
#else
|
|
||||||
ObjBase(); // !< Constructor with no name
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! \brief Destructor
|
//! \brief Destructor
|
||||||
//!
|
//!
|
||||||
|
|||||||
@ -16,7 +16,6 @@ namespace Fw {
|
|||||||
|
|
||||||
namespace Fw {
|
namespace Fw {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PortBase::PortBase()
|
PortBase::PortBase()
|
||||||
:
|
:
|
||||||
Fw::ObjBase(0),
|
Fw::ObjBase(0),
|
||||||
@ -28,19 +27,6 @@ namespace Fw {
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
#else // no object names
|
|
||||||
PortBase::PortBase()
|
|
||||||
:
|
|
||||||
Fw::ObjBase(),
|
|
||||||
m_connObj(0)
|
|
||||||
#if FW_PORT_TRACING == 1
|
|
||||||
,m_trace(false),
|
|
||||||
m_override_trace(false)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PortBase::~PortBase(void) {
|
PortBase::~PortBase(void) {
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@ namespace Os {
|
|||||||
NATIVE_INT_TYPE getQueueSize(void) const; //!< get the queue depth (maximum number of messages queue can hold)
|
NATIVE_INT_TYPE getQueueSize(void) const; //!< get the queue depth (maximum number of messages queue can hold)
|
||||||
NATIVE_INT_TYPE getMsgSize(void) const; //!< get the message size (maximum message size queue can hold)
|
NATIVE_INT_TYPE getMsgSize(void) const; //!< get the message size (maximum message size queue can hold)
|
||||||
const QueueString& getName(void); //!< get the queue name
|
const QueueString& getName(void); //!< get the queue name
|
||||||
NATIVE_INT_TYPE getNumQueues(void); //!< get the number of queues in the system
|
static NATIVE_INT_TYPE getNumQueues(void); //!< get the number of queues in the system
|
||||||
#if FW_QUEUE_REGISTRATION
|
#if FW_QUEUE_REGISTRATION
|
||||||
static void setQueueRegistry(QueueRegistry* reg); // !< set the queue registry
|
static void setQueueRegistry(QueueRegistry* reg); // !< set the queue registry
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -20,16 +20,10 @@ namespace Ref {
|
|||||||
// Construction, initialization, and destruction
|
// Construction, initialization, and destruction
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
PingReceiverComponentImpl ::
|
PingReceiverComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PingReceiverComponentImpl(
|
PingReceiverComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : PingReceiverComponentBase(compName), m_inhibitPings(false), m_pingsRecvd(0)
|
||||||
PingReceiverComponentBase(compName)
|
|
||||||
#else
|
|
||||||
PingReceiverImpl(void)
|
|
||||||
#endif
|
|
||||||
,m_inhibitPings(false),m_pingsRecvd(0)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,11 +30,7 @@ namespace Ref {
|
|||||||
//! Construct object PingReceiver
|
//! Construct object PingReceiver
|
||||||
//!
|
//!
|
||||||
PingReceiverComponentImpl(
|
PingReceiverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object PingReceiver
|
//! Initialize object PingReceiver
|
||||||
|
|||||||
@ -9,12 +9,8 @@
|
|||||||
|
|
||||||
namespace Ref {
|
namespace Ref {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
RecvBuffImpl::RecvBuffImpl(const char* compName) :
|
RecvBuffImpl::RecvBuffImpl(const char* compName) :
|
||||||
RecvBuffComponentBase(compName) {
|
RecvBuffComponentBase(compName) {
|
||||||
#else
|
|
||||||
RecvBuffImpl::RecvBuffImpl() {
|
|
||||||
#endif
|
|
||||||
this->m_firstBuffReceived = 0;
|
this->m_firstBuffReceived = 0;
|
||||||
this->m_sensor1 = 1000.0;
|
this->m_sensor1 = 1000.0;
|
||||||
this->m_sensor2 = 10.0;
|
this->m_sensor2 = 10.0;
|
||||||
|
|||||||
@ -9,11 +9,7 @@ namespace Ref {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Only called by derived class
|
// Only called by derived class
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
RecvBuffImpl(const char* compName);
|
RecvBuffImpl(const char* compName);
|
||||||
#else
|
|
||||||
RecvBuffImpl();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void init(void);
|
void init(void);
|
||||||
~RecvBuffImpl(void);
|
~RecvBuffImpl(void);
|
||||||
|
|||||||
@ -10,13 +10,8 @@
|
|||||||
|
|
||||||
namespace Ref {
|
namespace Ref {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
SendBuffImpl::SendBuffImpl(const char* compName) :
|
SendBuffImpl::SendBuffImpl(const char* compName) :
|
||||||
SendBuffComponentBase(compName) {
|
SendBuffComponentBase(compName) {
|
||||||
#else
|
|
||||||
SendBuffImpl::SendBuffImpl() {
|
|
||||||
|
|
||||||
#endif
|
|
||||||
this->m_currPacketId = 0;
|
this->m_currPacketId = 0;
|
||||||
this->m_invocations = 0;
|
this->m_invocations = 0;
|
||||||
this->m_buffsSent = 0;
|
this->m_buffsSent = 0;
|
||||||
|
|||||||
@ -11,11 +11,7 @@ namespace Ref {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Only called by derived class
|
// Only called by derived class
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
SendBuffImpl(const char* compName); //!< constructor
|
SendBuffImpl(const char* compName); //!< constructor
|
||||||
#else
|
|
||||||
SendBuffImpl(); //!< constructor
|
|
||||||
#endif
|
|
||||||
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance = 0); //!< initialization function
|
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance = 0); //!< initialization function
|
||||||
~SendBuffImpl(void); //!< destructor
|
~SendBuffImpl(void); //!< destructor
|
||||||
|
|
||||||
|
|||||||
@ -24,13 +24,8 @@ namespace Ref {
|
|||||||
|
|
||||||
Tester ::
|
Tester ::
|
||||||
Tester(void) :
|
Tester(void) :
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
SignalGenGTestBase("Tester", MAX_HISTORY_SIZE),
|
SignalGenGTestBase("Tester", MAX_HISTORY_SIZE),
|
||||||
component("SignalGen")
|
component("SignalGen")
|
||||||
#else
|
|
||||||
SignalGenGTestBase(MAX_HISTORY_SIZE),
|
|
||||||
component()
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
this->initComponents();
|
this->initComponents();
|
||||||
this->connectPorts();
|
this->connectPorts();
|
||||||
|
|||||||
@ -30,75 +30,83 @@ static Fw::SimpleObjRegistry simpleReg;
|
|||||||
|
|
||||||
// Component instance pointers
|
// Component instance pointers
|
||||||
static NATIVE_INT_TYPE rgDivs[Svc::RateGroupDriverImpl::DIVIDER_SIZE] = {1,2,4};
|
static NATIVE_INT_TYPE rgDivs[Svc::RateGroupDriverImpl::DIVIDER_SIZE] = {1,2,4};
|
||||||
Svc::RateGroupDriverImpl rateGroupDriverComp("RGDvr",rgDivs,FW_NUM_ARRAY_ELEMENTS(rgDivs));
|
Svc::RateGroupDriverImpl rateGroupDriverComp(FW_OPTIONAL_NAME("RGDvr"),rgDivs,FW_NUM_ARRAY_ELEMENTS(rgDivs));
|
||||||
|
|
||||||
static NATIVE_UINT_TYPE rg1Context[] = {0,0,0,0,0,0,0,0,0,0};
|
static NATIVE_UINT_TYPE rg1Context[] = {0,0,0,0,0,0,0,0,0,0};
|
||||||
Svc::ActiveRateGroupImpl rateGroup1Comp("RG1",rg1Context,FW_NUM_ARRAY_ELEMENTS(rg1Context));
|
Svc::ActiveRateGroupImpl rateGroup1Comp(FW_OPTIONAL_NAME("RG1"),rg1Context,FW_NUM_ARRAY_ELEMENTS(rg1Context));
|
||||||
|
|
||||||
static NATIVE_UINT_TYPE rg2Context[] = {0,0,0,0,0,0,0,0,0,0};
|
static NATIVE_UINT_TYPE rg2Context[] = {0,0,0,0,0,0,0,0,0,0};
|
||||||
Svc::ActiveRateGroupImpl rateGroup2Comp("RG2",rg2Context,FW_NUM_ARRAY_ELEMENTS(rg2Context));
|
Svc::ActiveRateGroupImpl rateGroup2Comp(FW_OPTIONAL_NAME("RG2"),rg2Context,FW_NUM_ARRAY_ELEMENTS(rg2Context));
|
||||||
|
|
||||||
static NATIVE_UINT_TYPE rg3Context[] = {0,0,0,0,0,0,0,0,0,0};
|
static NATIVE_UINT_TYPE rg3Context[] = {0,0,0,0,0,0,0,0,0,0};
|
||||||
Svc::ActiveRateGroupImpl rateGroup3Comp("RG3",rg3Context,FW_NUM_ARRAY_ELEMENTS(rg3Context));
|
Svc::ActiveRateGroupImpl rateGroup3Comp(FW_OPTIONAL_NAME("RG3"),rg3Context,FW_NUM_ARRAY_ELEMENTS(rg3Context));
|
||||||
|
|
||||||
// Command Components
|
// Command Components
|
||||||
Svc::GroundInterfaceComponentImpl groundIf("GNDIF");
|
Svc::GroundInterfaceComponentImpl groundIf(FW_OPTIONAL_NAME("GNDIF"));
|
||||||
|
|
||||||
// Driver Component
|
// Driver Component
|
||||||
Drv::BlockDriverImpl blockDrv("BDRV");
|
Drv::BlockDriverImpl blockDrv(FW_OPTIONAL_NAME("BDRV"));
|
||||||
|
|
||||||
// Reference Implementation Components
|
// Reference Implementation Components
|
||||||
|
|
||||||
Ref::RecvBuffImpl recvBuffComp("RBC");
|
Ref::RecvBuffImpl recvBuffComp(FW_OPTIONAL_NAME("RBC"));
|
||||||
|
|
||||||
Ref::SendBuffImpl sendBuffComp("SBC");
|
Ref::SendBuffImpl sendBuffComp(FW_OPTIONAL_NAME("SBC"));
|
||||||
|
|
||||||
#if FW_ENABLE_TEXT_LOGGING
|
#if FW_ENABLE_TEXT_LOGGING
|
||||||
Svc::ConsoleTextLoggerImpl textLogger("TLOG");
|
Svc::ConsoleTextLoggerImpl textLogger(FW_OPTIONAL_NAME("TLOG"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Svc::ActiveLoggerImpl eventLogger("ELOG");
|
Svc::ActiveLoggerImpl eventLogger(FW_OPTIONAL_NAME("ELOG"));
|
||||||
|
|
||||||
Svc::LinuxTimeImpl linuxTime("LTIME");
|
Svc::LinuxTimeImpl linuxTime(FW_OPTIONAL_NAME("LTIME"));
|
||||||
|
|
||||||
Svc::TlmChanImpl chanTlm("TLM");
|
Svc::TlmChanImpl chanTlm(FW_OPTIONAL_NAME("TLM"));
|
||||||
|
|
||||||
Svc::CommandDispatcherImpl cmdDisp("CMDDISP");
|
Svc::CommandDispatcherImpl cmdDisp(FW_OPTIONAL_NAME("CMDDISP"));
|
||||||
|
|
||||||
Fw::MallocAllocator seqMallocator;
|
Fw::MallocAllocator seqMallocator;
|
||||||
Svc::CmdSequencerComponentImpl cmdSeq("CMDSEQ");
|
Svc::CmdSequencerComponentImpl cmdSeq(FW_OPTIONAL_NAME("CMDSEQ"));
|
||||||
|
|
||||||
Svc::PrmDbImpl prmDb("PRM","PrmDb.dat");
|
Svc::PrmDbImpl prmDb(FW_OPTIONAL_NAME("PRM"),"PrmDb.dat");
|
||||||
|
|
||||||
Ref::PingReceiverComponentImpl pingRcvr("PngRecv");
|
Ref::PingReceiverComponentImpl pingRcvr(FW_OPTIONAL_NAME("PngRecv"));
|
||||||
|
|
||||||
Drv::SocketIpDriverComponentImpl socketIpDriver("SocketIpDriver");
|
Drv::SocketIpDriverComponentImpl socketIpDriver(FW_OPTIONAL_NAME("SocketIpDriver"));
|
||||||
|
|
||||||
Svc::FileUplink fileUplink ("fileUplink");
|
Svc::FileUplink fileUplink(FW_OPTIONAL_NAME("fileUplink"));
|
||||||
|
|
||||||
Svc::FileDownlink fileDownlink ("fileDownlink", DOWNLINK_PACKET_SIZE);
|
Svc::FileDownlink fileDownlink(FW_OPTIONAL_NAME("fileDownlink"), DOWNLINK_PACKET_SIZE);
|
||||||
|
|
||||||
Svc::FileManager fileManager ("fileManager");
|
Svc::FileManager fileManager(FW_OPTIONAL_NAME("fileManager"));
|
||||||
|
|
||||||
Svc::BufferManager fileDownlinkBufferManager("fileDownlinkBufferManager", DOWNLINK_BUFFER_STORE_SIZE, DOWNLINK_BUFFER_QUEUE_SIZE);
|
Svc::BufferManager fileDownlinkBufferManager(FW_OPTIONAL_NAME("fileDownlinkBufferManager"), DOWNLINK_BUFFER_STORE_SIZE, DOWNLINK_BUFFER_QUEUE_SIZE);
|
||||||
|
|
||||||
Svc::BufferManager fileUplinkBufferManager("fileUplinkBufferManager", UPLINK_BUFFER_STORE_SIZE, UPLINK_BUFFER_QUEUE_SIZE);
|
Svc::BufferManager fileUplinkBufferManager(FW_OPTIONAL_NAME("fileUplinkBufferManager"), UPLINK_BUFFER_STORE_SIZE, UPLINK_BUFFER_QUEUE_SIZE);
|
||||||
|
|
||||||
Svc::HealthImpl health("health");
|
Svc::HealthImpl health(FW_OPTIONAL_NAME("health"));
|
||||||
|
|
||||||
Ref::SignalGen SG1("signalGen1");
|
Ref::SignalGen SG1(FW_OPTIONAL_NAME("signalGen1"));
|
||||||
|
|
||||||
Ref::SignalGen SG2("signalGen2");
|
Ref::SignalGen SG2(FW_OPTIONAL_NAME("signalGen2"));
|
||||||
|
|
||||||
Ref::SignalGen SG3("signalGen3");
|
Ref::SignalGen SG3(FW_OPTIONAL_NAME("signalGen3"));
|
||||||
|
|
||||||
Ref::SignalGen SG4("signalGen4");
|
Ref::SignalGen SG4(FW_OPTIONAL_NAME("signalGen4"));
|
||||||
|
|
||||||
Ref::SignalGen SG5("signalGen5");
|
Ref::SignalGen SG5(FW_OPTIONAL_NAME("signalGen5"));
|
||||||
|
|
||||||
Svc::AssertFatalAdapterComponentImpl fatalAdapter("fatalAdapter");
|
Svc::AssertFatalAdapterComponentImpl fatalAdapter(FW_OPTIONAL_NAME("fatalAdapter"));
|
||||||
|
|
||||||
Svc::FatalHandlerComponentImpl fatalHandler("fatalHandler");
|
Svc::FatalHandlerComponentImpl fatalHandler(FW_OPTIONAL_NAME("fatalHandler"));
|
||||||
|
|
||||||
|
const char* getHealthName(Fw::ObjBase& comp) {
|
||||||
|
#if FW_OBJECT_NAMES == 1
|
||||||
|
return comp.getObjName();
|
||||||
|
#else
|
||||||
|
return "[no object name]"
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool constructApp(bool dump, U32 port_number, char* hostname) {
|
bool constructApp(bool dump, U32 port_number, char* hostname) {
|
||||||
|
|
||||||
@ -149,14 +157,14 @@ bool constructApp(bool dump, U32 port_number, char* hostname) {
|
|||||||
fileUplinkBufferManager.init(0);
|
fileUplinkBufferManager.init(0);
|
||||||
fileDownlinkBufferManager.init(1);
|
fileDownlinkBufferManager.init(1);
|
||||||
SG1.init(10,0);
|
SG1.init(10,0);
|
||||||
SG2.init(10,1);
|
SG2.init(10,1);
|
||||||
SG3.init(10,2);
|
SG3.init(10,2);
|
||||||
SG4.init(10,3);
|
SG4.init(10,3);
|
||||||
SG5.init(10,4);
|
SG5.init(10,4);
|
||||||
fatalAdapter.init(0);
|
fatalAdapter.init(0);
|
||||||
fatalHandler.init(0);
|
fatalHandler.init(0);
|
||||||
health.init(25,0);
|
health.init(25,0);
|
||||||
pingRcvr.init(10);
|
pingRcvr.init(10);
|
||||||
// Connect rate groups to rate group driver
|
// Connect rate groups to rate group driver
|
||||||
constructRefArchitecture();
|
constructRefArchitecture();
|
||||||
|
|
||||||
@ -193,19 +201,19 @@ bool constructApp(bool dump, U32 port_number, char* hostname) {
|
|||||||
// set health ping entries
|
// set health ping entries
|
||||||
|
|
||||||
Svc::HealthImpl::PingEntry pingEntries[] = {
|
Svc::HealthImpl::PingEntry pingEntries[] = {
|
||||||
{3,5,rateGroup1Comp.getObjName()}, // 0
|
{3,5,getHealthName(rateGroup1Comp)}, // 0
|
||||||
{3,5,rateGroup2Comp.getObjName()}, // 1
|
{3,5,getHealthName(rateGroup2Comp)}, // 1
|
||||||
{3,5,rateGroup3Comp.getObjName()}, // 2
|
{3,5,getHealthName(rateGroup3Comp)}, // 2
|
||||||
{3,5,cmdDisp.getObjName()}, // 3
|
{3,5,getHealthName(cmdDisp)}, // 3
|
||||||
{3,5,eventLogger.getObjName()}, // 4
|
{3,5,getHealthName(eventLogger)}, // 4
|
||||||
{3,5,cmdSeq.getObjName()}, // 5
|
{3,5,getHealthName(cmdSeq)}, // 5
|
||||||
{3,5,chanTlm.getObjName()}, // 6
|
{3,5,getHealthName(chanTlm)}, // 6
|
||||||
{3,5,prmDb.getObjName()}, // 7
|
{3,5,getHealthName(prmDb)}, // 7
|
||||||
{3,5,fileUplink.getObjName()}, // 8
|
{3,5,getHealthName(fileUplink)}, // 8
|
||||||
{3,5,fileDownlink.getObjName()}, // 9
|
{3,5,getHealthName(fileDownlink)}, // 9
|
||||||
{3,5,pingRcvr.getObjName()}, // 10
|
{3,5,getHealthName(pingRcvr)}, // 10
|
||||||
{3,5,blockDrv.getObjName()}, // 11
|
{3,5,getHealthName(blockDrv)}, // 11
|
||||||
{3,5,fileManager.getObjName()}, // 12
|
{3,5,getHealthName(fileManager)}, // 12
|
||||||
};
|
};
|
||||||
|
|
||||||
// register ping table
|
// register ping table
|
||||||
|
|||||||
@ -11,19 +11,15 @@
|
|||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
ActiveLoggerImpl::ActiveLoggerImpl(const char* name) :
|
||||||
ActiveLoggerImpl::ActiveLoggerImpl(const char* name) : ActiveLoggerComponentBase(name)
|
ActiveLoggerComponentBase(name),
|
||||||
#else
|
m_fatalHead(0),
|
||||||
ActiveLoggerImpl::ActiveLoggerImpl() :
|
m_warningHiHead(0),
|
||||||
ActiveLoggerComponentBase()
|
m_warningLoHead(0),
|
||||||
#endif
|
m_commandHead(0),
|
||||||
,m_fatalHead(0)
|
m_activityHiHead(0),
|
||||||
,m_warningHiHead(0)
|
m_activityLoHead(0),
|
||||||
,m_warningLoHead(0)
|
m_diagnosticHead(0)
|
||||||
,m_commandHead(0)
|
|
||||||
,m_activityHiHead(0)
|
|
||||||
,m_activityLoHead(0)
|
|
||||||
,m_diagnosticHead(0)
|
|
||||||
{
|
{
|
||||||
// set input filter defaults
|
// set input filter defaults
|
||||||
this->m_inFilterState[INPUT_WARNING_HI].enabled =
|
this->m_inFilterState[INPUT_WARNING_HI].enabled =
|
||||||
|
|||||||
@ -16,11 +16,7 @@ namespace Svc {
|
|||||||
|
|
||||||
class ActiveLoggerImpl: public ActiveLoggerComponentBase {
|
class ActiveLoggerImpl: public ActiveLoggerComponentBase {
|
||||||
public:
|
public:
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ActiveLoggerImpl(const char* compName); //!< constructor
|
ActiveLoggerImpl(const char* compName); //!< constructor
|
||||||
#else
|
|
||||||
ActiveLoggerImpl(); //!< constructor
|
|
||||||
#endif
|
|
||||||
virtual ~ActiveLoggerImpl(); //!< destructor
|
virtual ~ActiveLoggerImpl(); //!< destructor
|
||||||
void init(
|
void init(
|
||||||
NATIVE_INT_TYPE queueDepth, /*!< The queue depth*/
|
NATIVE_INT_TYPE queueDepth, /*!< The queue depth*/
|
||||||
|
|||||||
@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ActiveRateGroupImpl::ActiveRateGroupImpl(const char* compName, NATIVE_UINT_TYPE contexts[], NATIVE_UINT_TYPE numContexts) :
|
ActiveRateGroupImpl::ActiveRateGroupImpl(const char* compName, NATIVE_UINT_TYPE contexts[], NATIVE_UINT_TYPE numContexts) :
|
||||||
ActiveRateGroupComponentBase(compName),
|
ActiveRateGroupComponentBase(compName),
|
||||||
#else
|
m_cycles(0),
|
||||||
ActiveRateGroupImpl::ActiveRateGroupImpl(NATIVE_UINT_TYPE contexts[], NATIVE_UINT_TYPE numContexts) :
|
m_maxTime(0),
|
||||||
#endif
|
m_cycleStarted(false),
|
||||||
m_cycles(0), m_maxTime(0),m_cycleStarted(false),m_overrunThrottle(0),m_cycleSlips(0) {
|
m_overrunThrottle(0),
|
||||||
|
m_cycleSlips(0) {
|
||||||
FW_ASSERT(contexts);
|
FW_ASSERT(contexts);
|
||||||
FW_ASSERT(numContexts == static_cast<NATIVE_UINT_TYPE>(this->getNum_RateGroupMemberOut_OutputPorts()),numContexts,this->getNum_RateGroupMemberOut_OutputPorts());
|
FW_ASSERT(numContexts == static_cast<NATIVE_UINT_TYPE>(this->getNum_RateGroupMemberOut_OutputPorts()),numContexts,this->getNum_RateGroupMemberOut_OutputPorts());
|
||||||
FW_ASSERT(FW_NUM_ARRAY_ELEMENTS(this->m_contexts) == this->getNum_RateGroupMemberOut_OutputPorts(),
|
FW_ASSERT(FW_NUM_ARRAY_ELEMENTS(this->m_contexts) == this->getNum_RateGroupMemberOut_OutputPorts(),
|
||||||
|
|||||||
@ -41,13 +41,8 @@ namespace Svc {
|
|||||||
//! to each member component. The index of the array corresponds to the
|
//! to each member component. The index of the array corresponds to the
|
||||||
//! output port number.
|
//! output port number.
|
||||||
//! \param numContexts The number of elements in the context array.
|
//! \param numContexts The number of elements in the context array.
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ActiveRateGroupImpl(const char* compName, NATIVE_UINT_TYPE contexts[], NATIVE_UINT_TYPE numContexts);
|
ActiveRateGroupImpl(const char* compName, NATIVE_UINT_TYPE contexts[], NATIVE_UINT_TYPE numContexts);
|
||||||
#else
|
|
||||||
ActiveRateGroupImpl(NATIVE_UINT_TYPE contexts[], NATIVE_UINT_TYPE numContexts);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! \brief ActiveRateGroupImpl initialization function
|
//! \brief ActiveRateGroupImpl initialization function
|
||||||
//!
|
//!
|
||||||
//! The initialization function of the class initializes the member
|
//! The initialization function of the class initializes the member
|
||||||
|
|||||||
@ -13,13 +13,8 @@ namespace Svc {
|
|||||||
// Initialization/Exiting
|
// Initialization/Exiting
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ActiveTextLoggerComponentImpl::ActiveTextLoggerComponentImpl(const char* name) :
|
ActiveTextLoggerComponentImpl::ActiveTextLoggerComponentImpl(const char* name) :
|
||||||
ActiveTextLoggerComponentBase(name),
|
ActiveTextLoggerComponentBase(name),
|
||||||
#else
|
|
||||||
ActiveTextLoggerComponentImpl::ActiveTextLoggerComponentImpl() :
|
|
||||||
ActiveTextLoggerComponentBase(),
|
|
||||||
#endif
|
|
||||||
m_log_file()
|
m_log_file()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -33,11 +33,7 @@ namespace Svc {
|
|||||||
//! type conversion.
|
//! type conversion.
|
||||||
//!
|
//!
|
||||||
//! \param compName the component instance name
|
//! \param compName the component instance name
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
explicit ActiveTextLoggerComponentImpl(const char* compName);
|
explicit ActiveTextLoggerComponentImpl(const char* compName);
|
||||||
#else
|
|
||||||
ActiveTextLoggerComponentImpl();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! \brief Component destructor
|
//! \brief Component destructor
|
||||||
//!
|
//!
|
||||||
|
|||||||
@ -43,14 +43,9 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
AssertFatalAdapterComponentImpl ::
|
AssertFatalAdapterComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
AssertFatalAdapterComponentImpl(
|
AssertFatalAdapterComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : AssertFatalAdapterComponentBase(compName)
|
||||||
AssertFatalAdapterComponentBase(compName)
|
|
||||||
#else
|
|
||||||
AssertFatalAdapterImpl(void)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// register component with adapter
|
// register component with adapter
|
||||||
this->m_adapter.regAssertReporter(this);
|
this->m_adapter.regAssertReporter(this);
|
||||||
|
|||||||
@ -30,11 +30,7 @@ namespace Svc {
|
|||||||
//! Construct object AssertFatalAdapter
|
//! Construct object AssertFatalAdapter
|
||||||
//!
|
//!
|
||||||
AssertFatalAdapterComponentImpl(
|
AssertFatalAdapterComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object AssertFatalAdapter
|
//! Initialize object AssertFatalAdapter
|
||||||
|
|||||||
@ -20,18 +20,14 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
BufferAccumulator ::
|
BufferAccumulator ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
BufferAccumulator(const char *const compName) :
|
BufferAccumulator(const char *const compName) :
|
||||||
BufferAccumulatorComponentBase(compName), //!< The component name
|
BufferAccumulatorComponentBase(compName),
|
||||||
#else
|
mode(DRAIN),
|
||||||
BufferAccumulator() : BufferAccumulatorComponentBase(),
|
bufferMemory(NULL),
|
||||||
#endif
|
bufferQueue(),
|
||||||
mode(DRAIN),
|
send(true),
|
||||||
bufferMemory(NULL),
|
numWarnings(0),
|
||||||
bufferQueue(),
|
allocatorId(0)
|
||||||
send(true),
|
|
||||||
numWarnings(0),
|
|
||||||
allocatorId(0)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,9 +95,7 @@ namespace Svc {
|
|||||||
//! Construct BufferAccumulator instance
|
//! Construct BufferAccumulator instance
|
||||||
//!
|
//!
|
||||||
BufferAccumulator(
|
BufferAccumulator(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize BufferAccumulator instance
|
//! Initialize BufferAccumulator instance
|
||||||
|
|||||||
@ -19,14 +19,10 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
BufferLogger ::
|
BufferLogger ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
BufferLogger(const char *const compName) :
|
BufferLogger(const char *const compName) :
|
||||||
BufferLoggerComponentBase(compName), //!< The component name
|
BufferLoggerComponentBase(compName),
|
||||||
#else
|
m_state(LOGGING_ON),
|
||||||
BufferLogger() : BufferLoggerComponentBase(),
|
m_file(*this)
|
||||||
#endif
|
|
||||||
m_state(LOGGING_ON),
|
|
||||||
m_file(*this)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,9 +158,7 @@ namespace Svc {
|
|||||||
|
|
||||||
//! Create a BufferLogger object
|
//! Create a BufferLogger object
|
||||||
BufferLogger(
|
BufferLogger(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize a BufferLogger object
|
//! Initialize a BufferLogger object
|
||||||
|
|||||||
@ -11,13 +11,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
CommandDispatcherImpl::CommandDispatcherImpl(const char* name) :
|
CommandDispatcherImpl::CommandDispatcherImpl(const char* name) :
|
||||||
CommandDispatcherComponentBase(name),
|
CommandDispatcherComponentBase(name),
|
||||||
#else
|
m_seq(0),
|
||||||
CommandDispatcherImpl::CommandDispatcherImpl() :
|
m_numCmdsDispatched(0),
|
||||||
#endif
|
m_numCmdErrors(0)
|
||||||
m_seq(0), m_numCmdsDispatched(0), m_numCmdErrors(0)
|
|
||||||
{
|
{
|
||||||
memset(this->m_entryTable,0,sizeof(this->m_entryTable));
|
memset(this->m_entryTable,0,sizeof(this->m_entryTable));
|
||||||
memset(this->m_sequenceTracker,0,sizeof(this->m_sequenceTracker));
|
memset(this->m_sequenceTracker,0,sizeof(this->m_sequenceTracker));
|
||||||
|
|||||||
@ -38,11 +38,7 @@ namespace Svc {
|
|||||||
//! are initialized.
|
//! are initialized.
|
||||||
//!
|
//!
|
||||||
//! \param name the component instance name
|
//! \param name the component instance name
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
CommandDispatcherImpl(const char* name);
|
CommandDispatcherImpl(const char* name);
|
||||||
#else
|
|
||||||
CommandDispatcherImpl();
|
|
||||||
#endif
|
|
||||||
//! \brief Component initialization routine
|
//! \brief Component initialization routine
|
||||||
//!
|
//!
|
||||||
//! The initialization function calls the initialization
|
//! The initialization function calls the initialization
|
||||||
|
|||||||
@ -26,13 +26,8 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
CmdSequencerComponentImpl::
|
CmdSequencerComponentImpl::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
CmdSequencerComponentImpl(const char* name) :
|
CmdSequencerComponentImpl(const char* name) :
|
||||||
CmdSequencerComponentBase(name),
|
CmdSequencerComponentBase(name),
|
||||||
#else
|
|
||||||
CmdSequencerComponentImpl(void) :
|
|
||||||
CmdSequencerComponentBase(),
|
|
||||||
#endif
|
|
||||||
m_FPrimeSequence(*this),
|
m_FPrimeSequence(*this),
|
||||||
m_sequence(&this->m_FPrimeSequence),
|
m_sequence(&this->m_FPrimeSequence),
|
||||||
m_loadCmdCount(0),
|
m_loadCmdCount(0),
|
||||||
|
|||||||
@ -539,11 +539,7 @@ namespace Svc {
|
|||||||
|
|
||||||
//! Construct a CmdSequencer
|
//! Construct a CmdSequencer
|
||||||
CmdSequencerComponentImpl(
|
CmdSequencerComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char* compName //!< The component name
|
const char* compName //!< The component name
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize a CmdSequencer
|
//! Initialize a CmdSequencer
|
||||||
|
|||||||
@ -17,18 +17,14 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
ComLogger ::
|
ComLogger ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ComLogger(const char* compName, const char* incomingFilePrefix, U32 maxFileSize, bool storeBufferLength) :
|
ComLogger(const char* compName, const char* incomingFilePrefix, U32 maxFileSize, bool storeBufferLength) :
|
||||||
ComLoggerComponentBase(compName),
|
ComLoggerComponentBase(compName),
|
||||||
#else
|
maxFileSize(maxFileSize),
|
||||||
ComLogger(const char* incomingFilePrefix, U32 maxFileSize, bool storeBufferLength) :
|
fileMode(CLOSED),
|
||||||
#endif
|
byteCount(0),
|
||||||
maxFileSize(maxFileSize),
|
writeErrorOccured(false),
|
||||||
fileMode(CLOSED),
|
openErrorOccured(false),
|
||||||
byteCount(0),
|
storeBufferLength(storeBufferLength)
|
||||||
writeErrorOccured(false),
|
|
||||||
openErrorOccured(false),
|
|
||||||
storeBufferLength(storeBufferLength)
|
|
||||||
{
|
{
|
||||||
if( this->storeBufferLength ) {
|
if( this->storeBufferLength ) {
|
||||||
FW_ASSERT(maxFileSize > sizeof(U16), maxFileSize); // must be a positive integer greater than buffer length size
|
FW_ASSERT(maxFileSize > sizeof(U16), maxFileSize); // must be a positive integer greater than buffer length size
|
||||||
|
|||||||
@ -36,11 +36,7 @@ namespace Svc {
|
|||||||
// where you can ensure that all buffers given to the ComLogger are the same size
|
// where you can ensure that all buffers given to the ComLogger are the same size
|
||||||
// in which case you do not need the overhead. Or you store an id which you can
|
// in which case you do not need the overhead. Or you store an id which you can
|
||||||
// match to an expected size on the ground during post processing.
|
// match to an expected size on the ground during post processing.
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ComLogger(const char* compName, const char* filePrefix, U32 maxFileSize, bool storeBufferLength=true);
|
ComLogger(const char* compName, const char* filePrefix, U32 maxFileSize, bool storeBufferLength=true);
|
||||||
#else
|
|
||||||
ComLogger(const char* filePrefix, U32 maxFileSize, bool storeBufferLength=true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void init(
|
void init(
|
||||||
NATIVE_INT_TYPE queueDepth, //!< The queue depth
|
NATIVE_INT_TYPE queueDepth, //!< The queue depth
|
||||||
|
|||||||
@ -14,12 +14,8 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
ComSplitter ::
|
ComSplitter ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ComSplitter(const char* compName) :
|
ComSplitter(const char* compName) :
|
||||||
ComSplitterComponentBase(compName)
|
ComSplitterComponentBase(compName)
|
||||||
#else
|
|
||||||
ComSplitter(void)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,11 +28,7 @@ namespace Svc {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ComSplitter(const char* compName);
|
ComSplitter(const char* compName);
|
||||||
#else
|
|
||||||
ComSplitter(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
~ComSplitter(void);
|
~ComSplitter(void);
|
||||||
|
|
||||||
|
|||||||
@ -21,14 +21,9 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
FatalHandlerComponentImpl ::
|
FatalHandlerComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
FatalHandlerComponentImpl(
|
FatalHandlerComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : FatalHandlerComponentBase(compName)
|
||||||
FatalHandlerComponentBase(compName)
|
|
||||||
#else
|
|
||||||
FatalHandlerImpl(void)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,11 +30,7 @@ namespace Svc {
|
|||||||
//! Construct object FatalHandler
|
//! Construct object FatalHandler
|
||||||
//!
|
//!
|
||||||
FatalHandlerComponentImpl(
|
FatalHandlerComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object FatalHandler
|
//! Initialize object FatalHandler
|
||||||
|
|||||||
@ -20,17 +20,12 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
GroundInterfaceComponentImpl ::
|
GroundInterfaceComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
GroundInterfaceComponentImpl(
|
GroundInterfaceComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : GroundInterfaceComponentBase(compName),
|
||||||
GroundInterfaceComponentBase(compName),
|
m_ext_buffer(0xfeedfeed, 0xdeeddeed, reinterpret_cast<POINTER_CAST>(m_buffer), GND_BUFFER_SIZE),
|
||||||
#else
|
m_data_size(0),
|
||||||
GroundInterfaceComponentBase(void),
|
m_in_ring(m_in_buffer, GND_BUFFER_SIZE)
|
||||||
#endif
|
|
||||||
m_ext_buffer(0xfeedfeed, 0xdeeddeed, reinterpret_cast<POINTER_CAST>(m_buffer), GND_BUFFER_SIZE),
|
|
||||||
m_data_size(0),
|
|
||||||
m_in_ring(m_in_buffer, GND_BUFFER_SIZE)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,11 +29,7 @@ namespace Svc {
|
|||||||
//! Construct object GroundInterface
|
//! Construct object GroundInterface
|
||||||
//!
|
//!
|
||||||
GroundInterfaceComponentImpl(
|
GroundInterfaceComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object GroundInterface
|
//! Initialize object GroundInterface
|
||||||
|
|||||||
@ -20,20 +20,14 @@ namespace Svc {
|
|||||||
// Construction, initialization, and destruction
|
// Construction, initialization, and destruction
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
HealthImpl::HealthImpl(
|
HealthImpl::HealthImpl(const char * const compName) :
|
||||||
#if FW_OBJECT_NAMES == 1
|
HealthComponentBase(compName),
|
||||||
const char * const compName
|
m_numPingEntries(0),
|
||||||
#endif
|
m_key(0),
|
||||||
) :
|
m_watchDogCode(0),
|
||||||
#if FW_OBJECT_NAMES == 1
|
m_warnings(0),
|
||||||
HealthComponentBase(compName),
|
m_enabled(HLTH_CHK_ENABLED),
|
||||||
#endif
|
queue_depth(0) {
|
||||||
m_numPingEntries(0),
|
|
||||||
m_key(0),
|
|
||||||
m_watchDogCode(0),
|
|
||||||
m_warnings(0),
|
|
||||||
m_enabled(HLTH_CHK_ENABLED),
|
|
||||||
queue_depth(0) {
|
|
||||||
// clear tracker by disabling pings
|
// clear tracker by disabling pings
|
||||||
for (NATIVE_UINT_TYPE entry = 0;
|
for (NATIVE_UINT_TYPE entry = 0;
|
||||||
entry < FW_NUM_ARRAY_ELEMENTS(this->m_pingTrackerEntries);
|
entry < FW_NUM_ARRAY_ELEMENTS(this->m_pingTrackerEntries);
|
||||||
|
|||||||
@ -53,11 +53,7 @@ namespace Svc {
|
|||||||
//! The constructor for Health
|
//! The constructor for Health
|
||||||
//!
|
//!
|
||||||
//! \param compName component name
|
//! \param compName component name
|
||||||
HealthImpl(
|
HealthImpl(const char * const compName);
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char * const compName //!< The component name
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
|
|
||||||
//! \brief HealthImpl initialization function
|
//! \brief HealthImpl initialization function
|
||||||
//!
|
//!
|
||||||
|
|||||||
@ -11,11 +11,7 @@
|
|||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxTimeImpl::LinuxTimeImpl(const char* name) : TimeComponentBase(name)
|
LinuxTimeImpl::LinuxTimeImpl(const char* name) : TimeComponentBase(name)
|
||||||
#else
|
|
||||||
LinuxTimeImpl::LinuxTimeImpl()
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,11 +14,7 @@ namespace Svc {
|
|||||||
|
|
||||||
class LinuxTimeImpl: public TimeComponentBase {
|
class LinuxTimeImpl: public TimeComponentBase {
|
||||||
public:
|
public:
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxTimeImpl(const char* compName);
|
LinuxTimeImpl(const char* compName);
|
||||||
#else
|
|
||||||
LinuxTimeImpl();
|
|
||||||
#endif
|
|
||||||
virtual ~LinuxTimeImpl();
|
virtual ~LinuxTimeImpl();
|
||||||
void init(NATIVE_INT_TYPE instance);
|
void init(NATIVE_INT_TYPE instance);
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -30,11 +30,7 @@ namespace Svc {
|
|||||||
//! Construct object LinuxTimer
|
//! Construct object LinuxTimer
|
||||||
//!
|
//!
|
||||||
LinuxTimerComponentImpl(
|
LinuxTimerComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object LinuxTimer
|
//! Initialize object LinuxTimer
|
||||||
|
|||||||
@ -21,15 +21,10 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
LinuxTimerComponentImpl ::
|
LinuxTimerComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
LinuxTimerComponentImpl(
|
LinuxTimerComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : LinuxTimerComponentBase(compName),
|
||||||
LinuxTimerComponentBase(compName)
|
m_quit(false)
|
||||||
#else
|
|
||||||
LinuxTimerImpl(void)
|
|
||||||
#endif
|
|
||||||
,m_quit(false)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,12 +9,8 @@ namespace Svc {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Only called by derived class
|
// Only called by derived class
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ConsoleTextLoggerImpl(const char* compName);
|
ConsoleTextLoggerImpl(const char* compName);
|
||||||
#else
|
|
||||||
ConsoleTextLoggerImpl();
|
|
||||||
#endif
|
|
||||||
void init(void);
|
void init(void);
|
||||||
~ConsoleTextLoggerImpl(void);
|
~ConsoleTextLoggerImpl(void);
|
||||||
|
|
||||||
|
|||||||
@ -5,15 +5,9 @@
|
|||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
ConsoleTextLoggerImpl::ConsoleTextLoggerImpl(const char* compName) :
|
ConsoleTextLoggerImpl::ConsoleTextLoggerImpl(const char* compName) :
|
||||||
PassiveTextLoggerComponentBase(compName),m_displayLine(2),m_pointerLine(0) {
|
PassiveTextLoggerComponentBase(compName),m_displayLine(2),m_pointerLine(0) {
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
ConsoleTextLoggerImpl::ConsoleTextLoggerImpl() :
|
|
||||||
PassiveTextLoggerComponentBase(),m_displayLine(2),m_pointerLine(0) {
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ConsoleTextLoggerImpl::init(void) {
|
void ConsoleTextLoggerImpl::init(void) {
|
||||||
PassiveTextLoggerComponentBase::init();
|
PassiveTextLoggerComponentBase::init();
|
||||||
|
|||||||
@ -10,11 +10,7 @@
|
|||||||
#include <Fw/Types/BasicTypes.hpp>
|
#include <Fw/Types/BasicTypes.hpp>
|
||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PolyDbImpl::PolyDbImpl(const char* name) : PolyDbComponentBase(name) {
|
PolyDbImpl::PolyDbImpl(const char* name) : PolyDbComponentBase(name) {
|
||||||
#else
|
|
||||||
PolyDbImpl::PolyDbImpl() {
|
|
||||||
#endif
|
|
||||||
// initialize all entries to stale
|
// initialize all entries to stale
|
||||||
for (NATIVE_INT_TYPE entry = 0; entry < POLYDB_NUM_DB_ENTRIES; entry++) {
|
for (NATIVE_INT_TYPE entry = 0; entry < POLYDB_NUM_DB_ENTRIES; entry++) {
|
||||||
this->m_db[entry].status = MEASUREMENT_STALE;
|
this->m_db[entry].status = MEASUREMENT_STALE;
|
||||||
|
|||||||
@ -37,11 +37,8 @@ namespace Svc {
|
|||||||
//! update is received.
|
//! update is received.
|
||||||
//!
|
//!
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PolyDbImpl(const char* name);
|
PolyDbImpl(const char* name);
|
||||||
#else
|
|
||||||
PolyDbImpl();
|
|
||||||
#endif
|
|
||||||
//! \brief PolyDbImpl initialization
|
//! \brief PolyDbImpl initialization
|
||||||
//!
|
//!
|
||||||
//! The PolyDbImpl initialization function calls the base
|
//! The PolyDbImpl initialization function calls the base
|
||||||
|
|||||||
@ -39,12 +39,7 @@ namespace Svc {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PrmDbImpl::PrmDbImpl(const char* name, const char* file) : PrmDbComponentBase(name) {
|
PrmDbImpl::PrmDbImpl(const char* name, const char* file) : PrmDbComponentBase(name) {
|
||||||
#else
|
|
||||||
PrmDbImpl::PrmDbImpl(const char* file) {
|
|
||||||
#endif
|
|
||||||
this->clearDb();
|
this->clearDb();
|
||||||
this->m_fileName = file;
|
this->m_fileName = file;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,11 +40,8 @@ namespace Svc {
|
|||||||
//!
|
//!
|
||||||
//! \param name component instance name
|
//! \param name component instance name
|
||||||
//! \param file file where parameters are stored.
|
//! \param file file where parameters are stored.
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
PrmDbImpl(const char* name, const char* file);
|
PrmDbImpl(const char* name, const char* file);
|
||||||
#else
|
|
||||||
PrmDbImpl(const char* file);
|
|
||||||
#endif
|
|
||||||
//! \brief PrmDb initialization function
|
//! \brief PrmDb initialization function
|
||||||
//!
|
//!
|
||||||
//! The initialization function for the component creates the message
|
//! The initialization function for the component creates the message
|
||||||
|
|||||||
@ -6,12 +6,8 @@
|
|||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
RateGroupDriverImpl::RateGroupDriverImpl(const char* compName, I32 dividers[], I32 numDividers) :
|
RateGroupDriverImpl::RateGroupDriverImpl(const char* compName, I32 dividers[], I32 numDividers) :
|
||||||
RateGroupDriverComponentBase(compName),
|
RateGroupDriverComponentBase(compName),
|
||||||
#else
|
|
||||||
RateGroupDriverImpl::RateGroupDriverImpl(I32 dividers[], I32 numDividers) :
|
|
||||||
#endif
|
|
||||||
m_ticks(0),m_rollover(1)
|
m_ticks(0),m_rollover(1)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -44,11 +44,7 @@ namespace Svc {
|
|||||||
//! \param numDividers size of dividers array
|
//! \param numDividers size of dividers array
|
||||||
//!
|
//!
|
||||||
//! \return return value description
|
//! \return return value description
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
RateGroupDriverImpl(const char* compName, NATIVE_INT_TYPE dividers[], NATIVE_INT_TYPE numDividers);
|
RateGroupDriverImpl(const char* compName, NATIVE_INT_TYPE dividers[], NATIVE_INT_TYPE numDividers);
|
||||||
#else
|
|
||||||
RateGroupDriverImpl(NATIVE_INT_TYPE dividers[], NATIVE_INT_TYPE numDividers);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! \brief RateGroupDriverImpl initialization function
|
//! \brief RateGroupDriverImpl initialization function
|
||||||
//!
|
//!
|
||||||
|
|||||||
@ -19,11 +19,7 @@
|
|||||||
|
|
||||||
namespace Svc {
|
namespace Svc {
|
||||||
|
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
TlmChanImpl::TlmChanImpl(const char* name) : TlmChanComponentBase(name)
|
TlmChanImpl::TlmChanImpl(const char* name) : TlmChanComponentBase(name)
|
||||||
#else
|
|
||||||
TlmChanImpl::TlmChanImpl()
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// clear data
|
// clear data
|
||||||
this->m_activeBuffer = 0;
|
this->m_activeBuffer = 0;
|
||||||
|
|||||||
@ -23,11 +23,7 @@ namespace Svc {
|
|||||||
class TlmChanImpl: public TlmChanComponentBase {
|
class TlmChanImpl: public TlmChanComponentBase {
|
||||||
public:
|
public:
|
||||||
friend class TlmChanImplTester;
|
friend class TlmChanImplTester;
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
TlmChanImpl(const char* compName);
|
TlmChanImpl(const char* compName);
|
||||||
#else
|
|
||||||
TlmChanImpl();
|
|
||||||
#endif
|
|
||||||
virtual ~TlmChanImpl();
|
virtual ~TlmChanImpl();
|
||||||
void init(
|
void init(
|
||||||
NATIVE_INT_TYPE queueDepth, /*!< The queue depth*/
|
NATIVE_INT_TYPE queueDepth, /*!< The queue depth*/
|
||||||
|
|||||||
@ -32,21 +32,16 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
UdpReceiverComponentImpl ::
|
UdpReceiverComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
UdpReceiverComponentImpl(
|
UdpReceiverComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : UdpReceiverComponentBase(compName),
|
||||||
UdpReceiverComponentBase(compName)
|
m_fd(-1),
|
||||||
#else
|
m_packetsReceived(0),
|
||||||
UdpReceiverImpl(void)
|
m_bytesReceived(0),
|
||||||
#endif
|
m_packetsDropped(0),
|
||||||
,m_fd(-1)
|
m_decodeErrors(0),
|
||||||
,m_packetsReceived(0)
|
m_firstSeq(true),
|
||||||
,m_bytesReceived(0)
|
m_currSeq(0)
|
||||||
,m_packetsDropped(0)
|
|
||||||
,m_decodeErrors(0)
|
|
||||||
,m_firstSeq(true)
|
|
||||||
,m_currSeq(0)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,11 +31,7 @@ namespace Svc {
|
|||||||
//! Construct object UdpReceiver
|
//! Construct object UdpReceiver
|
||||||
//!
|
//!
|
||||||
UdpReceiverComponentImpl(
|
UdpReceiverComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object UdpReceiver
|
//! Initialize object UdpReceiver
|
||||||
|
|||||||
@ -29,18 +29,13 @@ namespace Svc {
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
UdpSenderComponentImpl ::
|
UdpSenderComponentImpl ::
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
UdpSenderComponentImpl(
|
UdpSenderComponentImpl(
|
||||||
const char *const compName
|
const char *const compName
|
||||||
) :
|
) : UdpSenderComponentBase(compName),
|
||||||
UdpSenderComponentBase(compName)
|
m_fd(-1),
|
||||||
#else
|
m_packetsSent(0),
|
||||||
UdpSenderImpl(void)
|
m_bytesSent(0),
|
||||||
#endif
|
m_seq(0)
|
||||||
,m_fd(-1)
|
|
||||||
,m_packetsSent(0)
|
|
||||||
,m_bytesSent(0)
|
|
||||||
,m_seq(0)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,11 +34,7 @@ namespace Svc {
|
|||||||
//! Construct object UdpSender
|
//! Construct object UdpSender
|
||||||
//!
|
//!
|
||||||
UdpSenderComponentImpl(
|
UdpSenderComponentImpl(
|
||||||
#if FW_OBJECT_NAMES == 1
|
|
||||||
const char *const compName /*!< The component name*/
|
const char *const compName /*!< The component name*/
|
||||||
#else
|
|
||||||
void
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//! Initialize object UdpSender
|
//! Initialize object UdpSender
|
||||||
|
|||||||
@ -91,6 +91,14 @@
|
|||||||
#define FW_OBJECT_NAMES 1 //!< Indicates whether or not object names are stored (more memory, can be used for tracking objects)
|
#define FW_OBJECT_NAMES 1 //!< Indicates whether or not object names are stored (more memory, can be used for tracking objects)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// To reduce binary size, FW_OPTIONAL_NAME(<string>) can be used to subsitute strings with an empty string
|
||||||
|
// when running with FW_OBJECT_NAMES disabled
|
||||||
|
#if FW_OBJECT_NAMES == 1
|
||||||
|
#define FW_OPTIONAL_NAME(name) name
|
||||||
|
#else
|
||||||
|
#define FW_OPTIONAL_NAME(name) ""
|
||||||
|
#endif
|
||||||
|
|
||||||
// Add methods to query an object about its name. Can be overridden by derived classes
|
// Add methods to query an object about its name. Can be overridden by derived classes
|
||||||
// For FW_OBJECT_TO_STRING to work, FW_OBJECT_NAMES must be enabled
|
// For FW_OBJECT_TO_STRING to work, FW_OBJECT_NAMES must be enabled
|
||||||
#if FW_OBJECT_NAMES == 1
|
#if FW_OBJECT_NAMES == 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user