mirror of
https://github.com/nasa/fpp.git
synced 2025-12-11 03:05:32 -06:00
Revise top tests
This commit is contained in:
parent
f26251c8a4
commit
c412602891
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/basic/check
Executable file
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/basic/check
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
@ -2,10 +2,8 @@
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
. ./check_topology.sh
|
||||
|
||||
for dir in `find . -mindepth 1 -type d`
|
||||
do
|
||||
echo "checking $dir"
|
||||
(cd $dir; check_topology)
|
||||
(cd $dir;./check)
|
||||
done
|
||||
|
||||
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/commands/check
Executable file
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/commands/check
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/health/check
Executable file
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/health/check
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
@ -0,0 +1,34 @@
|
||||
#ifndef M_NoParams_HPP
|
||||
#define M_NoParams_HPP
|
||||
|
||||
#include "NoParamsComponentAc.hpp"
|
||||
|
||||
namespace M {
|
||||
|
||||
class NoParams :
|
||||
public NoParamsComponentBase
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
NoParams(const char* name) {
|
||||
|
||||
}
|
||||
|
||||
void init(U32 instanceId) {
|
||||
|
||||
}
|
||||
|
||||
void regParamsSpecial() {
|
||||
|
||||
}
|
||||
|
||||
void NoParams_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/params/check
Executable file
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/params/check
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/tlm_packets/check
Executable file
5
compiler/tools/fpp-to-cpp/test/top/check-cpp-dir/tlm_packets/check
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ../check_topology.sh
|
||||
|
||||
check_topology
|
||||
@ -22,6 +22,12 @@ namespace M {
|
||||
|
||||
}
|
||||
|
||||
namespace M {
|
||||
|
||||
M::NoParams c3(FW_OPTIONAL_NAME("c3"));
|
||||
|
||||
}
|
||||
|
||||
namespace M {
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@ -31,6 +37,7 @@ namespace M {
|
||||
void initComponents(const TopologyState& state) {
|
||||
M::c1.init(InstanceIds::M_c1);
|
||||
M::c2.init(InstanceIds::M_c2);
|
||||
M::c3.init(InstanceIds::M_c3);
|
||||
}
|
||||
|
||||
void configComponents(const TopologyState& state) {
|
||||
@ -40,6 +47,7 @@ namespace M {
|
||||
void setBaseIds() {
|
||||
M::c1.setIdBase(BaseIds::M_c1);
|
||||
M::c2.setIdBase(BaseIds::M_c2);
|
||||
M::c3.setIdBase(BaseIds::M_c3);
|
||||
}
|
||||
|
||||
void connectComponents() {
|
||||
@ -247,4 +255,72 @@ namespace M {
|
||||
|
||||
}
|
||||
|
||||
namespace M {
|
||||
|
||||
bool NoParamsComponentBase::isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const {
|
||||
FW_ASSERT(
|
||||
(0 <= portNum) && (portNum < NUM_CMDREGOUT_OUTPUT_PORTS),
|
||||
static_cast<FwAssertArgType>(portNum),
|
||||
static_cast<FwAssertArgType>(NUM_CMDREGOUT_OUTPUT_PORTS)
|
||||
);
|
||||
bool result = false;
|
||||
const auto instance = this->getInstance();
|
||||
switch (instance) {
|
||||
default:
|
||||
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NoParamsComponentBase::isConnected_cmdResponseIn_OutputPort(FwIndexType portNum) const {
|
||||
FW_ASSERT(
|
||||
(0 <= portNum) && (portNum < NUM_CMDRESPONSEIN_OUTPUT_PORTS),
|
||||
static_cast<FwAssertArgType>(portNum),
|
||||
static_cast<FwAssertArgType>(NUM_CMDRESPONSEIN_OUTPUT_PORTS)
|
||||
);
|
||||
bool result = false;
|
||||
const auto instance = this->getInstance();
|
||||
switch (instance) {
|
||||
default:
|
||||
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NoParamsComponentBase::isConnected_prmGetOut_OutputPort(FwIndexType portNum) const {
|
||||
FW_ASSERT(
|
||||
(0 <= portNum) && (portNum < NUM_PRMGETOUT_OUTPUT_PORTS),
|
||||
static_cast<FwAssertArgType>(portNum),
|
||||
static_cast<FwAssertArgType>(NUM_PRMGETOUT_OUTPUT_PORTS)
|
||||
);
|
||||
bool result = false;
|
||||
const auto instance = this->getInstance();
|
||||
switch (instance) {
|
||||
default:
|
||||
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NoParamsComponentBase::isConnected_prmSetOut_OutputPort(FwIndexType portNum) const {
|
||||
FW_ASSERT(
|
||||
(0 <= portNum) && (portNum < NUM_PRMSETOUT_OUTPUT_PORTS),
|
||||
static_cast<FwAssertArgType>(portNum),
|
||||
static_cast<FwAssertArgType>(NUM_PRMSETOUT_OUTPUT_PORTS)
|
||||
);
|
||||
bool result = false;
|
||||
const auto instance = this->getInstance();
|
||||
switch (instance) {
|
||||
default:
|
||||
FW_ASSERT(0, static_cast<FwAssertArgType>(instance));
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#define M_ParamsTopologyAc_HPP
|
||||
|
||||
#include "C.hpp"
|
||||
#include "NoParams.hpp"
|
||||
#include "ParamsTopologyDefs.hpp"
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@ -28,6 +29,13 @@ namespace M {
|
||||
|
||||
}
|
||||
|
||||
namespace M {
|
||||
|
||||
//! c3
|
||||
extern M::NoParams c3;
|
||||
|
||||
}
|
||||
|
||||
namespace M {
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
@ -38,6 +46,7 @@ namespace M {
|
||||
enum {
|
||||
M_c1 = 0x100,
|
||||
M_c2 = 0x200,
|
||||
M_c3 = 0x300,
|
||||
};
|
||||
}
|
||||
|
||||
@ -45,6 +54,7 @@ namespace M {
|
||||
enum {
|
||||
M_c1,
|
||||
M_c2,
|
||||
M_c3,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -16,4 +16,18 @@ module M {
|
||||
|
||||
}
|
||||
|
||||
passive component NoParams {
|
||||
|
||||
command recv port cmdOut
|
||||
|
||||
command reg port cmdRegOut
|
||||
|
||||
command resp port cmdResponseIn
|
||||
|
||||
param get port prmGetOut
|
||||
|
||||
param set port prmSetOut
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -14,10 +14,13 @@ module M {
|
||||
|
||||
instance c2: C base id 0x200
|
||||
|
||||
instance c3: NoParams base id 0x300
|
||||
|
||||
topology Params {
|
||||
|
||||
instance c1
|
||||
instance c2
|
||||
instance c3
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user