diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 257f68ee7f..072eb80b07 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -383,6 +383,7 @@ dll dlog dnp DNs +doall docbook dockerfile docset @@ -587,6 +588,7 @@ foundin fpconfighpp FPGA FPL +fpp FPport fprim fprime @@ -672,6 +674,7 @@ GPINT gpio graphviz grayscales +grep grnd GROUNDINTERFACERULES groupadd @@ -739,6 +742,7 @@ idl idx ieeetr iface +ifchange ifcomment ifdef iflag @@ -919,6 +923,7 @@ loadfile localhost localtime LOCKGUARDTESTER +locs LOGASSERT LOGFILE LOGFILECLOSED @@ -1079,6 +1084,7 @@ NOBUFFERS NOCOLOR NOCTTY nogen +noinclude nolog NOLOGFILEOPENINITERROR nomagic @@ -1876,6 +1882,7 @@ wx wxgui Xabcdefx xapian +xargs xcode xdf xdffe diff --git a/.gitignore b/.gitignore index f6133a0342..466b6ccb6e 100644 --- a/.gitignore +++ b/.gitignore @@ -76,5 +76,12 @@ GTestBase.* /Fw/Python/src/fprime.egg-info /Gds/src/fprime_gds.egg-info **/DefaultDict/serializable/* + +fprime-venv +xml +depend + +.* + /.idea/ /venv/ diff --git a/.redo-base b/.redo-base new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_cpp.tmpl old mode 100755 new mode 100644 diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl old mode 100755 new mode 100644 diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl index f5783ace24..72cb1cfdfe 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/component/cpp.tmpl @@ -321,7 +321,7 @@ namespace ${namespace} { // Deserialize value this->m_paramLock.lock(); - if (this->m_param_${prmname}_valid == Fw::PARAM_VALID) { + if (this->m_param_${prmname}_valid == Fw::ParamValid::VALID) { #if $typeinfo == "enum": FwEnumStoreType ${prmname}Val = 0; stat = buff.deserialize(${prmname}Val); @@ -332,13 +332,13 @@ namespace ${namespace} { // If there was a deserialization issue, mark it invalid. if (stat != Fw::FW_SERIALIZE_OK) { #if $default == None: - this->m_param_${prmname}_valid = Fw::PARAM_INVALID; + this->m_param_${prmname}_valid = Fw::ParamValid::INVALID; #else if $type == "string": - this->m_param_${prmname}_valid = Fw::PARAM_DEFAULT; + this->m_param_${prmname}_valid = Fw::ParamValid::DEFAULT; // set default value this->m_${prmname} = "${default}"; #else - this->m_param_${prmname}_valid = Fw::PARAM_DEFAULT; + this->m_param_${prmname}_valid = Fw::ParamValid::DEFAULT; // set default value this->m_${prmname} = ${default}; #end if @@ -349,11 +349,11 @@ namespace ${namespace} { // No default #else if $type == "string": // set default value - this->m_param_${prmname}_valid = Fw::PARAM_DEFAULT; + this->m_param_${prmname}_valid = Fw::ParamValid::DEFAULT; this->m_${prmname} = "${default}"; #else // set default value - this->m_param_${prmname}_valid = Fw::PARAM_DEFAULT; + this->m_param_${prmname}_valid = Fw::ParamValid::DEFAULT; this->m_${prmname} = ${default}; #end if } @@ -400,7 +400,7 @@ namespace ${namespace} { #end for #for $ids, $prmname, $type, $osets, $osaves, $size, $default, $comment, $typeinfo in $parameters: - this->m_param_${prmname}_valid = Fw::PARAM_UNINIT; + this->m_param_${prmname}_valid = Fw::ParamValid::UNINIT; #end for } @@ -664,7 +664,7 @@ namespace ${namespace} { #end for #end if { - Fw::CommandResponse _cstat = compPtr->paramSet_${prmname}(args); + Fw::CmdResponse _cstat = compPtr->paramSet_${prmname}(args); compPtr->cmdResponse_out( opCode, cmdSeq, @@ -682,7 +682,7 @@ namespace ${namespace} { #end for #end if { - Fw::CommandResponse _cstat = compPtr->paramSave_${prmname}(); + Fw::CmdResponse _cstat = compPtr->paramSave_${prmname}(); compPtr->cmdResponse_out( opCode, cmdSeq, @@ -694,7 +694,7 @@ namespace ${namespace} { default: { compPtr->cmdResponse_out( opCode,cmdSeq, - Fw::COMMAND_INVALID_OPCODE + Fw::CmdResponse::INVALID_OPCODE ); break; } @@ -707,7 +707,7 @@ namespace ${namespace} { cmdResponse_out( FwOpcodeType opCode, U32 cmdSeq, - Fw::CommandResponse response + Fw::CmdResponse response ) { FW_ASSERT(this->m_${CmdStatus_Name}_OutputPort[0].isConnected()); @@ -751,7 +751,7 @@ namespace ${namespace} { if (this->m_${CmdStatus_Name}_OutputPort[0].isConnected()) { this->m_${CmdStatus_Name}_OutputPort[0].invoke( opCode, - cmdSeq,Fw::COMMAND_FORMAT_ERROR + cmdSeq,Fw::CmdResponse::FORMAT_ERROR ); } return; @@ -766,7 +766,7 @@ namespace ${namespace} { if (this->m_${CmdStatus_Name}_OutputPort[0].isConnected()) { this->m_${CmdStatus_Name}_OutputPort[0].invoke( opCode, - cmdSeq,Fw::COMMAND_FORMAT_ERROR + cmdSeq,Fw::CmdResponse::FORMAT_ERROR ); } return; @@ -1048,7 +1048,7 @@ namespace ${namespace} { if (this->m_${ParamGet_Name}_OutputPort[0].isConnected()) { return this->m_${ParamGet_Name}_OutputPort[0].invoke(id,buff); } else { - return Fw::PARAM_INVALID; + return Fw::ParamValid::INVALID; } } @@ -1058,7 +1058,7 @@ namespace ${namespace} { // ---------------------------------------------------------------------- #for $ids, $prmname, $type, $osets, $osaves, $size, $default, $comment, $typeinfo in $parameters: - Fw::CommandResponse ${class_name} :: + Fw::CmdResponse ${class_name} :: paramSet_${prmname}(Fw::SerializeBufferBase &val) { @@ -1066,7 +1066,7 @@ namespace ${namespace} { FwEnumStoreType _local_val = 0; Fw::SerializeStatus _stat = val.deserialize(_local_val); if (_stat != Fw::FW_SERIALIZE_OK) { - return Fw::COMMAND_VALIDATION_ERROR; + return Fw::CmdResponse::VALIDATION_ERROR; } this->m_paramLock.lock(); @@ -1080,19 +1080,19 @@ namespace ${namespace} { #end if Fw::SerializeStatus _stat = val.deserialize(_local_val); if (_stat != Fw::FW_SERIALIZE_OK) { - return Fw::COMMAND_VALIDATION_ERROR; + return Fw::CmdResponse::VALIDATION_ERROR; } // Assign value only if successfully deserialized this->m_paramLock.lock(); this->m_${prmname} = _local_val; #end if - this->m_param_${prmname}_valid = Fw::PARAM_VALID; + this->m_param_${prmname}_valid = Fw::ParamValid::VALID; this->m_paramLock.unLock(); // Call notifier this->parameterUpdated(PARAMID_${prmname.upper}); - return Fw::COMMAND_OK; + return Fw::CmdResponse::OK; } @@ -1100,7 +1100,7 @@ namespace ${namespace} { // Parameter save functions // ---------------------------------------------------------------------- - Fw::CommandResponse ${class_name} :: + Fw::CmdResponse ${class_name} :: paramSave_${prmname}(void) { @@ -1117,7 +1117,7 @@ namespace ${namespace} { #end if this->m_paramLock.unLock(); if (stat != Fw::FW_SERIALIZE_OK) { - return Fw::COMMAND_VALIDATION_ERROR; + return Fw::CmdResponse::VALIDATION_ERROR; } FwPrmIdType id = 0; @@ -1142,11 +1142,11 @@ namespace ${namespace} { id, saveBuff ); - return Fw::COMMAND_OK; + return Fw::CmdResponse::OK; } - return Fw::COMMAND_EXECUTION_ERROR; + return Fw::CmdResponse::EXECUTION_ERROR; } @@ -1288,7 +1288,7 @@ namespace ${namespace} { this->m_${LogEvent_Name}_OutputPort[0].invoke( _id, - _logTime,Fw::LOG_${severity}, + _logTime,Fw::LogSeverity::${severity}, _logBuff ); @@ -1338,7 +1338,7 @@ namespace ${namespace} { Fw::TextLogString _logString = _textBuffer; this->m_${LogTextEvent_Name}_OutputPort[0].invoke( _id, - _logTime,Fw::TEXT_LOG_${severity}, + _logTime,Fw::LogSeverity::${severity}, _logString ); @@ -1895,7 +1895,7 @@ namespace ${namespace} { this->cmdResponse_out( opCode, cmdSeq, - Fw::COMMAND_FORMAT_ERROR + Fw::CmdResponse::FORMAT_ERROR ); } // Don't crash the task if bad arguments were passed from the ground @@ -1908,7 +1908,7 @@ namespace ${namespace} { \#if FW_CMD_CHECK_RESIDUAL if (args.getBuffLeft() != 0) { if (this->m_${CmdStatus_Name}_OutputPort[0].isConnected()) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_FORMAT_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::FORMAT_ERROR); } // Don't crash the task if bad arguments were passed from the ground break; diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/component/hpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/component/hpp.tmpl index 3c80a01298..d79a41b8fc 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/component/hpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/component/hpp.tmpl @@ -683,7 +683,7 @@ $emit_non_port_params(8, $params) void cmdResponse_out( FwOpcodeType opCode, $doxygen_post_comment("The opcode") U32 cmdSeq, $doxygen_post_comment("The command sequence number") - Fw::CommandResponse response $doxygen_post_comment("The command response") + Fw::CmdResponse response $doxygen_post_comment("The command response") ); #end if @@ -1203,7 +1203,7 @@ $emit_port_params(8, $params) //! //! \return The command response //! - Fw::CommandResponse paramSet_${name}( + Fw::CmdResponse paramSet_${name}( Fw::SerializeBufferBase &val $doxygen_post_comment("The serialization buffer") ); @@ -1219,7 +1219,7 @@ $emit_port_params(8, $params) //! //! \return The command response //! - Fw::CommandResponse paramSave_${name}(void); + Fw::CmdResponse paramSave_${name}(void); #end for #end if diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_cpp.tmpl old mode 100755 new mode 100644 diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl old mode 100755 new mode 100644 diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl index 3eb4a1a7bc..ebfcff21d2 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/impl/cpp.tmpl @@ -103,7 +103,7 @@ $emit_non_port_params([ $param_opCode, $param_cmdSeq ] + $params) ) { // TODO - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } #end for diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl index 0fa4023a0f..b1669c36cf 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/test/cpp.tmpl @@ -118,7 +118,7 @@ $emit_cpp_params([ $param_instance ]) ) { #for $ids, $prm_name, $type, $osets, $osaves, $size, $default, $comment, $typeinfo in $parameters: - this->m_param_${prm_name}_valid = Fw::PARAM_UNINIT; + this->m_param_${prm_name}_valid = Fw::ParamValid::UNINIT; #end for // Initialize base class @@ -404,7 +404,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params) const NATIVE_INT_TYPE portNum, const FwOpcodeType opCode, const U32 cmdSeq, - const Fw::CommandResponse response + const Fw::CmdResponse response ) { ${tester_base}* _testerBase = @@ -464,7 +464,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params) const NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, - Fw::TextLogSeverity severity, + Fw::LogSeverity severity, Fw::TextLogString &text ) { @@ -503,7 +503,7 @@ $emit_cpp_port_params([ $param_callComp, $param_portNum] + $params) static_cast<${tester_base}*>(component); Fw::SerializeStatus _status; - Fw::ParamValid _ret = Fw::PARAM_VALID; + Fw::ParamValid _ret = Fw::ParamValid::VALID; val.resetSer(); const U32 idBase = _testerBase->getIdBase(); @@ -704,7 +704,7 @@ $emit_cpp_port_params([ $param_portNum ] + $port_params[$instance]) cmdResponseIn( const FwOpcodeType opCode, const U32 seq, - const Fw::CommandResponse response + const Fw::CmdResponse response ) { CmdResponse e = { opCode, seq, response }; @@ -1081,7 +1081,7 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ]) textLogIn( const U32 id, Fw::Time &timeTag, - const Fw::TextLogSeverity severity, + const Fw::LogSeverity severity, const Fw::TextLogString &text ) { @@ -1096,26 +1096,26 @@ $emit_cpp_params([ $param_const_timeTag, $param_val ]) ) { const char *severityString = "UNKNOWN"; - switch (e.severity) { - case Fw::TEXT_LOG_FATAL: + switch (e.severity.e) { + case Fw::LogSeverity::FATAL: severityString = "FATAL"; break; - case Fw::TEXT_LOG_WARNING_HI: + case Fw::LogSeverity::WARNING_HI: severityString = "WARNING_HI"; break; - case Fw::TEXT_LOG_WARNING_LO: + case Fw::LogSeverity::WARNING_LO: severityString = "WARNING_LO"; break; - case Fw::TEXT_LOG_COMMAND: + case Fw::LogSeverity::COMMAND: severityString = "COMMAND"; break; - case Fw::TEXT_LOG_ACTIVITY_HI: + case Fw::LogSeverity::ACTIVITY_HI: severityString = "ACTIVITY_HI"; break; - case Fw::TEXT_LOG_ACTIVITY_LO: + case Fw::LogSeverity::ACTIVITY_LO: severityString = "ACTIVITY_LO"; break; - case Fw::TEXT_LOG_DIAGNOSTIC: + case Fw::LogSeverity::DIAGNOSTIC: severityString = "DIAGNOSTIC"; break; default: diff --git a/Autocoders/Python/src/fprime_ac/generators/templates/test/hpp.tmpl b/Autocoders/Python/src/fprime_ac/generators/templates/test/hpp.tmpl index 44dce52e44..86385276cb 100644 --- a/Autocoders/Python/src/fprime_ac/generators/templates/test/hpp.tmpl +++ b/Autocoders/Python/src/fprime_ac/generators/templates/test/hpp.tmpl @@ -407,7 +407,7 @@ $emit_hpp_params([ $param_opCode, $param_cmdSeq, $param_response ]) typedef struct { FwOpcodeType opCode; U32 cmdSeq; - Fw::CommandResponse response; + Fw::CmdResponse response; } CmdResponse; //! The command response history @@ -447,7 +447,7 @@ $emit_hpp_params([ $param_event_id, $param_timeTag, $param_log_severity, $param_ //! Handle a text event //! virtual void textLogIn( -$emit_hpp_params([ $param_event_id, $param_timeTag, $param_text_log_severity, $param_text ]) +$emit_hpp_params([ $param_event_id, $param_timeTag, $param_log_severity, $param_text ]) ); //! A history entry for the text log @@ -455,7 +455,7 @@ $emit_hpp_params([ $param_event_id, $param_timeTag, $param_text_log_severity, $p typedef struct { U32 id; Fw::Time timeTag; - Fw::TextLogSeverity severity; + Fw::LogSeverity severity; Fw::TextLogString text; } TextLogEntry; diff --git a/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py b/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py index f9394ffe31..70971849ec 100644 --- a/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py +++ b/Autocoders/Python/src/fprime_ac/generators/visitors/ComponentVisitorBase.py @@ -270,7 +270,7 @@ class ComponentVisitorBase(AbstractVisitor.AbstractVisitor): c.param_opCode = ("opCode", "const FwOpcodeType", "The opcode") c.param_response = ( "response", - "const Fw::CommandResponse", + "const Fw::CmdResponse", "The command response", ) diff --git a/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py b/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py index fb8705fc16..41664a2afd 100644 --- a/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py +++ b/Autocoders/Python/src/fprime_ac/generators/writers/ComponentWriterBase.py @@ -279,7 +279,7 @@ class ComponentWriterBase(AbstractWriter.AbstractWriter): c.param_opCode = ("opCode", "const FwOpcodeType", "The opcode") c.param_response = ( "response", - "const Fw::CommandResponse", + "const Fw::CmdResponse", "The command response", ) diff --git a/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py b/Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py old mode 100755 new mode 100644 diff --git a/Autocoders/Python/templates/ExampleComponentImpl.cpp b/Autocoders/Python/templates/ExampleComponentImpl.cpp index cc42cc0b63..812834530b 100644 --- a/Autocoders/Python/templates/ExampleComponentImpl.cpp +++ b/Autocoders/Python/templates/ExampleComponentImpl.cpp @@ -51,7 +51,7 @@ namespace ExampleComponents { // write a value to a telemetry channel U32 chan = 12; this->tlmWrite_somechan(chan); - this->cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::OK); } void ExampleComponentImpl::TEST_CMD_2_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2) { @@ -59,7 +59,7 @@ namespace ExampleComponents { this->log_ACTIVITY_HI_SomeEvent(opCode,arg2, Example4::Example2(6.0,7.0,8,9), str,ExampleComponentBase::EVENT_MEMB3); Example4::Example2 ex(10.0,11.0,12,13); this->tlmWrite_anotherchan(ex); // cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } void ExampleComponentImpl::parameterUpdated(FwPrmIdType id) { diff --git a/Autocoders/Python/test/active_tester/active_tester.mdzip.bak b/Autocoders/Python/test/active_tester/active_tester.mdzip.bak deleted file mode 100644 index d0119e3b7d..0000000000 Binary files a/Autocoders/Python/test/active_tester/active_tester.mdzip.bak and /dev/null differ diff --git a/Autocoders/Python/test/build b/Autocoders/Python/test/build new file mode 100755 index 0000000000..e22b0e0f21 --- /dev/null +++ b/Autocoders/Python/test/build @@ -0,0 +1,21 @@ +#!/bin/sh -e + +export GREEN='\033[32m' +export RED='\033[31m' +export NO_COLOR='\033[0m' + +files=`find . -name CMakeLists.txt | xargs grep -l '^register_fprime_ut' | sort | uniq` +here=$PWD +for file in $files +do + dir=`dirname $file` + printf '%-60s' $dir + cd $dir + if fprime-util build --ut > /dev/null 2>&1 + then + echo $GREEN'OK'$NO_COLOR + else + echo $RED'FAILED'$NO_COLOR + fi + cd $here +done diff --git a/Autocoders/Python/test/check b/Autocoders/Python/test/check new file mode 100755 index 0000000000..d81031c1b8 --- /dev/null +++ b/Autocoders/Python/test/check @@ -0,0 +1,21 @@ +#!/bin/sh -e + +export GREEN='\033[32m' +export RED='\033[31m' +export NO_COLOR='\033[0m' + +files=`find . -name CMakeLists.txt | xargs grep -l '^register_fprime_ut' | sort | uniq` +here=$PWD +for file in $files +do + dir=`dirname $file` + printf '%-60s' $dir + cd $dir + if fprime-util check 2>&1 | grep -q '100% tests passed' + then + echo $GREEN'PASSED'$NO_COLOR + else + echo $RED'FAILED'$NO_COLOR + fi + cd $here +done diff --git a/Autocoders/Python/test/command1/TestCommand1Impl.cpp b/Autocoders/Python/test/command1/TestCommand1Impl.cpp index 88e2d64470..bee24c6004 100644 --- a/Autocoders/Python/test/command1/TestCommand1Impl.cpp +++ b/Autocoders/Python/test/command1/TestCommand1Impl.cpp @@ -31,5 +31,5 @@ void TestCommand1Impl::aport_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5 void TestCommand1Impl::TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3) { printf("Got command args: %d %f %d\n", arg1, arg2, arg3 ); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } diff --git a/Autocoders/Python/test/command1/TestCommandSourceImpl.cpp b/Autocoders/Python/test/command1/TestCommandSourceImpl.cpp index a9e7e34f30..4cbd845252 100644 --- a/Autocoders/Python/test/command1/TestCommandSourceImpl.cpp +++ b/Autocoders/Python/test/command1/TestCommandSourceImpl.cpp @@ -25,7 +25,7 @@ TestCommandSourceImpl::~TestCommandSourceImpl() { void TestCommandSourceImpl::cmdStatusPort_handler( NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, - Fw::CommandResponse response) { + Fw::CmdResponse response) { this->printStatus(response); } @@ -37,25 +37,25 @@ void TestCommandSourceImpl::init(void) { Cmd::CommandTesterComponentBase::init(); } -void TestCommandSourceImpl::printStatus(Fw::CommandResponse response) { - switch (response) { - case Fw::COMMAND_OK: +void TestCommandSourceImpl::printStatus(Fw::CmdResponse response) { + switch (response.e) { + case Fw::CmdResponse::OK: printf("COMMAND OK\n"); break; - case Fw::COMMAND_INVALID_OPCODE: + case Fw::CmdResponse::INVALID_OPCODE: printf("INVALID OPCODE\n"); break; - case Fw::COMMAND_VALIDATION_ERROR: + case Fw::CmdResponse::VALIDATION_ERROR: printf("VALIDATION ERROR\n"); break; - case Fw::COMMAND_FORMAT_ERROR: + case Fw::CmdResponse::FORMAT_ERROR: printf("FORMAT ERROR\n"); break; - case Fw::COMMAND_EXECUTION_ERROR: + case Fw::CmdResponse::EXECUTION_ERROR: printf("EXECUTION ERROR\n"); break; default: - printf("Unknown status %d\n", response); + printf("Unknown status %d\n", response.e); break; } } diff --git a/Autocoders/Python/test/command1/TestCommandSourceImpl.hpp b/Autocoders/Python/test/command1/TestCommandSourceImpl.hpp index d84931a51b..78ecebcafe 100644 --- a/Autocoders/Python/test/command1/TestCommandSourceImpl.hpp +++ b/Autocoders/Python/test/command1/TestCommandSourceImpl.hpp @@ -21,10 +21,10 @@ class TestCommandSourceImpl: public Cmd::CommandTesterComponentBase { void init(void); void test_TEST_CMD_1(I32 arg1, F32 arg2, U8 arg3); protected: - void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response); + void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response); void cmdRegPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode); private: - void printStatus(Fw::CommandResponse response); + void printStatus(Fw::CmdResponse response); }; #endif /* TESTCOMMANDSOURCEIMPL_HPP_ */ diff --git a/Autocoders/Python/test/command_multi_inst/TestCommand1Impl.cpp b/Autocoders/Python/test/command_multi_inst/TestCommand1Impl.cpp index 183658a42f..773a12655b 100644 --- a/Autocoders/Python/test/command_multi_inst/TestCommand1Impl.cpp +++ b/Autocoders/Python/test/command_multi_inst/TestCommand1Impl.cpp @@ -39,7 +39,7 @@ void TestCommand1Impl::TEST_CMD_1_cmdHandler( SomeEnum arg4 /*!< The ENUM argument*/ ) { printf("Got command args: %d %f %d %d\n", arg1, arg2, arg3, arg4 ); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void TestCommand1Impl::TEST_CMD_2_cmdHandler( diff --git a/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.cpp b/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.cpp index a9e7e34f30..4cbd845252 100644 --- a/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.cpp +++ b/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.cpp @@ -25,7 +25,7 @@ TestCommandSourceImpl::~TestCommandSourceImpl() { void TestCommandSourceImpl::cmdStatusPort_handler( NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, - Fw::CommandResponse response) { + Fw::CmdResponse response) { this->printStatus(response); } @@ -37,25 +37,25 @@ void TestCommandSourceImpl::init(void) { Cmd::CommandTesterComponentBase::init(); } -void TestCommandSourceImpl::printStatus(Fw::CommandResponse response) { - switch (response) { - case Fw::COMMAND_OK: +void TestCommandSourceImpl::printStatus(Fw::CmdResponse response) { + switch (response.e) { + case Fw::CmdResponse::OK: printf("COMMAND OK\n"); break; - case Fw::COMMAND_INVALID_OPCODE: + case Fw::CmdResponse::INVALID_OPCODE: printf("INVALID OPCODE\n"); break; - case Fw::COMMAND_VALIDATION_ERROR: + case Fw::CmdResponse::VALIDATION_ERROR: printf("VALIDATION ERROR\n"); break; - case Fw::COMMAND_FORMAT_ERROR: + case Fw::CmdResponse::FORMAT_ERROR: printf("FORMAT ERROR\n"); break; - case Fw::COMMAND_EXECUTION_ERROR: + case Fw::CmdResponse::EXECUTION_ERROR: printf("EXECUTION ERROR\n"); break; default: - printf("Unknown status %d\n", response); + printf("Unknown status %d\n", response.e); break; } } diff --git a/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.hpp b/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.hpp index d84931a51b..78ecebcafe 100644 --- a/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.hpp +++ b/Autocoders/Python/test/command_multi_inst/TestCommandSourceImpl.hpp @@ -21,10 +21,10 @@ class TestCommandSourceImpl: public Cmd::CommandTesterComponentBase { void init(void); void test_TEST_CMD_1(I32 arg1, F32 arg2, U8 arg3); protected: - void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response); + void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response); void cmdRegPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode); private: - void printStatus(Fw::CommandResponse response); + void printStatus(Fw::CmdResponse response); }; #endif /* TESTCOMMANDSOURCEIMPL_HPP_ */ diff --git a/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp b/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp index f33650ec8c..4210339d48 100644 --- a/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp +++ b/Autocoders/Python/test/command_res/Test1ComponentImpl.cpp @@ -76,7 +76,7 @@ namespace Cmd { U8 arg3 ) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void Test1ComponentImpl :: @@ -88,7 +88,7 @@ namespace Cmd { U8 arg3 ) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } } // end namespace Cmd diff --git a/Autocoders/Python/test/command_res/test/ut/Tester.cpp b/Autocoders/Python/test/command_res/test/ut/Tester.cpp index d87e7ebfc2..74ad200d85 100644 --- a/Autocoders/Python/test/command_res/test/ut/Tester.cpp +++ b/Autocoders/Python/test/command_res/test/ut/Tester.cpp @@ -73,11 +73,11 @@ namespace Cmd { #if FW_CMD_CHECK_RESIDUAL // should fail ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_1,10,Fw::COMMAND_FORMAT_ERROR); + ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_1,10,Fw::CmdResponse::FORMAT_ERROR); #else // should pass ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_1,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_1,10,Fw::CmdResponse::OK); #endif // second async command @@ -101,11 +101,11 @@ namespace Cmd { #if FW_CMD_CHECK_RESIDUAL // should fail ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_2,20,Fw::COMMAND_FORMAT_ERROR); + ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_2,20,Fw::CmdResponse::FORMAT_ERROR); #else // should pass ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_2,20,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,Test1ComponentBase::OPCODE_TEST_CMD_2,20,Fw::CmdResponse::OK); #endif } diff --git a/Autocoders/Python/test/command_string/TestCommandImpl.cpp b/Autocoders/Python/test/command_string/TestCommandImpl.cpp index 358b809768..b3e50a21e9 100644 --- a/Autocoders/Python/test/command_string/TestCommandImpl.cpp +++ b/Autocoders/Python/test/command_string/TestCommandImpl.cpp @@ -46,5 +46,5 @@ void TestCommand1Impl::TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I3 } printf("Got command args: %d \"%s\" %s\n", arg1, arg2.toChar(),enum_str); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } diff --git a/Autocoders/Python/test/command_string/TestCommandSourceImpl.cpp b/Autocoders/Python/test/command_string/TestCommandSourceImpl.cpp index 32bb37b788..84699c0ab4 100644 --- a/Autocoders/Python/test/command_string/TestCommandSourceImpl.cpp +++ b/Autocoders/Python/test/command_string/TestCommandSourceImpl.cpp @@ -22,7 +22,7 @@ TestCommandSourceImpl::~TestCommandSourceImpl() { void TestCommandSourceImpl::cmdStatusPort_handler( NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, - Fw::CommandResponse response) { + Fw::CmdResponse response) { this->printStatus(response); } @@ -34,25 +34,25 @@ void TestCommandSourceImpl::init(void) { Cmd::CommandTesterComponentBase::init(); } -void TestCommandSourceImpl::printStatus(Fw::CommandResponse response) { - switch (response) { - case Fw::COMMAND_OK: +void TestCommandSourceImpl::printStatus(Fw::CmdResponse response) { + switch (response.e) { + case Fw::CmdResponse::OK: printf("COMMAND OK\n"); break; - case Fw::COMMAND_INVALID_OPCODE: + case Fw::CmdResponse::INVALID_OPCODE: printf("INVALID OPCODE\n"); break; - case Fw::COMMAND_VALIDATION_ERROR: + case Fw::CmdResponse::VALIDATION_ERROR: printf("VALIDATION ERROR\n"); break; - case Fw::COMMAND_FORMAT_ERROR: + case Fw::CmdResponse::FORMAT_ERROR: printf("FORMAT ERROR\n"); break; - case Fw::COMMAND_EXECUTION_ERROR: + case Fw::CmdResponse::EXECUTION_ERROR: printf("EXECUTION ERROR\n"); break; default: - printf("Unknown status %d\n", response); + printf("Unknown status %d\n", response.e); break; } } diff --git a/Autocoders/Python/test/command_string/TestCommandSourceImpl.hpp b/Autocoders/Python/test/command_string/TestCommandSourceImpl.hpp index 8efb93cbbc..e121eccf13 100644 --- a/Autocoders/Python/test/command_string/TestCommandSourceImpl.hpp +++ b/Autocoders/Python/test/command_string/TestCommandSourceImpl.hpp @@ -22,10 +22,10 @@ class TestCommandSourceImpl: public Cmd::CommandTesterComponentBase { void init(void); void test_TEST_CMD_1(I32 arg1, const Fw::CmdStringArg& arg2, I32 arg3); protected: - void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response); + void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response); void cmdRegPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode); private: - void printStatus(Fw::CommandResponse response); + void printStatus(Fw::CmdResponse response); }; #endif /* TESTCOMMANDSOURCEIMPL_HPP_ */ diff --git a/Autocoders/Python/test/event1/TestLogRecvImpl.cpp b/Autocoders/Python/test/event1/TestLogRecvImpl.cpp index 7f14fff089..464a4f6d12 100644 --- a/Autocoders/Python/test/event1/TestLogRecvImpl.cpp +++ b/Autocoders/Python/test/event1/TestLogRecvImpl.cpp @@ -21,7 +21,7 @@ TestLogRecvImpl::~TestLogRecvImpl() { } void TestLogRecvImpl::logRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::LogBuffer &args) { - printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity); + printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity.e); I32 arg1; F32 arg2; U8 arg3; diff --git a/Autocoders/Python/test/event_enum/TestLogRecvImpl.cpp b/Autocoders/Python/test/event_enum/TestLogRecvImpl.cpp index 0748116839..086ea46fe9 100644 --- a/Autocoders/Python/test/event_enum/TestLogRecvImpl.cpp +++ b/Autocoders/Python/test/event_enum/TestLogRecvImpl.cpp @@ -21,7 +21,7 @@ TestLogRecvImpl::~TestLogRecvImpl() { } void TestLogRecvImpl::logRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::LogBuffer &args) { - printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity); + printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity.e); I32 arg1; I32 arg2; U8 arg3; diff --git a/Autocoders/Python/test/event_multi_inst/TestLogRecvImpl.cpp b/Autocoders/Python/test/event_multi_inst/TestLogRecvImpl.cpp index 7f14fff089..464a4f6d12 100644 --- a/Autocoders/Python/test/event_multi_inst/TestLogRecvImpl.cpp +++ b/Autocoders/Python/test/event_multi_inst/TestLogRecvImpl.cpp @@ -21,7 +21,7 @@ TestLogRecvImpl::~TestLogRecvImpl() { } void TestLogRecvImpl::logRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::LogBuffer &args) { - printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity); + printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity.e); I32 arg1; F32 arg2; U8 arg3; diff --git a/Autocoders/Python/test/event_string/TestLogRecvImpl.cpp b/Autocoders/Python/test/event_string/TestLogRecvImpl.cpp index d1d3c7ed5e..4d308c8dd6 100644 --- a/Autocoders/Python/test/event_string/TestLogRecvImpl.cpp +++ b/Autocoders/Python/test/event_string/TestLogRecvImpl.cpp @@ -22,7 +22,7 @@ TestLogRecvImpl::~TestLogRecvImpl() { } void TestLogRecvImpl::logRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::LogBuffer &args) { - printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity); + printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity.e); I32 arg1; Fw::LogStringArg arg2; U8 arg3; diff --git a/Autocoders/Python/test/event_throttle/test/ut/Tester.cpp b/Autocoders/Python/test/event_throttle/test/ut/Tester.cpp index 37a20e4d53..29781be57c 100644 --- a/Autocoders/Python/test/event_throttle/test/ut/Tester.cpp +++ b/Autocoders/Python/test/event_throttle/test/ut/Tester.cpp @@ -82,7 +82,7 @@ namespace Somewhere { void Tester::textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Autocoders/Python/test/event_throttle/test/ut/Tester.hpp b/Autocoders/Python/test/event_throttle/test/ut/Tester.hpp index ae7201575b..00e70f1c89 100644 --- a/Autocoders/Python/test/event_throttle/test/ut/Tester.hpp +++ b/Autocoders/Python/test/event_throttle/test/ut/Tester.hpp @@ -65,7 +65,7 @@ namespace Somewhere { void textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); // ---------------------------------------------------------------------- diff --git a/Autocoders/Python/test/ext_dict/ExampleComponentImpl.cpp b/Autocoders/Python/test/ext_dict/ExampleComponentImpl.cpp index 0ee38dfbef..b54d80386d 100644 --- a/Autocoders/Python/test/ext_dict/ExampleComponentImpl.cpp +++ b/Autocoders/Python/test/ext_dict/ExampleComponentImpl.cpp @@ -46,7 +46,7 @@ namespace ExampleComponents { // write a value to a telemetry channel U32 chan = 12; this->tlmWrite_somechan(chan); - this->cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::OK); } void ExampleComponentImpl::TEST_CMD_2_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2) { @@ -54,7 +54,7 @@ namespace ExampleComponents { this->log_ACTIVITY_HI_SomeEvent(opCode,arg2, 0, str,ExampleComponentBase::EVENT_MEMB3); U32 chan = 0; this->tlmWrite_anotherchan(chan); // cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } diff --git a/Autocoders/Python/test/log_tester/TestTextLogImpl.cpp b/Autocoders/Python/test/log_tester/TestTextLogImpl.cpp index 5f8862a231..b069ad4107 100644 --- a/Autocoders/Python/test/log_tester/TestTextLogImpl.cpp +++ b/Autocoders/Python/test/log_tester/TestTextLogImpl.cpp @@ -24,8 +24,8 @@ void LogTextImpl::init(void) { Log::LogTesterComponentBase::init(); } -void LogTextImpl::textLogRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::TextLogSeverity severity, Fw::TextLogString &text) { - printf("Log id %d, time (%d,%d:%d), severity %d, text \"%s\"",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity,text.toChar()); +void LogTextImpl::textLogRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::TextLogString &text) { + printf("Log id %d, time (%d,%d:%d), severity %d, text \"%s\"",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity.e,text.toChar()); } diff --git a/Autocoders/Python/test/log_tester/TestTextLogImpl.hpp b/Autocoders/Python/test/log_tester/TestTextLogImpl.hpp index b4e09d7b3d..c651d746fb 100644 --- a/Autocoders/Python/test/log_tester/TestTextLogImpl.hpp +++ b/Autocoders/Python/test/log_tester/TestTextLogImpl.hpp @@ -21,7 +21,7 @@ class LogTextImpl: public Log::LogTesterComponentBase { void init(void); void setTime(Fw::Time time); protected: - void textLogRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::TextLogSeverity severity, Fw::TextLogString &text); + void textLogRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::TextLogString &text); private: }; diff --git a/Autocoders/Python/test/param1/TestPrmImpl.cpp b/Autocoders/Python/test/param1/TestPrmImpl.cpp index 2cb37551d4..d31a124f40 100644 --- a/Autocoders/Python/test/param1/TestPrmImpl.cpp +++ b/Autocoders/Python/test/param1/TestPrmImpl.cpp @@ -28,8 +28,8 @@ void TestPrmImpl::aport_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5, U8 } void TestPrmImpl::printParam(void) { - Fw::ParamValid valid = Fw::PARAM_INVALID; + Fw::ParamValid valid = Fw::ParamValid::INVALID; const U32& prmRef = this->paramGet_someparam(valid); - printf("Parameter is: %d %s\n",prmRef,valid==Fw::PARAM_VALID?"VALID":"INVALID"); + printf("Parameter is: %d %s\n",prmRef,valid==Fw::ParamValid::VALID?"VALID":"INVALID"); } diff --git a/Autocoders/Python/test/param1/TestPrmSourceImpl.cpp b/Autocoders/Python/test/param1/TestPrmSourceImpl.cpp index 7b4a0dfe6b..a48c285e46 100644 --- a/Autocoders/Python/test/param1/TestPrmSourceImpl.cpp +++ b/Autocoders/Python/test/param1/TestPrmSourceImpl.cpp @@ -23,7 +23,7 @@ TestParamSourceImpl::~TestParamSourceImpl() { Fw::ParamValid TestParamSourceImpl::paramGetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { val = this->m_prm; - return Fw::PARAM_VALID; + return Fw::ParamValid::VALID; } void TestParamSourceImpl::paramSetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { diff --git a/Autocoders/Python/test/param_enum/TestPrmImpl.cpp b/Autocoders/Python/test/param_enum/TestPrmImpl.cpp index 7186d14cca..ae51d331a0 100644 --- a/Autocoders/Python/test/param_enum/TestPrmImpl.cpp +++ b/Autocoders/Python/test/param_enum/TestPrmImpl.cpp @@ -28,8 +28,8 @@ void TestPrmImpl::aport_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5, U8 } void TestPrmImpl::printParam(void) { - Fw::ParamValid valid = Fw::PARAM_INVALID; + Fw::ParamValid valid = Fw::ParamValid::INVALID; SomeEnum val = this->paramGet_enumparam(valid); - printf("Parameter is: %d %s\n",val,valid==Fw::PARAM_VALID?"VALID":"INVALID"); + printf("Parameter is: %d %s\n",val,valid==Fw::ParamValid::VALID?"VALID":"INVALID"); } diff --git a/Autocoders/Python/test/param_enum/TestPrmSourceImpl.cpp b/Autocoders/Python/test/param_enum/TestPrmSourceImpl.cpp index 45a44c6469..9325acb2a8 100644 --- a/Autocoders/Python/test/param_enum/TestPrmSourceImpl.cpp +++ b/Autocoders/Python/test/param_enum/TestPrmSourceImpl.cpp @@ -23,7 +23,7 @@ TestParamSourceImpl::~TestParamSourceImpl() { Fw::ParamValid TestParamSourceImpl::paramGetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { val = this->m_prm; - return Fw::PARAM_VALID; + return Fw::ParamValid::VALID; } void TestParamSourceImpl::paramSetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { diff --git a/Autocoders/Python/test/param_multi_inst/TestPrmImpl.cpp b/Autocoders/Python/test/param_multi_inst/TestPrmImpl.cpp index c0852b630b..b7c9bc0d67 100644 --- a/Autocoders/Python/test/param_multi_inst/TestPrmImpl.cpp +++ b/Autocoders/Python/test/param_multi_inst/TestPrmImpl.cpp @@ -28,10 +28,10 @@ void TestPrmImpl::aport_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5, U8 } void TestPrmImpl::printParam(void) { - Fw::ParamValid valid = Fw::PARAM_INVALID; + Fw::ParamValid valid = Fw::ParamValid::INVALID; const U32& prmRef = this->paramGet_someparam(valid); - printf("Parameter is: %d %s\n",prmRef,valid==Fw::PARAM_VALID?"VALID":"INVALID"); + printf("Parameter is: %d %s\n",prmRef,valid==Fw::ParamValid::VALID?"VALID":"INVALID"); } void TestPrmImpl::parameterUpdated(FwPrmIdType id) diff --git a/Autocoders/Python/test/param_multi_inst/TestPrmSourceImpl.cpp b/Autocoders/Python/test/param_multi_inst/TestPrmSourceImpl.cpp index 1cd0972425..5136f64543 100644 --- a/Autocoders/Python/test/param_multi_inst/TestPrmSourceImpl.cpp +++ b/Autocoders/Python/test/param_multi_inst/TestPrmSourceImpl.cpp @@ -23,7 +23,7 @@ TestParamSourceImpl::~TestParamSourceImpl() { Fw::ParamValid TestParamSourceImpl::paramGetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { val = this->m_prm; - return Fw::PARAM_VALID; + return Fw::ParamValid::VALID; } void TestParamSourceImpl::paramSetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { diff --git a/Autocoders/Python/test/param_string/TestPrmImpl.cpp b/Autocoders/Python/test/param_string/TestPrmImpl.cpp index b1edea478a..450cb52781 100644 --- a/Autocoders/Python/test/param_string/TestPrmImpl.cpp +++ b/Autocoders/Python/test/param_string/TestPrmImpl.cpp @@ -28,8 +28,8 @@ void TestPrmImpl::aport_handler(NATIVE_INT_TYPE portNum, I32 arg4, F32 arg5, U8 } void TestPrmImpl::printParam(void) { - Fw::ParamValid valid = Fw::PARAM_INVALID; + Fw::ParamValid valid = Fw::ParamValid::INVALID; const Fw::ParamString& prmRef = this->paramGet_stringparam(valid); - printf("Parameter is: \"%s\" %s\n",prmRef.toChar(),valid==Fw::PARAM_VALID?"VALID":"INVALID"); + printf("Parameter is: \"%s\" %s\n",prmRef.toChar(),valid==Fw::ParamValid::VALID?"VALID":"INVALID"); } diff --git a/Autocoders/Python/test/param_string/TestPrmSourceImpl.cpp b/Autocoders/Python/test/param_string/TestPrmSourceImpl.cpp index 96825771d7..463e587b20 100644 --- a/Autocoders/Python/test/param_string/TestPrmSourceImpl.cpp +++ b/Autocoders/Python/test/param_string/TestPrmSourceImpl.cpp @@ -23,7 +23,7 @@ TestParamSourceImpl::~TestParamSourceImpl() { Fw::ParamValid TestParamSourceImpl::paramGetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { val = this->m_prm; - return Fw::PARAM_VALID; + return Fw::ParamValid::VALID; } void TestParamSourceImpl::paramSetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { diff --git a/Autocoders/Python/test/port_nogen/ExampleComponentImpl.cpp b/Autocoders/Python/test/port_nogen/ExampleComponentImpl.cpp index 40e0f7dfa1..5157275fbf 100644 --- a/Autocoders/Python/test/port_nogen/ExampleComponentImpl.cpp +++ b/Autocoders/Python/test/port_nogen/ExampleComponentImpl.cpp @@ -45,7 +45,7 @@ namespace ExampleComponents { // write a value to a telemetry channel U32 chan = 12; this->tlmWrite_somechan(chan); - this->cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::OK); } void ExampleComponentImpl::TEST_CMD_2_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2) { @@ -53,7 +53,7 @@ namespace ExampleComponents { this->log_FATAL_SomeEvent(opCode,arg2, 0, str,ExampleComponentBase::EVENT_MEMB3); U32 tlmval = 0; this->tlmWrite_anotherchan(tlmval); // cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } diff --git a/Autocoders/Python/test/stress/TestCommandImpl.cpp b/Autocoders/Python/test/stress/TestCommandImpl.cpp index 663b2b1c8b..e4e5a8aa33 100644 --- a/Autocoders/Python/test/stress/TestCommandImpl.cpp +++ b/Autocoders/Python/test/stress/TestCommandImpl.cpp @@ -52,19 +52,19 @@ void TestCommand1Impl::TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I3 } printf("Got command args: %d %s\n", arg1, enum_str); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void TestCommand1Impl::TEST_CMD_2_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2) { printf("Got command args: %d %f\n", arg1, arg2); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void TestCommand1Impl::printParam(void) { - Fw::ParamValid valid = Fw::PARAM_INVALID; + Fw::ParamValid valid = Fw::ParamValid::INVALID; const U32& prmRef = this->paramGet_someparam(valid); - printf("Parameter is: %d %s\n",prmRef,valid==Fw::PARAM_VALID?"VALID":"INVALID"); + printf("Parameter is: %d %s\n",prmRef,valid==Fw::ParamValid::VALID?"VALID":"INVALID"); } void TestCommand1Impl::genTlm(Ref::Gnc::Quaternion val) { diff --git a/Autocoders/Python/test/stress/TestCommandSourceImpl.cpp b/Autocoders/Python/test/stress/TestCommandSourceImpl.cpp index 6f73d03901..1ac10d8301 100644 --- a/Autocoders/Python/test/stress/TestCommandSourceImpl.cpp +++ b/Autocoders/Python/test/stress/TestCommandSourceImpl.cpp @@ -22,7 +22,7 @@ TestCommandSourceImpl::~TestCommandSourceImpl() { void TestCommandSourceImpl::cmdStatusPort_handler( NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, - Fw::CommandResponse response) { + Fw::CmdResponse response) { this->printStatus(response); } @@ -34,25 +34,25 @@ void TestCommandSourceImpl::init(void) { Cmd::CommandTesterComponentBase::init(); } -void TestCommandSourceImpl::printStatus(Fw::CommandResponse response) { - switch (response) { - case Fw::COMMAND_OK: +void TestCommandSourceImpl::printStatus(Fw::CmdResponse response) { + switch (response.e) { + case Fw::CmdResponse::OK: printf("COMMAND OK\n"); break; - case Fw::COMMAND_INVALID_OPCODE: + case Fw::CmdResponse::INVALID_OPCODE: printf("INVALID OPCODE\n"); break; - case Fw::COMMAND_VALIDATION_ERROR: + case Fw::CmdResponse::VALIDATION_ERROR: printf("VALIDATION ERROR\n"); break; - case Fw::COMMAND_FORMAT_ERROR: + case Fw::CmdResponse::FORMAT_ERROR: printf("FORMAT ERROR\n"); break; - case Fw::COMMAND_EXECUTION_ERROR: + case Fw::CmdResponse::EXECUTION_ERROR: printf("EXECUTION ERROR\n"); break; default: - printf("Unknown status %d\n", response); + printf("Unknown status %d\n", response.e); break; } } diff --git a/Autocoders/Python/test/stress/TestCommandSourceImpl.hpp b/Autocoders/Python/test/stress/TestCommandSourceImpl.hpp index f3beefbb8e..980e928ae4 100644 --- a/Autocoders/Python/test/stress/TestCommandSourceImpl.hpp +++ b/Autocoders/Python/test/stress/TestCommandSourceImpl.hpp @@ -22,10 +22,10 @@ class TestCommandSourceImpl: public Cmd::CommandTesterComponentBase { void init(void); void test_TEST_CMD_1(I32 arg1, I32 arg2); protected: - void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response); + void cmdStatusPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response); void cmdRegPort_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode); private: - void printStatus(Fw::CommandResponse response); + void printStatus(Fw::CmdResponse response); }; #endif /* TESTCOMMANDSOURCEIMPL_HPP_ */ diff --git a/Autocoders/Python/test/stress/TestLogRecvImpl.cpp b/Autocoders/Python/test/stress/TestLogRecvImpl.cpp index 1e54019c0f..b5c50e3480 100644 --- a/Autocoders/Python/test/stress/TestLogRecvImpl.cpp +++ b/Autocoders/Python/test/stress/TestLogRecvImpl.cpp @@ -21,7 +21,7 @@ TestLogRecvImpl::~TestLogRecvImpl() { } void TestLogRecvImpl::logRecvPort_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::LogBuffer &args) { - printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity); + printf("Received log %d, Time (%d,%d:%d) severity %d\n",id,timeTag.getTimeBase(),timeTag.getSeconds(),timeTag.getUSeconds(),severity.e); I32 arg1; F32 arg2; U8 arg3; diff --git a/Autocoders/Python/test/stress/TestPrmSourceImpl.cpp b/Autocoders/Python/test/stress/TestPrmSourceImpl.cpp index d7ece85a28..0ecaf855d4 100644 --- a/Autocoders/Python/test/stress/TestPrmSourceImpl.cpp +++ b/Autocoders/Python/test/stress/TestPrmSourceImpl.cpp @@ -32,7 +32,7 @@ void TestParamSourceImpl::setPrm(U32 val) { Fw::ParamValid TestParamSourceImpl::paramGetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { val = this->m_prm; - return Fw::PARAM_VALID; + return Fw::ParamValid::VALID; } void TestParamSourceImpl::paramSetPort_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { diff --git a/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp b/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp index 1720355cba..59b25a3d36 100644 --- a/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp +++ b/Autocoders/Python/test/testgen/MathSenderComponentImpl.cpp @@ -105,7 +105,7 @@ namespace Ref { this->log_ACTIVITY_LO_MS_COMMAND_RECV(val1,val2,opEv); this->mathOut_out(0,val1,val2,opPort); // reply with completion status - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } } // end namespace Ref diff --git a/Autocoders/Python/test/testgen/test/ut/Tester.cpp b/Autocoders/Python/test/testgen/test/ut/Tester.cpp index 9509cb57b9..92b6126587 100644 --- a/Autocoders/Python/test/testgen/test/ut/Tester.cpp +++ b/Autocoders/Python/test/testgen/test/ut/Tester.cpp @@ -65,7 +65,7 @@ namespace Ref { // verify command response was sent ASSERT_CMD_RESPONSE_SIZE(1); // verify the command response was correct as expected - ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::CmdResponse::OK); // reset all telemetry and port history this->clearHistory(); @@ -119,7 +119,7 @@ namespace Ref { // verify command response was sent ASSERT_CMD_RESPONSE_SIZE(1); // verify the command response was correct as expected - ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::CmdResponse::OK); // reset all telemetry and port history this->clearHistory(); @@ -173,7 +173,7 @@ namespace Ref { // verify command response was sent ASSERT_CMD_RESPONSE_SIZE(1); // verify the command response was correct as expected - ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::CmdResponse::OK); // reset all telemetry and port history this->clearHistory(); @@ -227,7 +227,7 @@ namespace Ref { // verify command response was sent ASSERT_CMD_RESPONSE_SIZE(1); // verify the command response was correct as expected - ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,MathSenderComponentBase::OPCODE_MS_DO_MATH,10,Fw::CmdResponse::OK); // reset all telemetry and port history this->clearHistory(); diff --git a/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp b/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp new file mode 100644 index 0000000000..2f1468b5cb --- /dev/null +++ b/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp @@ -0,0 +1,35 @@ +module Drv { + + enum SendStatus { + SEND_OK = 0 @< Send worked as expected + SEND_RETRY = 1 @< Data send should be retried + SEND_ERROR = 2 @< Send error occurred retrying may succeed + } + + port ByteStreamSend( + ref sendBuffer: Fw.Buffer + ) -> SendStatus + + + enum RecvStatus { + RECV_OK = 0 @< Receive worked as expected + RECV_ERROR = 1 @< Receive error occurred retrying may succeed + } + + port ByteStreamRecv( + ref recvBuffer: Fw.Buffer + recvStatus: RecvStatus + ) + + + enum PollStatus { + POLL_OK = 0 @< Poll successfully received data + POLL_RETRY = 1 @< No data available, retry later + POLL_ERROR = 2 @< Error received when polling + } + + port ByteStreamPoll( + ref pollBuffer: Fw.Buffer + ) -> PollStatus + +} diff --git a/Drv/ByteStreamDriverModel/all.do b/Drv/ByteStreamDriverModel/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Drv/ByteStreamDriverModel/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Drv/ByteStreamDriverModel/clean.do b/Drv/ByteStreamDriverModel/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Drv/ByteStreamDriverModel/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Drv/ByteStreamDriverModel/defs.sh b/Drv/ByteStreamDriverModel/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Drv/ByteStreamDriverModel/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Drv/ByteStreamDriverModel/depend.do b/Drv/ByteStreamDriverModel/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Drv/ByteStreamDriverModel/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Drv/ByteStreamDriverModel/locate-uses.do b/Drv/ByteStreamDriverModel/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Drv/ByteStreamDriverModel/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Drv/ByteStreamDriverModel/xml.do b/Drv/ByteStreamDriverModel/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Drv/ByteStreamDriverModel/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Drv/locs.fpp b/Drv/locs.fpp new file mode 100644 index 0000000000..4386c5e3c9 --- /dev/null +++ b/Drv/locs.fpp @@ -0,0 +1,6 @@ +locate port Drv.ByteStreamPoll at "ByteStreamDriverModel/ByteStreamDriverModel.fpp" +locate port Drv.ByteStreamRecv at "ByteStreamDriverModel/ByteStreamDriverModel.fpp" +locate port Drv.ByteStreamSend at "ByteStreamDriverModel/ByteStreamDriverModel.fpp" +locate type Drv.PollStatus at "ByteStreamDriverModel/ByteStreamDriverModel.fpp" +locate type Drv.RecvStatus at "ByteStreamDriverModel/ByteStreamDriverModel.fpp" +locate type Drv.SendStatus at "ByteStreamDriverModel/ByteStreamDriverModel.fpp" diff --git a/Drv/update-locs b/Drv/update-locs new file mode 100755 index 0000000000..76583058af --- /dev/null +++ b/Drv/update-locs @@ -0,0 +1,3 @@ +#!/bin/sh + +fpp-locate-defs `find . -name '*.fpp'` > locs.fpp diff --git a/FPP.adoc b/FPP.adoc new file mode 100644 index 0000000000..81a086e346 --- /dev/null +++ b/FPP.adoc @@ -0,0 +1,21 @@ += FPP + +This branch contains a partial FPP (F Prime Prime) model of +the F Prime core distribution. + +== Requirements + +To build the FPP model, first do the following: + +. Install the +https://github.com/bocchino/redo[redo] +build system. + +. Install the +https://github.com/fprime-community/fpp[FPP compiler]. + +== Building the Model + +To build the FPP model, run `redo -j4` at the command line. +The system will detect the available FPP files and +use them to generate the corresponding F Prime XML files. diff --git a/Fw/Buffer/Buffer.fpp b/Fw/Buffer/Buffer.fpp new file mode 100644 index 0000000000..308edca50c --- /dev/null +++ b/Fw/Buffer/Buffer.fpp @@ -0,0 +1,13 @@ +module Fw { + + type Buffer + + port BufferSend( + ref fwBuffer: Fw.Buffer + ) + + port BufferGet( + $size: U32 + ) -> Fw.Buffer + +} diff --git a/Fw/Buffer/BufferGetPortAi.xml b/Fw/Buffer/BufferGetPortAi.xml index fee8617b7a..877acd785f 100644 --- a/Fw/Buffer/BufferGetPortAi.xml +++ b/Fw/Buffer/BufferGetPortAi.xml @@ -1,10 +1,13 @@ - - Fw/Buffer/Buffer.hpp - - - - - + + + Fw/Buffer/Buffer.hpp + + + + diff --git a/Fw/Buffer/BufferSendPortAi.xml b/Fw/Buffer/BufferSendPortAi.xml index a9097f0780..2e9c17db9f 100644 --- a/Fw/Buffer/BufferSendPortAi.xml +++ b/Fw/Buffer/BufferSendPortAi.xml @@ -1,9 +1,12 @@ - - Fw/Buffer/Buffer.hpp - - - - + + + Fw/Buffer/Buffer.hpp + + + diff --git a/Fw/Buffer/all.do b/Fw/Buffer/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Buffer/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Buffer/clean.do b/Fw/Buffer/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Buffer/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Buffer/defs.sh b/Fw/Buffer/defs.sh new file mode 100644 index 0000000000..e149a1127d --- /dev/null +++ b/Fw/Buffer/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Buffer.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Buffer/depend.do b/Fw/Buffer/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Buffer/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Buffer/locate-uses.do b/Fw/Buffer/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Buffer/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Buffer/xml.do b/Fw/Buffer/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Buffer/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Cmd/CMakeLists.txt b/Fw/Cmd/CMakeLists.txt index b424e0911b..f08ae6faac 100644 --- a/Fw/Cmd/CMakeLists.txt +++ b/Fw/Cmd/CMakeLists.txt @@ -9,11 +9,12 @@ set(MOD_DEPS Fw/Com ) set(SOURCE_FILES - "${CMAKE_CURRENT_LIST_DIR}/CmdPortAi.xml" - "${CMAKE_CURRENT_LIST_DIR}/CmdRegPortAi.xml" - "${CMAKE_CURRENT_LIST_DIR}/CmdResponsePortAi.xml" "${CMAKE_CURRENT_LIST_DIR}/CmdArgBuffer.cpp" "${CMAKE_CURRENT_LIST_DIR}/CmdPacket.cpp" + "${CMAKE_CURRENT_LIST_DIR}/CmdPortAi.xml" + "${CMAKE_CURRENT_LIST_DIR}/CmdRegPortAi.xml" + "${CMAKE_CURRENT_LIST_DIR}/CmdResponseEnumAi.xml" + "${CMAKE_CURRENT_LIST_DIR}/CmdResponsePortAi.xml" "${CMAKE_CURRENT_LIST_DIR}/CmdString.cpp" ) register_fprime_module() diff --git a/Fw/Cmd/Cmd.fpp b/Fw/Cmd/Cmd.fpp new file mode 100644 index 0000000000..01b99fd425 --- /dev/null +++ b/Fw/Cmd/Cmd.fpp @@ -0,0 +1,34 @@ +module Fw { + + type CmdArgBuffer + + @ Command registration port + port CmdReg( + opCode: FwOpcodeType @< Command Op Code + ) + + @ Port for sending commands + port Cmd( + opCode: FwOpcodeType @< Command Op Code + cmdSeq: U32 @< Command Sequence + ref args: CmdArgBuffer @< Buffer containing arguments + ) + + @ Enum representing a command response + enum CmdResponse { + OK = 0 @< Command successfully executed + INVALID_OPCODE = 1 @< Invalid opcode dispatched + VALIDATION_ERROR = 2 @< Command failed validation + FORMAT_ERROR = 3 @< Command failed to deserialize + EXECUTION_ERROR = 4 @< Command had execution error + BUSY = 5 @< Component busy + } + + @ Port for sending command responses + port CmdResponse( + opCode: FwOpcodeType @< Command Op Code + cmdSeq: U32 @< Command Sequence + response: CmdResponse @< The command response argument + ) + +} diff --git a/Fw/Cmd/CmdPortAi.xml b/Fw/Cmd/CmdPortAi.xml index 6b7229677f..ec61cbb69b 100644 --- a/Fw/Cmd/CmdPortAi.xml +++ b/Fw/Cmd/CmdPortAi.xml @@ -1,18 +1,29 @@ - - Fw/Cmd/CmdArgBuffer.hpp - - Command port - - - - Command Op Code - - - Command Sequence - - - Buffer containing arguments - - + + + + + Port for sending commands + + Fw/Cmd/CmdArgBuffer.hpp + + + + Command Op Code + + + + + Command Sequence + + + + + Buffer containing arguments + + + diff --git a/Fw/Cmd/CmdRegPortAi.xml b/Fw/Cmd/CmdRegPortAi.xml index 98078a9899..1b5b4f69b5 100644 --- a/Fw/Cmd/CmdRegPortAi.xml +++ b/Fw/Cmd/CmdRegPortAi.xml @@ -1,11 +1,18 @@ - - - Command registration port - - - - Command Op Code - - + + + + + Command registration port + + + + + Command Op Code + + + diff --git a/Fw/Cmd/CmdResponseEnumAi.xml b/Fw/Cmd/CmdResponseEnumAi.xml new file mode 100644 index 0000000000..4f072ecfab --- /dev/null +++ b/Fw/Cmd/CmdResponseEnumAi.xml @@ -0,0 +1,17 @@ + + + + + + Enum representing a command response + + + + + + + + diff --git a/Fw/Cmd/CmdResponsePortAi.xml b/Fw/Cmd/CmdResponsePortAi.xml index edecd367c7..d6b4ca4d7d 100644 --- a/Fw/Cmd/CmdResponsePortAi.xml +++ b/Fw/Cmd/CmdResponsePortAi.xml @@ -1,25 +1,29 @@ - - - Command port - - - - Command Op Code - - - Command Sequence - - - - - - - - - - - The command response argument - - + + + + + Port for sending command responses + + Fw/Cmd/CmdResponseEnumAi.xml + + + + Command Op Code + + + + + Command Sequence + + + + + The command response argument + + + diff --git a/Fw/Cmd/all.do b/Fw/Cmd/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Cmd/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Cmd/clean.do b/Fw/Cmd/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Cmd/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Cmd/defs.sh b/Fw/Cmd/defs.sh new file mode 100644 index 0000000000..d32610cef4 --- /dev/null +++ b/Fw/Cmd/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Cmd.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Cmd/depend.do b/Fw/Cmd/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Cmd/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Cmd/locate-uses.do b/Fw/Cmd/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Cmd/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Cmd/xml.do b/Fw/Cmd/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Cmd/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Com/Com.fpp b/Fw/Com/Com.fpp new file mode 100644 index 0000000000..8a7d9682fd --- /dev/null +++ b/Fw/Com/Com.fpp @@ -0,0 +1,11 @@ +module Fw { + + type ComBuffer + + @ Port for passing communication packet buffers + port Com( + ref data: ComBuffer @< Buffer containing packet data + context: U32 @< Call context value; meaning chosen by user + ) + +} diff --git a/Fw/Com/ComPortAi.xml b/Fw/Com/ComPortAi.xml index 728cbfe854..417667c84f 100644 --- a/Fw/Com/ComPortAi.xml +++ b/Fw/Com/ComPortAi.xml @@ -1,15 +1,24 @@ - - Fw/Com/ComBuffer.hpp - - Port for passing communication packet buffers - - - - Buffer containing packet data - - - Call context value; meaning chosen by user - - + + + + + Port for passing communication packet buffers + + Fw/Com/ComBuffer.hpp + + + + Buffer containing packet data + + + + + Call context value; meaning chosen by user + + + diff --git a/Fw/Com/all.do b/Fw/Com/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Com/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Com/clean.do b/Fw/Com/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Com/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Com/defs.sh b/Fw/Com/defs.sh new file mode 100644 index 0000000000..3439698e95 --- /dev/null +++ b/Fw/Com/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Com.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Com/depend.do b/Fw/Com/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Com/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Com/locate-uses.do b/Fw/Com/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Com/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Com/xml.do b/Fw/Com/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Com/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Log/CMakeLists.txt b/Fw/Log/CMakeLists.txt index 7cff0a7ec9..55d2950779 100644 --- a/Fw/Log/CMakeLists.txt +++ b/Fw/Log/CMakeLists.txt @@ -9,11 +9,12 @@ set(MOD_DEPS Fw/Com ) set(SOURCE_FILES - "${CMAKE_CURRENT_LIST_DIR}/LogPortAi.xml" - "${CMAKE_CURRENT_LIST_DIR}/LogTextPortAi.xml" "${CMAKE_CURRENT_LIST_DIR}/LogBuffer.cpp" "${CMAKE_CURRENT_LIST_DIR}/LogPacket.cpp" + "${CMAKE_CURRENT_LIST_DIR}/LogPortAi.xml" + "${CMAKE_CURRENT_LIST_DIR}/LogSeverityEnumAi.xml" "${CMAKE_CURRENT_LIST_DIR}/LogString.cpp" + "${CMAKE_CURRENT_LIST_DIR}/LogTextPortAi.xml" "${CMAKE_CURRENT_LIST_DIR}/TextLogString.cpp" ) @@ -29,4 +30,4 @@ set(UT_MOD_DEPS "${FPRIME_FRAMEWORK_PATH}/Fw/Time" "${FPRIME_FRAMEWORK_PATH}/Fw/Types" ) -register_fprime_ut() \ No newline at end of file +register_fprime_ut() diff --git a/Fw/Log/Log.fpp b/Fw/Log/Log.fpp new file mode 100644 index 0000000000..2a300730fb --- /dev/null +++ b/Fw/Log/Log.fpp @@ -0,0 +1,35 @@ +module Fw { + + type LogBuffer + type TextLogString + + @ Enum representing event severity + enum LogSeverity { + FATAL = 1 @< A fatal non-recoverable event + WARNING_HI = 2 @< A serious but recoverable event + WARNING_LO = 3 @< A less serious but recoverable event + COMMAND = 4 @< An activity related to commanding + ACTIVITY_HI = 5 @< Important informational events + ACTIVITY_LO = 6 @< Less important informational events + DIAGNOSTIC = 7 @< Software diagnostic events + } + + @ Event log port + port Log( + $id: FwEventIdType @< Log ID + ref timeTag: Fw.Time @< Time Tag + $severity: LogSeverity @< The severity argument + ref args: LogBuffer @< Buffer containing serialized log entry + ) + + + @ Text event log port + @ Use for development and debugging, turn off for flight + port LogText( + $id: FwEventIdType @< Log ID + ref timeTag: Fw.Time @< Time Tag + $severity: LogSeverity @< The severity argument + ref $text: Fw.TextLogString @< Text of log message + ) + +} diff --git a/Fw/Log/LogPortAi.xml b/Fw/Log/LogPortAi.xml index 36c3287a21..66ea0efeaa 100644 --- a/Fw/Log/LogPortAi.xml +++ b/Fw/Log/LogPortAi.xml @@ -1,31 +1,36 @@ - - Fw/Log/LogBuffer.hpp - Fw/Time/Time.hpp - - Log port - - - - Log ID - - - Time Tag - - - - - - - - - - - - The severity argument - - - Buffer containing serialized log entry - - + + + + + Event log port + + Fw/Log/LogSeverityEnumAi.xml + Fw/Log/LogBuffer.hpp + Fw/Time/Time.hpp + + + + Log ID + + + + + Time Tag + + + + + The severity argument + + + + + Buffer containing serialized log entry + + + diff --git a/Fw/Log/LogSeverityEnumAi.xml b/Fw/Log/LogSeverityEnumAi.xml new file mode 100644 index 0000000000..6403f5e1c6 --- /dev/null +++ b/Fw/Log/LogSeverityEnumAi.xml @@ -0,0 +1,18 @@ + + + + + + Enum representing event severity + + + + + + + + + diff --git a/Fw/Log/LogTextPortAi.xml b/Fw/Log/LogTextPortAi.xml index 39f80b2b77..c7d89d7159 100644 --- a/Fw/Log/LogTextPortAi.xml +++ b/Fw/Log/LogTextPortAi.xml @@ -1,31 +1,37 @@ - - Fw/Time/Time.hpp - Fw/Log/TextLogString.hpp - - Text Log port - meant to be used for development and debugging, turn off for flight - - - - Log ID - - - Time Tag - - - - - - - - - - - - The severity argument - - - Text of log message - - + + + + + Text event log port + Use for development and debugging, turn off for flight + + Fw/Log/LogSeverityEnumAi.xml + Fw/Log/TextLogString.hpp + Fw/Time/Time.hpp + + + + Log ID + + + + + Time Tag + + + + + The severity argument + + + + + Text of log message + + + diff --git a/Fw/Log/all.do b/Fw/Log/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Log/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Log/clean.do b/Fw/Log/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Log/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Log/defs.sh b/Fw/Log/defs.sh new file mode 100644 index 0000000000..8067bf91e1 --- /dev/null +++ b/Fw/Log/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Log.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Log/depend.do b/Fw/Log/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Log/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Log/locate-uses.do b/Fw/Log/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Log/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Log/xml.do b/Fw/Log/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Log/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Prm/CMakeLists.txt b/Fw/Prm/CMakeLists.txt index 1999a7d5ee..4ec3afbe64 100644 --- a/Fw/Prm/CMakeLists.txt +++ b/Fw/Prm/CMakeLists.txt @@ -6,9 +6,10 @@ # #### set(SOURCE_FILES + "${CMAKE_CURRENT_LIST_DIR}/ParamValidEnumAi.xml" + "${CMAKE_CURRENT_LIST_DIR}/PrmBuffer.cpp" "${CMAKE_CURRENT_LIST_DIR}/PrmGetPortAi.xml" "${CMAKE_CURRENT_LIST_DIR}/PrmSetPortAi.xml" - "${CMAKE_CURRENT_LIST_DIR}/PrmBuffer.cpp" "${CMAKE_CURRENT_LIST_DIR}/PrmString.cpp" ) diff --git a/Fw/Prm/ParamBuffer.hpp b/Fw/Prm/ParamBuffer.hpp new file mode 100644 index 0000000000..8bf3f51048 --- /dev/null +++ b/Fw/Prm/ParamBuffer.hpp @@ -0,0 +1,2 @@ +// Work around inconsistent spelling +#include "PrmBuffer.hpp" diff --git a/Fw/Prm/ParamValidEnumAi.xml b/Fw/Prm/ParamValidEnumAi.xml new file mode 100644 index 0000000000..30bba2622e --- /dev/null +++ b/Fw/Prm/ParamValidEnumAi.xml @@ -0,0 +1,15 @@ + + + + + + Enum representing parameter validity + + + + + + diff --git a/Fw/Prm/Prm.fpp b/Fw/Prm/Prm.fpp new file mode 100644 index 0000000000..acfebff860 --- /dev/null +++ b/Fw/Prm/Prm.fpp @@ -0,0 +1,25 @@ +module Fw { + + type ParamBuffer + + @ Enum representing parameter validity + enum ParamValid { + UNINIT = 0 + VALID = 1 + INVALID = 2 + DEFAULT = 3 + } + + @ Port for getting a parameter + port PrmGet( + $id: FwPrmIdType @< Parameter ID + ref val: ParamBuffer @< Buffer containing serialized parameter value + ) -> ParamValid + + @ Port for setting a parameter + port PrmSet( + $id: FwPrmIdType @< Parameter ID + ref val: ParamBuffer @< Buffer containing serialized parameter value + ) + +} diff --git a/Fw/Prm/PrmGetPortAi.xml b/Fw/Prm/PrmGetPortAi.xml index b40ef9ba87..3893a7a1ab 100644 --- a/Fw/Prm/PrmGetPortAi.xml +++ b/Fw/Prm/PrmGetPortAi.xml @@ -1,24 +1,26 @@ - - Fw/Prm/PrmBuffer.hpp - - Parameter port - - - - Parameter ID - - - Buffer containing serialized parameter value - - - - - - - - - - - + + + + + Port for getting a parameter + + Fw/Prm/ParamValidEnumAi.xml + Fw/Prm/ParamBuffer.hpp + + + + Parameter ID + + + + + Buffer containing serialized parameter value + + + + diff --git a/Fw/Prm/PrmSetPortAi.xml b/Fw/Prm/PrmSetPortAi.xml index f8b176c8aa..bd48de839a 100644 --- a/Fw/Prm/PrmSetPortAi.xml +++ b/Fw/Prm/PrmSetPortAi.xml @@ -1,15 +1,24 @@ - - Fw/Prm/PrmBuffer.hpp - - Parameter port - - - - Parameter ID - - - Buffer containing serialized parameter value - - + + + + + Port for setting a parameter + + Fw/Prm/ParamBuffer.hpp + + + + Parameter ID + + + + + Buffer containing serialized parameter value + + + diff --git a/Fw/Prm/all.do b/Fw/Prm/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Prm/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Prm/clean.do b/Fw/Prm/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Prm/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Prm/defs.sh b/Fw/Prm/defs.sh new file mode 100644 index 0000000000..bee9561894 --- /dev/null +++ b/Fw/Prm/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Prm.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Prm/depend.do b/Fw/Prm/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Prm/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Prm/locate-uses.do b/Fw/Prm/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Prm/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Prm/xml.do b/Fw/Prm/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Prm/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Time/Time.fpp b/Fw/Time/Time.fpp new file mode 100644 index 0000000000..80b7f1dc46 --- /dev/null +++ b/Fw/Time/Time.fpp @@ -0,0 +1,10 @@ +module Fw { + + type Time + + @ Time port + port Time( + ref $time: Fw.Time @< The U32 cmd argument + ) + +} diff --git a/Fw/Time/TimePortAi.xml b/Fw/Time/TimePortAi.xml index 3978263cc9..8aaa0f0f05 100644 --- a/Fw/Time/TimePortAi.xml +++ b/Fw/Time/TimePortAi.xml @@ -1,13 +1,19 @@ - - Fw/Time/Time.hpp - - Time port - - - - The U32 cmd argument - - + + + + Time port + + Fw/Time/Time.hpp + + + + The U32 cmd argument + + + diff --git a/Fw/Time/all.do b/Fw/Time/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Time/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Time/clean.do b/Fw/Time/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Time/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Time/defs.sh b/Fw/Time/defs.sh new file mode 100644 index 0000000000..7393355fd8 --- /dev/null +++ b/Fw/Time/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Time.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Time/depend.do b/Fw/Time/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Time/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Time/locate-uses.do b/Fw/Time/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Time/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Time/xml.do b/Fw/Time/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Time/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Tlm/Tlm.fpp b/Fw/Tlm/Tlm.fpp new file mode 100644 index 0000000000..1723043838 --- /dev/null +++ b/Fw/Tlm/Tlm.fpp @@ -0,0 +1,12 @@ +module Fw { + + type TlmBuffer + + @ Telemetry port + port Tlm( + $id: FwChanIdType @< Telemetry Channel ID + ref timeTag: Fw.Time @< Time Tag + ref val: TlmBuffer @< Buffer containing serialized telemetry value + ) + +} diff --git a/Fw/Tlm/TlmPortAi.xml b/Fw/Tlm/TlmPortAi.xml index f7ce174246..bc0224ff4b 100644 --- a/Fw/Tlm/TlmPortAi.xml +++ b/Fw/Tlm/TlmPortAi.xml @@ -1,19 +1,30 @@ - - Fw/Tlm/TlmBuffer.hpp - Fw/Time/Time.hpp - - Telemetry port - - - - Telemetry Channel ID - - - Time Tag - - - Buffer containing serialized telemetry value - - + + + + + Telemetry port + + Fw/Time/Time.hpp + Fw/Tlm/TlmBuffer.hpp + + + + Telemetry Channel ID + + + + + Time Tag + + + + + Buffer containing serialized telemetry value + + + diff --git a/Fw/Tlm/all.do b/Fw/Tlm/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Fw/Tlm/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Fw/Tlm/clean.do b/Fw/Tlm/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Fw/Tlm/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Fw/Tlm/defs.sh b/Fw/Tlm/defs.sh new file mode 100644 index 0000000000..bcd462c2fd --- /dev/null +++ b/Fw/Tlm/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. + +export FPP_FILES=" +Tlm.fpp +" + +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/Tlm/depend.do b/Fw/Tlm/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Fw/Tlm/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Fw/Tlm/locate-uses.do b/Fw/Tlm/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Fw/Tlm/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Fw/Tlm/xml.do b/Fw/Tlm/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Fw/Tlm/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Fw/Types/CMakeLists.txt b/Fw/Types/CMakeLists.txt index 1525e0ab9a..07eedca7e7 100644 --- a/Fw/Types/CMakeLists.txt +++ b/Fw/Types/CMakeLists.txt @@ -10,6 +10,7 @@ set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Assert.cpp" "${CMAKE_CURRENT_LIST_DIR}/BasicTypes.cpp" "${CMAKE_CURRENT_LIST_DIR}/EightyCharString.cpp" + "${CMAKE_CURRENT_LIST_DIR}/FixedLengthString.cpp" "${CMAKE_CURRENT_LIST_DIR}/InternalInterfaceString.cpp" "${CMAKE_CURRENT_LIST_DIR}/MallocAllocator.cpp" "${CMAKE_CURRENT_LIST_DIR}/MemAllocator.cpp" diff --git a/Fw/Types/Types.fpp b/Fw/Types/Types.fpp new file mode 100644 index 0000000000..b06f84ce37 --- /dev/null +++ b/Fw/Types/Types.fpp @@ -0,0 +1,9 @@ +module Fw { + + @ An 80-character string + type EightyCharString + + @ A value of polymorphic type + type PolyType + +} diff --git a/Fw/all.do b/Fw/all.do new file mode 100644 index 0000000000..9a54eb9dbd --- /dev/null +++ b/Fw/all.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +subdir_targets redo-ifchange all diff --git a/Fw/clean.do b/Fw/clean.do new file mode 100644 index 0000000000..63754a36ca --- /dev/null +++ b/Fw/clean.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do +subdir_targets redo clean diff --git a/Fw/defs.sh b/Fw/defs.sh new file mode 100644 index 0000000000..df3b1f1ea3 --- /dev/null +++ b/Fw/defs.sh @@ -0,0 +1,13 @@ +#!/bin/sh -e + +export FPRIME_ROOT=.. +export SUBDIRS=" +Buffer +Cmd +Com +Log +Prm +Time +Tlm +" +. $FPRIME_ROOT/defs-root.sh diff --git a/Fw/locs.fpp b/Fw/locs.fpp new file mode 100644 index 0000000000..e1cdc2a64d --- /dev/null +++ b/Fw/locs.fpp @@ -0,0 +1,25 @@ +locate port Fw.BufferGet at "Buffer/Buffer.fpp" +locate port Fw.BufferSend at "Buffer/Buffer.fpp" +locate port Fw.Cmd at "Cmd/Cmd.fpp" +locate port Fw.CmdReg at "Cmd/Cmd.fpp" +locate port Fw.CmdResponse at "Cmd/Cmd.fpp" +locate port Fw.Com at "Com/Com.fpp" +locate port Fw.Log at "Log/Log.fpp" +locate port Fw.LogText at "Log/Log.fpp" +locate port Fw.PrmGet at "Prm/Prm.fpp" +locate port Fw.PrmSet at "Prm/Prm.fpp" +locate port Fw.Time at "Time/Time.fpp" +locate port Fw.Tlm at "Tlm/Tlm.fpp" +locate type Fw.Buffer at "Buffer/Buffer.fpp" +locate type Fw.CmdArgBuffer at "Cmd/Cmd.fpp" +locate type Fw.CmdResponse at "Cmd/Cmd.fpp" +locate type Fw.ComBuffer at "Com/Com.fpp" +locate type Fw.EightyCharString at "Types/Types.fpp" +locate type Fw.LogBuffer at "Log/Log.fpp" +locate type Fw.LogSeverity at "Log/Log.fpp" +locate type Fw.ParamBuffer at "Prm/Prm.fpp" +locate type Fw.ParamValid at "Prm/Prm.fpp" +locate type Fw.PolyType at "Types/Types.fpp" +locate type Fw.TextLogString at "Log/Log.fpp" +locate type Fw.Time at "Time/Time.fpp" +locate type Fw.TlmBuffer at "Tlm/Tlm.fpp" diff --git a/Fw/update-locs b/Fw/update-locs new file mode 100755 index 0000000000..76583058af --- /dev/null +++ b/Fw/update-locs @@ -0,0 +1,3 @@ +#!/bin/sh + +fpp-locate-defs `find . -name '*.fpp'` > locs.fpp diff --git a/Ref/PingReceiver/PingReceiverComponentImpl.cpp b/Ref/PingReceiver/PingReceiverComponentImpl.cpp index 8d6e5e6869..5c1f83e30b 100644 --- a/Ref/PingReceiver/PingReceiverComponentImpl.cpp +++ b/Ref/PingReceiver/PingReceiverComponentImpl.cpp @@ -65,7 +65,7 @@ namespace Ref { U32 cmdSeq /*!< The command sequence number*/ ) { this->m_inhibitPings = true; - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } } // end namespace Ref diff --git a/Ref/SendBuffApp/SendBuffComponentImpl.cpp b/Ref/SendBuffApp/SendBuffComponentImpl.cpp index 39e0b931eb..7aee2be240 100644 --- a/Ref/SendBuffApp/SendBuffComponentImpl.cpp +++ b/Ref/SendBuffApp/SendBuffComponentImpl.cpp @@ -103,12 +103,12 @@ namespace Ref { void SendBuffImpl::SB_START_PKTS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) { this->m_sendPackets = true; this->m_state = SEND_ACTIVE; - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void SendBuffImpl::SB_INJECT_PKT_ERROR_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) { this->m_injectError = true; - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void SendBuffImpl::SB_GEN_FATAL_cmdHandler( @@ -119,7 +119,7 @@ namespace Ref { U32 arg3 /*!< Third FATAL Argument*/ ) { this->log_FATAL_SendBuffFatal(arg1,arg2,arg3); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } //! Handler for command SB_GEN_ASSERT @@ -135,7 +135,7 @@ namespace Ref { U32 arg6 /*!< Sixth ASSERT Argument*/ ) { FW_ASSERT(0,arg1,arg2,arg3,arg4,arg5,arg6); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void SendBuffImpl::parameterUpdated(FwPrmIdType id) { diff --git a/Ref/SignalGen/SignalGen.cpp b/Ref/SignalGen/SignalGen.cpp index 550d18250c..11ea37664d 100644 --- a/Ref/SignalGen/SignalGen.cpp +++ b/Ref/SignalGen/SignalGen.cpp @@ -155,7 +155,7 @@ namespace Ref { this->log_ACTIVITY_LO_SignalGen_SettingsChanged(this->signalFrequency, this->signalAmplitude, this->signalPhase, this->sigType); this->tlmWrite_Type(SigType); - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } void SignalGen :: SignalGen_Toggle_cmdHandler( @@ -164,7 +164,7 @@ namespace Ref { ) { this->running = !this->running; - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } @@ -175,7 +175,7 @@ namespace Ref { ) { this->skipOne = true; - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } }; diff --git a/Ref/SignalGen/SignalGen.fpp b/Ref/SignalGen/SignalGen.fpp new file mode 100644 index 0000000000..16928026b5 --- /dev/null +++ b/Ref/SignalGen/SignalGen.fpp @@ -0,0 +1,25 @@ +module Ref { + + struct SignalPair { + $time: F32 format "{f}" + value: F32 format "{f}" + } + + enum SignalType { + TRIANGLE = 0 + SQUARE = 1 + SINE = 2 + NOISE = 3 + } + + array SignalPairSet = [4] Ref.SignalPair + + array SignalSet = [4] F32 format "{f}" + + struct SignalInfo { + $type: Ref.SignalType + history: Ref.SignalSet + pairHistory: Ref.SignalPairSet + } + +} diff --git a/Ref/SignalGen/SignalInfoSerializableAi.xml b/Ref/SignalGen/SignalInfoSerializableAi.xml index c96d5b3e12..be83437f2f 100644 --- a/Ref/SignalGen/SignalInfoSerializableAi.xml +++ b/Ref/SignalGen/SignalInfoSerializableAi.xml @@ -1,16 +1,16 @@ - - - Ref/SignalGen/SignalTypeEnumAi.xml - Ref/SignalGen/SignalSetArrayAi.xml - Ref/SignalGen/SignalPairSetArrayAi.xml - - - - - + + + Ref/SignalGen/SignalPairSetArrayAi.xml + Ref/SignalGen/SignalSetArrayAi.xml + Ref/SignalGen/SignalTypeEnumAi.xml + + + + + diff --git a/Ref/SignalGen/SignalPairSerializableAi.xml b/Ref/SignalGen/SignalPairSerializableAi.xml index cfa09724db..9968fab373 100644 --- a/Ref/SignalGen/SignalPairSerializableAi.xml +++ b/Ref/SignalGen/SignalPairSerializableAi.xml @@ -1,14 +1,12 @@ - - - Ref/SignalGen/SignalTypeEnumAi.xml - Ref/SignalGen/SignalSetArrayAi.xml - - - - + + + + + + diff --git a/Ref/SignalGen/SignalPairSetArrayAi.xml b/Ref/SignalGen/SignalPairSetArrayAi.xml index f6fea8b892..512b6d1a80 100644 --- a/Ref/SignalGen/SignalPairSetArrayAi.xml +++ b/Ref/SignalGen/SignalPairSetArrayAi.xml @@ -1,20 +1,18 @@ - - - Ref/SignalGen/SignalPairSerializableAi.xml - - Ref::SignalPair - 4 - %s - - - Ref::SignalPair() - Ref::SignalPair() - Ref::SignalPair() - Ref::SignalPair() - + + + Ref/SignalGen/SignalPairSerializableAi.xml + Ref::SignalPair + 4 + %s + + Ref::SignalPair(0.0, 0.0) + Ref::SignalPair(0.0, 0.0) + Ref::SignalPair(0.0, 0.0) + Ref::SignalPair(0.0, 0.0) + diff --git a/Ref/SignalGen/SignalSetArrayAi.xml b/Ref/SignalGen/SignalSetArrayAi.xml index 0162f23bd8..6fc1428bc2 100644 --- a/Ref/SignalGen/SignalSetArrayAi.xml +++ b/Ref/SignalGen/SignalSetArrayAi.xml @@ -1,19 +1,17 @@ - - - F32 - 4 - %f - - - - 0.0f - 0.0f - 0.0f - 0.0f - + + + F32 + 4 + %f + + 0.0 + 0.0 + 0.0 + 0.0 + diff --git a/Ref/SignalGen/SignalTypeEnumAi.xml b/Ref/SignalGen/SignalTypeEnumAi.xml index 0a41d6db87..c8ee656a23 100644 --- a/Ref/SignalGen/SignalTypeEnumAi.xml +++ b/Ref/SignalGen/SignalTypeEnumAi.xml @@ -1,8 +1,12 @@ - - Enum of different supported signal types. - - - - + + + + + + + diff --git a/Ref/SignalGen/all.do b/Ref/SignalGen/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Ref/SignalGen/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Ref/SignalGen/check.xml b/Ref/SignalGen/check.xml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Ref/SignalGen/clean.do b/Ref/SignalGen/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Ref/SignalGen/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Ref/SignalGen/defs.sh b/Ref/SignalGen/defs.sh new file mode 100644 index 0000000000..2f331f1d43 --- /dev/null +++ b/Ref/SignalGen/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export REF_ROOT=.. +export FPP_FILES=`basename $PWD`.fpp + +. $REF_ROOT/defs-root.sh diff --git a/Ref/SignalGen/depend.do b/Ref/SignalGen/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Ref/SignalGen/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Ref/SignalGen/locate-uses.do b/Ref/SignalGen/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Ref/SignalGen/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Ref/SignalGen/xml.do b/Ref/SignalGen/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Ref/SignalGen/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Ref/SignalGen/xml/SignalPairSerializableAi.xml b/Ref/SignalGen/xml/SignalPairSerializableAi.xml new file mode 100644 index 0000000000..9968fab373 --- /dev/null +++ b/Ref/SignalGen/xml/SignalPairSerializableAi.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/Ref/SignalGen/xml/SignalSetArrayAi.xml b/Ref/SignalGen/xml/SignalSetArrayAi.xml new file mode 100644 index 0000000000..6fc1428bc2 --- /dev/null +++ b/Ref/SignalGen/xml/SignalSetArrayAi.xml @@ -0,0 +1,17 @@ + + + + + F32 + 4 + %f + + 0.0 + 0.0 + 0.0 + 0.0 + + diff --git a/Ref/SignalGen/xml/SignalTypeEnumAi.xml b/Ref/SignalGen/xml/SignalTypeEnumAi.xml new file mode 100644 index 0000000000..c8ee656a23 --- /dev/null +++ b/Ref/SignalGen/xml/SignalTypeEnumAi.xml @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/Ref/all.do b/Ref/all.do new file mode 100644 index 0000000000..9a54eb9dbd --- /dev/null +++ b/Ref/all.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +subdir_targets redo-ifchange all diff --git a/Ref/clean.do b/Ref/clean.do new file mode 100644 index 0000000000..63754a36ca --- /dev/null +++ b/Ref/clean.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do +subdir_targets redo clean diff --git a/Ref/defs-root.sh b/Ref/defs-root.sh new file mode 100644 index 0000000000..19c098c055 --- /dev/null +++ b/Ref/defs-root.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +redo-ifchange $REF_ROOT/defs-root.sh + +export REF_ROOT=`cd $REF_ROOT; echo $PWD` +export FPRIME_ROOT=`cd $REF_ROOT/..; echo $PWD` +export CLIENT_FPP_LOCS=$REF_ROOT/locs.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Ref/defs.sh b/Ref/defs.sh new file mode 100644 index 0000000000..3ce0dbd28a --- /dev/null +++ b/Ref/defs.sh @@ -0,0 +1,7 @@ +#!/bin/sh -e + +export REF_ROOT=. +export SUBDIRS=" +SignalGen +" +. $REF_ROOT/defs-root.sh diff --git a/Ref/locs.fpp b/Ref/locs.fpp new file mode 100644 index 0000000000..f9cafcd134 --- /dev/null +++ b/Ref/locs.fpp @@ -0,0 +1,5 @@ +locate type Ref.SignalInfo at "SignalGen/SignalGen.fpp" +locate type Ref.SignalPair at "SignalGen/SignalGen.fpp" +locate type Ref.SignalPairSet at "SignalGen/SignalGen.fpp" +locate type Ref.SignalSet at "SignalGen/SignalGen.fpp" +locate type Ref.SignalType at "SignalGen/SignalGen.fpp" diff --git a/Ref/update-locs b/Ref/update-locs new file mode 100755 index 0000000000..76583058af --- /dev/null +++ b/Ref/update-locs @@ -0,0 +1,3 @@ +#!/bin/sh + +fpp-locate-defs `find . -name '*.fpp'` > locs.fpp diff --git a/Svc/ActiveLogger/ActiveLogger.fpp b/Svc/ActiveLogger/ActiveLogger.fpp new file mode 100644 index 0000000000..68517642d0 --- /dev/null +++ b/Svc/ActiveLogger/ActiveLogger.fpp @@ -0,0 +1,24 @@ +module Svc { + + @ A component for storing telemetry + active component ActiveLogger { + + + @ Telemetry input port + sync input port LogRecv: Fw.Log + + @ Packet send port + output port PktSend: Fw.Com + + @ FATAL event announce port + output port FatalAnnounce: Svc.FatalEvent + + @ Ping input port + async input port pingIn: [1] Svc.Ping + + @ Ping output port + output port pingOut: [1] Svc.Ping + + } + +} diff --git a/Svc/ActiveLogger/ActiveLoggerImpl.cpp b/Svc/ActiveLogger/ActiveLoggerImpl.cpp index 2fa675a812..fd068867cb 100644 --- a/Svc/ActiveLogger/ActiveLoggerImpl.cpp +++ b/Svc/ActiveLogger/ActiveLoggerImpl.cpp @@ -47,41 +47,41 @@ namespace Svc { // make sure ID is not zero. Zero is reserved for ID filter. FW_ASSERT(id != 0); - switch (severity) { - case Fw::LOG_FATAL: // always pass FATAL + switch (severity.e) { + case Fw::LogSeverity::FATAL: // always pass FATAL break; - case Fw::LOG_WARNING_HI: + case Fw::LogSeverity::WARNING_HI: if (this->m_filterState[FILTER_WARNING_HI].enabled == FILTER_DISABLED) { return; } break; - case Fw::LOG_WARNING_LO: + case Fw::LogSeverity::WARNING_LO: if (this->m_filterState[FILTER_WARNING_LO].enabled == FILTER_DISABLED) { return; } break; - case Fw::LOG_COMMAND: + case Fw::LogSeverity::COMMAND: if (this->m_filterState[FILTER_COMMAND].enabled == FILTER_DISABLED) { return; } break; - case Fw::LOG_ACTIVITY_HI: + case Fw::LogSeverity::ACTIVITY_HI: if (this->m_filterState[FILTER_ACTIVITY_HI].enabled == FILTER_DISABLED) { return; } break; - case Fw::LOG_ACTIVITY_LO: + case Fw::LogSeverity::ACTIVITY_LO: if (this->m_filterState[FILTER_ACTIVITY_LO].enabled == FILTER_DISABLED) { return; } break; - case Fw::LOG_DIAGNOSTIC: + case Fw::LogSeverity::DIAGNOSTIC: if (this->m_filterState[FILTER_DIAGNOSTIC].enabled == FILTER_DISABLED) { return; } break; default: - FW_ASSERT(0,static_cast(severity)); + FW_ASSERT(0,static_cast(severity.e)); return; } @@ -89,17 +89,17 @@ namespace Svc { for (NATIVE_INT_TYPE entry = 0; entry < TELEM_ID_FILTER_SIZE; entry++) { if ( (m_filteredIDs[entry] == id) && - (severity != Fw::LOG_FATAL) + (severity != Fw::LogSeverity::FATAL) ) { return; } } // send event to the logger thread - this->loqQueue_internalInterfaceInvoke(id,timeTag,static_cast(severity),args); + this->loqQueue_internalInterfaceInvoke(id,timeTag,static_cast(severity.e),args); // if connected, announce the FATAL - if (Fw::LOG_FATAL == severity) { + if (Fw::LogSeverity::FATAL == severity.e) { if (this->isConnected_FatalAnnounce_OutputPort(0)) { this->FatalAnnounce_out(0,id); } @@ -126,11 +126,11 @@ namespace Svc { (FilterLevel < FILTER_WARNING_HI) or (FilterEnable < FILTER_ENABLED) or (FilterEnable > FILTER_DISABLED)) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::VALIDATION_ERROR); return; } this->m_filterState[FilterLevel].enabled = FilterEnable; - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void ActiveLoggerImpl::SET_ID_FILTER_cmdHandler( @@ -146,7 +146,7 @@ namespace Svc { case ID_DISABLED: break; default: - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::VALIDATION_ERROR); return; } @@ -154,7 +154,7 @@ namespace Svc { // search list for existing entry for (NATIVE_INT_TYPE entry = 0; entry < TELEM_ID_FILTER_SIZE; entry++) { if (this->m_filteredIDs[entry] == ID) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); this->log_ACTIVITY_HI_ID_FILTER_ENABLED(ID); return; } @@ -163,27 +163,27 @@ namespace Svc { for (NATIVE_INT_TYPE entry = 0; entry < TELEM_ID_FILTER_SIZE; entry++) { if (this->m_filteredIDs[entry] == 0) { this->m_filteredIDs[entry] = ID; - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); this->log_ACTIVITY_HI_ID_FILTER_ENABLED(ID); return; } } // if an empty slot was not found, send an error event this->log_WARNING_LO_ID_FILTER_LIST_FULL(ID); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); } else { // remove ID // search list for existing entry for (NATIVE_INT_TYPE entry = 0; entry < TELEM_ID_FILTER_SIZE; entry++) { if (this->m_filteredIDs[entry] == ID) { this->m_filteredIDs[entry] = 0; // zero entry - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); this->log_ACTIVITY_HI_ID_FILTER_REMOVED(ID); return; } } // if it gets here, wasn't found this->log_WARNING_LO_ID_FILTER_NOT_FOUND(ID); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); } } @@ -208,7 +208,7 @@ namespace Svc { } } - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void ActiveLoggerImpl::pingIn_handler( diff --git a/Svc/ActiveLogger/all.do b/Svc/ActiveLogger/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/ActiveLogger/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/ActiveLogger/clean.do b/Svc/ActiveLogger/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/ActiveLogger/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/ActiveLogger/defs.sh b/Svc/ActiveLogger/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/ActiveLogger/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/ActiveLogger/depend.do b/Svc/ActiveLogger/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/ActiveLogger/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/ActiveLogger/locate-uses.do b/Svc/ActiveLogger/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/ActiveLogger/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.cpp b/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.cpp index c592f9515f..d10a9e4867 100644 --- a/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.cpp +++ b/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.cpp @@ -51,7 +51,7 @@ namespace Svc { void ActiveLoggerImplTester::runEventNominal(void) { REQUIREMENT("AL-001"); - this->writeEvent(29,Fw::LOG_WARNING_HI,10); + this->writeEvent(29,Fw::LogSeverity::WARNING_HI,10); } void ActiveLoggerImplTester::runWithFilters(Fw::LogSeverity filter) { @@ -71,23 +71,23 @@ namespace Svc { this->clearHistory(); ActiveLoggerImpl::EventLevel reportFilterLevel = ActiveLoggerImpl::FILTER_WARNING_HI; - switch (filter) { - case Fw::LOG_WARNING_HI: + switch (filter.e) { + case Fw::LogSeverity::WARNING_HI: reportFilterLevel = ActiveLoggerImpl::FILTER_WARNING_HI; break; - case Fw::LOG_WARNING_LO: + case Fw::LogSeverity::WARNING_LO: reportFilterLevel = ActiveLoggerImpl::FILTER_WARNING_LO; break; - case Fw::LOG_COMMAND: + case Fw::LogSeverity::COMMAND: reportFilterLevel = ActiveLoggerImpl::FILTER_COMMAND; break; - case Fw::LOG_ACTIVITY_HI: + case Fw::LogSeverity::ACTIVITY_HI: reportFilterLevel = ActiveLoggerImpl::FILTER_ACTIVITY_HI; break; - case Fw::LOG_ACTIVITY_LO: + case Fw::LogSeverity::ACTIVITY_LO: reportFilterLevel = ActiveLoggerImpl::FILTER_ACTIVITY_LO; break; - case Fw::LOG_DIAGNOSTIC: + case Fw::LogSeverity::DIAGNOSTIC: reportFilterLevel = ActiveLoggerImpl::FILTER_DIAGNOSTIC; break; default: @@ -102,7 +102,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); this->m_receivedPacket = false; @@ -147,7 +147,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); this->m_receivedPacket = false; @@ -170,7 +170,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_VALIDATION_ERROR + Fw::CmdResponse::VALIDATION_ERROR ); this->clearHistory(); @@ -181,7 +181,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_VALIDATION_ERROR + Fw::CmdResponse::VALIDATION_ERROR ); this->clearHistory(); @@ -192,7 +192,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_VALIDATION_ERROR + Fw::CmdResponse::VALIDATION_ERROR ); this->clearHistory(); @@ -203,14 +203,14 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_VALIDATION_ERROR + Fw::CmdResponse::VALIDATION_ERROR ); } void ActiveLoggerImplTester::runFilterEventNominal(void) { - for (Fw::LogSeverity sev = Fw::LOG_WARNING_HI; sev <= Fw::LOG_DIAGNOSTIC; sev = (Fw::LogSeverity)((NATIVE_INT_TYPE)sev + 1)) { + for (Fw::LogSeverity::t sev = Fw::LogSeverity::WARNING_HI; sev <= Fw::LogSeverity::DIAGNOSTIC; sev = (Fw::LogSeverity::t)((NATIVE_INT_TYPE)sev + 1)) { this->runWithFilters(sev); } @@ -235,7 +235,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_ID_FILTER, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_ID_FILTER_ENABLED_SIZE(1); @@ -251,7 +251,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_ID_FILTER, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_ID_FILTER_ENABLED_SIZE(1); @@ -274,7 +274,7 @@ namespace Svc { this->m_receivedPacket = false; - this->invoke_to_LogRecv(0,id,timeTag,Fw::LOG_ACTIVITY_HI,buff); + this->invoke_to_LogRecv(0,id,timeTag,Fw::LogSeverity::ACTIVITY_HI,buff); // should not get a packet ASSERT_FALSE(this->m_receivedPacket); @@ -295,7 +295,7 @@ namespace Svc { this->m_receivedPacket = false; - this->invoke_to_LogRecv(0,id,timeTag,Fw::LOG_FATAL,buff); + this->invoke_to_LogRecv(0,id,timeTag,Fw::LogSeverity::FATAL,buff); this->m_impl.doDispatch(); // should get a packet anyway @@ -312,7 +312,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_ID_FILTER, cmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_ID_FILTER_LIST_FULL_SIZE(1); @@ -331,7 +331,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_ID_FILTER, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_ID_FILTER_REMOVED_SIZE(1); @@ -350,7 +350,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_ID_FILTER, cmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_ID_FILTER_NOT_FOUND_SIZE(1); @@ -367,7 +367,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_ID_FILTER, cmdSeq, - Fw::COMMAND_VALIDATION_ERROR + Fw::CmdResponse::VALIDATION_ERROR ); ASSERT_EVENTS_SIZE(0); @@ -408,7 +408,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_DUMP_FILTER_STATE, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); ASSERT_EVENTS_SIZE(6+3); ASSERT_EVENTS_SEVERITY_FILTER_STATE_SIZE(6); @@ -433,7 +433,7 @@ namespace Svc { this->m_receivedPacket = false; - this->invoke_to_LogRecv(0,id,timeTag,Fw::LOG_FATAL,buff); + this->invoke_to_LogRecv(0,id,timeTag,Fw::LogSeverity::FATAL,buff); // should not have received packet ASSERT_FALSE(this->m_receivedPacket); @@ -477,7 +477,7 @@ namespace Svc { 0, ActiveLoggerImpl::OPCODE_SET_EVENT_FILTER, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); @@ -489,7 +489,7 @@ namespace Svc { this->m_receivedPacket = false; - this->invoke_to_LogRecv(0,id,timeTag,Fw::LOG_FATAL,buff); + this->invoke_to_LogRecv(0,id,timeTag,Fw::LogSeverity::FATAL,buff); // should not have received packet ASSERT_FALSE(this->m_receivedPacket); @@ -605,7 +605,7 @@ namespace Svc { void ActiveLoggerImplTester::textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.hpp b/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.hpp index 735cef1320..6197f9e954 100644 --- a/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.hpp +++ b/Svc/ActiveLogger/test/ut/ActiveLoggerImplTester.hpp @@ -76,7 +76,7 @@ namespace Svc { void textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); diff --git a/Svc/ActiveLogger/xml.do b/Svc/ActiveLogger/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/ActiveLogger/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/ActiveRateGroup/ActiveRateGroup.fpp b/Svc/ActiveRateGroup/ActiveRateGroup.fpp new file mode 100644 index 0000000000..bcb1c5f0cc --- /dev/null +++ b/Svc/ActiveRateGroup/ActiveRateGroup.fpp @@ -0,0 +1,55 @@ +module Svc { + + @ A rate group active component with input and output scheduler ports + active component ActiveRateGroup { + + @ The rate group cycle input + async input port CycleIn: [1] Cycle \ + drop + + @ Scheduler output port to rate group members + output port RateGroupMemberOut: [$ActiveRateGroupOutputPorts] Sched + + @ Ping input port for health + async input port PingIn: [1] Ping + + @ Ping output port for health + output port PingOut: [1] Ping + + @ Informational event that rate group has started + event RateGroupStarted \ + severity diagnostic \ + id 0 \ + format "Rate group started." + + @ Warning event that rate group has had a cycle slip + event RateGroupCycleSlip( + cycle: U32 @< The cycle where the cycle occurred + ) \ + severity warning high \ + id 1 \ + format "Rate group cycle slipped on cycle {}" + + @ Max execution time rate group + telemetry RgMaxTime: U32 id 0 update on change \ + format "{} us" + + @ Cycle slips for rate group + telemetry RgCycleSlips: U32 id 1 update on change + + # added necessary ports not in the original xml in order to compile + @ Event port for emitting events + event port Log + + @ Event port for emitting text events + text event port LogText + + @ A port for getting the time + time get port Time + + @ A port for emitting telemetry + telemetry port Tlm + + } + +} diff --git a/Svc/ActiveRateGroup/ActiveRateGroupComponentAi.xml b/Svc/ActiveRateGroup/ActiveRateGroupComponentAi.xml index 00c0d1d295..12c3b68df8 100644 --- a/Svc/ActiveRateGroup/ActiveRateGroupComponentAi.xml +++ b/Svc/ActiveRateGroup/ActiveRateGroupComponentAi.xml @@ -1,67 +1,97 @@ - - - Svc/Sched/SchedPortAi.xml - Svc/Cycle/CyclePortAi.xml - Svc/Ping/PingPortAi.xml - A rate group active component with input and output scheduler ports - - - - - The rate group cycle input - - - - - - Scheduler output port to rate group members - - - - - Ping input port for health - + + - - Ping output port for health - + + A rate group active component with input and output scheduler ports + + + Fw/Log/LogPortAi.xml + Fw/Log/LogTextPortAi.xml + Fw/Time/TimePortAi.xml + Fw/Tlm/TlmPortAi.xml + Svc/Cycle/CyclePortAi.xml + Svc/Ping/PingPortAi.xml + Svc/Sched/SchedPortAi.xml + + + + + The rate group cycle input + + + + + Event port for emitting events + + + + + Event port for emitting text events + + + + + Ping input port for health + + + + + Ping output port for health + + + + + Scheduler output port to rate group members + + + + + A port for getting the time + + + + + A port for emitting telemetry + + + + + + + + Informational event that rate group has started + + + + + Warning event that rate group has had a cycle slip + + + + + The cycle where the cycle occurred + + + + + + + + + + Max execution time rate group + + + + + Cycle slips for rate group + + + - - - - - Max execution time rate group - - - - - Cycle slips for rate group - - - - - - - Informational event that rate group has started - - - - - Warning event that rate group has had a cycle slip - - - - The cycle where the cycle occurred - - - - - - diff --git a/Svc/ActiveRateGroup/all.do b/Svc/ActiveRateGroup/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/ActiveRateGroup/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/ActiveRateGroup/clean.do b/Svc/ActiveRateGroup/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/ActiveRateGroup/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/ActiveRateGroup/defs.sh b/Svc/ActiveRateGroup/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/ActiveRateGroup/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/ActiveRateGroup/depend.do b/Svc/ActiveRateGroup/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/ActiveRateGroup/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/ActiveRateGroup/locate-uses.do b/Svc/ActiveRateGroup/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/ActiveRateGroup/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/ActiveRateGroup/xml.do b/Svc/ActiveRateGroup/xml.do new file mode 100644 index 0000000000..f99363bb1f --- /dev/null +++ b/Svc/ActiveRateGroup/xml.do @@ -0,0 +1,15 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" +# Put the AcConstants variable back in for now +# This is a temporary solution so we can commit the XML +# It will go away when we integrate XML code gen into the F Prime build +awk ' +/ $3/ActiveRateGroupComponentAi.tmp.xml +mv $3/ActiveRateGroupComponentAi.tmp.xml $3/ActiveRateGroupComponentAi.xml diff --git a/Svc/ActiveTextLogger/ActiveTextLogger.fpp b/Svc/ActiveTextLogger/ActiveTextLogger.fpp new file mode 100644 index 0000000000..056bb07df7 --- /dev/null +++ b/Svc/ActiveTextLogger/ActiveTextLogger.fpp @@ -0,0 +1,18 @@ +module Svc { + + @ A component for printing text logs to the console and optionally a file + active component ActiveTextLogger { + + @ Logging port + sync input port TextLogger: Fw.LogText + + @ Internal interface to send log text messages to component thread + internal port TextQueue( + $text: string size 256 @< The text string + ) \ + priority 1 \ + drop + + } + +} diff --git a/Svc/ActiveTextLogger/ActiveTextLoggerComponentAi.xml b/Svc/ActiveTextLogger/ActiveTextLoggerComponentAi.xml index 1db7a07779..31b9ff142e 100644 --- a/Svc/ActiveTextLogger/ActiveTextLoggerComponentAi.xml +++ b/Svc/ActiveTextLogger/ActiveTextLoggerComponentAi.xml @@ -1,33 +1,38 @@ - - Fw/Log/LogTextPortAi.xml + + + + + A component for printing text logs to the console and optionally a file + + + Fw/Log/LogTextPortAi.xml + + + + + Logging port + + + + + + + + Internal interface to send log text messages to component thread + + + + + The text string + + + + + - A component for printing text logs to the console and optionally a file - - - - - Logging port - - - - - - - - - Internal interface to send log text messages to component thread - - - - - The text string - - - - - - - diff --git a/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp b/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp index 96b68955f9..92594a5b9c 100644 --- a/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp +++ b/Svc/ActiveTextLogger/ActiveTextLoggerImpl.cpp @@ -37,39 +37,39 @@ namespace Svc { void ActiveTextLoggerComponentImpl::TextLogger_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, - Fw::TextLogSeverity severity, + Fw::LogSeverity severity, Fw::TextLogString &text) { // Currently not doing any input filtering // TKC - 5/3/2018 - remove diagnostic - if (Fw::TEXT_LOG_DIAGNOSTIC == severity) { + if (Fw::LogSeverity::DIAGNOSTIC == severity.e) { return; } // Format the string here, so that it is done in the task context // of the caller. Format doc borrowed from PassiveTextLogger. const char *severityString = "UNKNOWN"; - switch (severity) { - case Fw::TEXT_LOG_FATAL: + switch (severity.e) { + case Fw::LogSeverity::FATAL: severityString = "FATAL"; break; - case Fw::TEXT_LOG_WARNING_HI: + case Fw::LogSeverity::WARNING_HI: severityString = "WARNING_HI"; break; - case Fw::TEXT_LOG_WARNING_LO: + case Fw::LogSeverity::WARNING_LO: severityString = "WARNING_LO"; break; - case Fw::TEXT_LOG_COMMAND: + case Fw::LogSeverity::COMMAND: severityString = "COMMAND"; break; - case Fw::TEXT_LOG_ACTIVITY_HI: + case Fw::LogSeverity::ACTIVITY_HI: severityString = "ACTIVITY_HI"; break; - case Fw::TEXT_LOG_ACTIVITY_LO: + case Fw::LogSeverity::ACTIVITY_LO: severityString = "ACTIVITY_LO"; break; - case Fw::TEXT_LOG_DIAGNOSTIC: + case Fw::LogSeverity::DIAGNOSTIC: severityString = "DIAGNOSTIC"; break; default: diff --git a/Svc/ActiveTextLogger/ActiveTextLoggerImpl.hpp b/Svc/ActiveTextLogger/ActiveTextLoggerImpl.hpp index d26db815ca..2b869b9727 100644 --- a/Svc/ActiveTextLogger/ActiveTextLoggerImpl.hpp +++ b/Svc/ActiveTextLogger/ActiveTextLoggerImpl.hpp @@ -95,7 +95,7 @@ namespace Svc { NATIVE_INT_TYPE portNum, /*!< The port number*/ FwEventIdType id, /*!< Log ID*/ Fw::Time &timeTag, /*!< Time Tag*/ - Fw::TextLogSeverity severity, /*!< The severity argument*/ + Fw::LogSeverity severity, /*!< The severity argument*/ Fw::TextLogString &text /*!< Text of log message*/ ); diff --git a/Svc/ActiveTextLogger/all.do b/Svc/ActiveTextLogger/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/ActiveTextLogger/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/ActiveTextLogger/clean.do b/Svc/ActiveTextLogger/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/ActiveTextLogger/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/ActiveTextLogger/defs.sh b/Svc/ActiveTextLogger/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/ActiveTextLogger/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/ActiveTextLogger/depend.do b/Svc/ActiveTextLogger/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/ActiveTextLogger/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/ActiveTextLogger/locate-uses.do b/Svc/ActiveTextLogger/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/ActiveTextLogger/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/ActiveTextLogger/test/ut/Tester.cpp b/Svc/ActiveTextLogger/test/ut/Tester.cpp index 55a83ab551..d861a25c03 100644 --- a/Svc/ActiveTextLogger/test/ut/Tester.cpp +++ b/Svc/ActiveTextLogger/test/ut/Tester.cpp @@ -51,14 +51,14 @@ namespace Svc { FwEventIdType id = 1; Fw::Time timeTag(TB_NONE,3,6); - Fw::TextLogSeverity severity = Fw::TEXT_LOG_ACTIVITY_HI; + Fw::LogSeverity severity = Fw::LogSeverity::ACTIVITY_HI; Fw::TextLogString text("This component is the greatest!"); this->invoke_to_TextLogger(0,id,timeTag,severity,text); this->component.doDispatch(); id = 2; timeTag.set(TB_PROC_TIME,4,7); - severity = Fw::TEXT_LOG_ACTIVITY_LO; + severity = Fw::LogSeverity::ACTIVITY_LO; text = "This component is the probably the greatest!"; this->invoke_to_TextLogger(0,id,timeTag,severity,text); this->component.doDispatch(); @@ -66,7 +66,7 @@ namespace Svc { // This will output in a different format b/c WORKSTATION_TIME id = 3; timeTag.set(TB_WORKSTATION_TIME,5,876); - severity = Fw::TEXT_LOG_WARNING_LO; + severity = Fw::LogSeverity::WARNING_LO; text = "This component is maybe the greatest!"; this->invoke_to_TextLogger(0,id,timeTag,severity,text); this->component.doDispatch(); @@ -87,7 +87,7 @@ namespace Svc { id = 4; timeTag.set(TB_NONE,5,8); - severity = Fw::TEXT_LOG_WARNING_LO; + severity = Fw::LogSeverity::WARNING_LO; const char* severityString = "WARNING_LO"; text = "This component may be the greatest!"; this->invoke_to_TextLogger(0,id,timeTag,severity,text); @@ -118,7 +118,7 @@ namespace Svc { id = 5; timeTag.set(TB_PROC_TIME,6,9); - severity = Fw::TEXT_LOG_WARNING_HI; + severity = Fw::LogSeverity::WARNING_HI; severityString = "WARNING_HI"; text = "This component is probably not the greatest!"; this->invoke_to_TextLogger(0,id,timeTag,severity,text); @@ -190,7 +190,7 @@ namespace Svc { // Write once to the file: FwEventIdType id = 1; Fw::Time timeTag(TB_NONE,3,6); - Fw::TextLogSeverity severity = Fw::TEXT_LOG_ACTIVITY_HI; + Fw::LogSeverity severity = Fw::LogSeverity::ACTIVITY_HI; const char* severityString = "ACTIVITY_HI"; Fw::TextLogString text("abcd"); this->invoke_to_TextLogger(0,id,timeTag,severity,text); diff --git a/Svc/ActiveTextLogger/xml.do b/Svc/ActiveTextLogger/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/ActiveTextLogger/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/AssertFatalAdapter/test/ut/Tester.cpp b/Svc/AssertFatalAdapter/test/ut/Tester.cpp index 6fd4ae1d93..4181d60707 100644 --- a/Svc/AssertFatalAdapter/test/ut/Tester.cpp +++ b/Svc/AssertFatalAdapter/test/ut/Tester.cpp @@ -123,7 +123,7 @@ namespace Svc { void Tester::textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Svc/AssertFatalAdapter/test/ut/Tester.hpp b/Svc/AssertFatalAdapter/test/ut/Tester.hpp index 35c77d7b80..01ba0c3027 100644 --- a/Svc/AssertFatalAdapter/test/ut/Tester.hpp +++ b/Svc/AssertFatalAdapter/test/ut/Tester.hpp @@ -73,7 +73,7 @@ namespace Svc { void textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); diff --git a/Svc/BufferAccumulator/BufferAccumulator.cpp b/Svc/BufferAccumulator/BufferAccumulator.cpp index fb128291f1..04a76cb7e2 100644 --- a/Svc/BufferAccumulator/BufferAccumulator.cpp +++ b/Svc/BufferAccumulator/BufferAccumulator.cpp @@ -149,7 +149,7 @@ namespace Svc { else { this->send = false; } - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } // ---------------------------------------------------------------------- diff --git a/Svc/BufferLogger/BufferLogger.cpp b/Svc/BufferLogger/BufferLogger.cpp index 4256b13eb3..bf40cab0ab 100644 --- a/Svc/BufferLogger/BufferLogger.cpp +++ b/Svc/BufferLogger/BufferLogger.cpp @@ -112,7 +112,7 @@ namespace Svc { ) { m_file.setBaseName(file); - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } void BufferLogger :: @@ -122,7 +122,7 @@ namespace Svc { ) { m_file.closeAndEmitEvent(); - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } void BufferLogger :: @@ -136,7 +136,7 @@ namespace Svc { if (state == LOGGING_OFF) { m_file.closeAndEmitEvent(); } - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } void BufferLogger :: @@ -148,11 +148,11 @@ namespace Svc { const bool status = m_file.flush(); if(status) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } else { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } } diff --git a/Svc/BufferLogger/test/ut/Logging.cpp b/Svc/BufferLogger/test/ut/Logging.cpp index cb7b9dd0f3..5ec63ddfcf 100644 --- a/Svc/BufferLogger/test/ut/Logging.cpp +++ b/Svc/BufferLogger/test/ut/Logging.cpp @@ -42,7 +42,7 @@ namespace Svc { i, BufferLogger::OPCODE_BL_CLOSEFILE, i, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); } @@ -234,7 +234,7 @@ namespace Svc { 0, BufferLogger::OPCODE_BL_SETLOGGING, 0, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); } diff --git a/Svc/BufferManager/test/ut/Tester.cpp b/Svc/BufferManager/test/ut/Tester.cpp index 3ab33965be..5734129def 100644 --- a/Svc/BufferManager/test/ut/Tester.cpp +++ b/Svc/BufferManager/test/ut/Tester.cpp @@ -567,7 +567,7 @@ namespace Svc { void Tester::textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Svc/BufferManager/test/ut/Tester.hpp b/Svc/BufferManager/test/ut/Tester.hpp index 6dfcf706e2..4d84076e81 100644 --- a/Svc/BufferManager/test/ut/Tester.hpp +++ b/Svc/BufferManager/test/ut/Tester.hpp @@ -79,7 +79,7 @@ namespace Svc { void textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); diff --git a/Svc/CmdDispatcher/CommandDispatcherImpl.cpp b/Svc/CmdDispatcher/CommandDispatcherImpl.cpp index 07f50b62c3..1c8993fdd4 100644 --- a/Svc/CmdDispatcher/CommandDispatcherImpl.cpp +++ b/Svc/CmdDispatcher/CommandDispatcherImpl.cpp @@ -54,31 +54,31 @@ namespace Svc { FW_ASSERT(slotFound,opCode); } - void CommandDispatcherImpl::compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response) { + void CommandDispatcherImpl::compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response) { // check response and log - if (Fw::COMMAND_OK == response) { + if (Fw::CmdResponse::OK == response.e) { this->log_COMMAND_OpCodeCompleted(opCode); } else { this->m_numCmdErrors++; this->tlmWrite_CommandErrors(this->m_numCmdErrors); ErrorResponse evrResp = ERR_UNEXP; - switch (response) { - case Fw::COMMAND_INVALID_OPCODE: + switch (response.e) { + case Fw::CmdResponse::INVALID_OPCODE: evrResp = ERR_INVALID_OPCODE; break; - case Fw::COMMAND_VALIDATION_ERROR: + case Fw::CmdResponse::VALIDATION_ERROR: evrResp = ERR_VALIDATION_ERROR; break; - case Fw::COMMAND_FORMAT_ERROR: + case Fw::CmdResponse::FORMAT_ERROR: evrResp = ERR_FORMAT_ERROR; break; - case Fw::COMMAND_EXECUTION_ERROR: + case Fw::CmdResponse::EXECUTION_ERROR: evrResp = ERR_EXECUTION_ERROR; break; - case Fw::COMMAND_BUSY: + case Fw::CmdResponse::BUSY: evrResp = ERR_BUSY; break; - case Fw::COMMAND_OK: + case Fw::CmdResponse::OK: FW_ASSERT(0); // should never get here break; default: @@ -141,7 +141,7 @@ namespace Svc { } this->log_WARNING_HI_MalformedCommand(serErr); if (this->isConnected_seqCmdStatus_OutputPort(portNum)) { - this->seqCmdStatus_out(portNum,cmdPkt.getOpCode(),context,Fw::COMMAND_VALIDATION_ERROR); + this->seqCmdStatus_out(portNum,cmdPkt.getOpCode(),context,Fw::CmdResponse::VALIDATION_ERROR); } return; } @@ -177,7 +177,7 @@ namespace Svc { if (not pendingFound) { this->log_WARNING_HI_TooManyCommands(cmdPkt.getOpCode()); if (this->isConnected_seqCmdStatus_OutputPort(portNum)) { - this->seqCmdStatus_out(portNum,cmdPkt.getOpCode(),context,Fw::COMMAND_EXECUTION_ERROR); + this->seqCmdStatus_out(portNum,cmdPkt.getOpCode(),context,Fw::CmdResponse::EXECUTION_ERROR); } return; } @@ -196,7 +196,7 @@ namespace Svc { this->m_numCmdErrors++; // Fail command back to port, if connected if (this->isConnected_seqCmdStatus_OutputPort(portNum)) { - this->seqCmdStatus_out(portNum,cmdPkt.getOpCode(),context,Fw::COMMAND_INVALID_OPCODE); + this->seqCmdStatus_out(portNum,cmdPkt.getOpCode(),context,Fw::CmdResponse::INVALID_OPCODE); } this->tlmWrite_CommandErrors(this->m_numCmdErrors); } @@ -209,19 +209,19 @@ namespace Svc { Fw::LogStringArg no_op_string("Hello, World!"); // Log event for NO_OP here. this->log_ACTIVITY_HI_NoOpReceived(); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void CommandDispatcherImpl::CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& arg1) { Fw::LogStringArg msg(arg1.toChar()); // Echo the NO_OP_STRING args here. this->log_ACTIVITY_HI_NoOpStringReceived(msg); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void CommandDispatcherImpl::CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3) { this->log_ACTIVITY_HI_TestCmd1Args(arg1,arg2,arg3); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void CommandDispatcherImpl::CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) { @@ -229,7 +229,7 @@ namespace Svc { for (NATIVE_INT_TYPE entry = 0; entry < CMD_DISPATCHER_SEQUENCER_TABLE_SIZE; entry++) { this->m_sequenceTracker[entry].used = false; } - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void CommandDispatcherImpl::pingIn_handler(NATIVE_INT_TYPE portNum, U32 key) { diff --git a/Svc/CmdDispatcher/CommandDispatcherImpl.hpp b/Svc/CmdDispatcher/CommandDispatcherImpl.hpp index 085a7130df..6593ef4bb9 100644 --- a/Svc/CmdDispatcher/CommandDispatcherImpl.hpp +++ b/Svc/CmdDispatcher/CommandDispatcherImpl.hpp @@ -64,7 +64,7 @@ namespace Svc { //! \param opCode the opcode of the completed command. //! \param cmdSeq the sequence number assigned to the command when it was dispatched //! \param response the completion status of the command - void compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response); + void compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response); //! \brief component command buffer handler //! //! The command buffer handler is called to submit a new diff --git a/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.cpp b/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.cpp index c89b8f3f6f..43a13fe1ad 100644 --- a/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.cpp +++ b/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.cpp @@ -37,7 +37,7 @@ namespace Svc { this->m_cmdSendRcvd = true; } - void CommandDispatcherImplTester::from_seqCmdStatus_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response) { + void CommandDispatcherImplTester::from_seqCmdStatus_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response) { this->m_seqStatusRcvd = true; this->m_seqStatusOpCode = opCode; this->m_seqStatusCmdSeq = cmdSeq; @@ -141,7 +141,7 @@ namespace Svc { this->clearEvents(); this->m_seqStatusRcvd = false; // perform command response - this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::COMMAND_OK); + this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::CmdResponse::OK); ASSERT_EQ(Fw::QueuedComponentBase::MSG_DISPATCH_OK,this->m_impl.doDispatch()); // Check dispatch table @@ -162,7 +162,7 @@ namespace Svc { ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(this->m_seqStatusOpCode,(U32)testOpCode); ASSERT_EQ(this->m_seqStatusCmdSeq,testContext); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_OK); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::OK); } void CommandDispatcherImplTester::runNopCommands(void) { @@ -232,7 +232,7 @@ namespace Svc { ASSERT_EQ(CommandDispatcherImpl::OPCODE_CMD_NO_OP,this->m_seqStatusOpCode); // Verify correct context value is passed back. ASSERT_EQ((U32)12,this->m_seqStatusCmdSeq); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_OK); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::OK); // send NO_OP_STRING command this->clearEvents(); @@ -260,7 +260,7 @@ namespace Svc { ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(CommandDispatcherImpl::OPCODE_CMD_NO_OP_STRING,this->m_seqStatusOpCode); ASSERT_EQ((U32)13,this->m_seqStatusCmdSeq); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_OK); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::OK); // send TEST_CMD_1 command this->m_seqStatusRcvd = false; @@ -291,7 +291,7 @@ namespace Svc { ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(CommandDispatcherImpl::OPCODE_CMD_TEST_CMD_1,this->m_seqStatusOpCode); ASSERT_EQ((U32)14,this->m_seqStatusCmdSeq); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_OK); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::OK); } void CommandDispatcherImplTester::runCommandReregister(void) { @@ -406,7 +406,7 @@ namespace Svc { ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(this->m_seqStatusOpCode,(U32)testOpCode+1); ASSERT_EQ(this->m_seqStatusCmdSeq,testContext); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_INVALID_OPCODE); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::INVALID_OPCODE); } void CommandDispatcherImplTester::runFailedCommand(void) { @@ -501,7 +501,7 @@ namespace Svc { this->clearEvents(); this->m_seqStatusRcvd = false; // perform command response - this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::CmdResponse::EXECUTION_ERROR); ASSERT_EQ(Fw::QueuedComponentBase::MSG_DISPATCH_OK,this->m_impl.doDispatch()); // Check dispatch table @@ -518,7 +518,7 @@ namespace Svc { // Verify status passed back to port ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(this->m_seqStatusCmdSeq,testContext); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::EXECUTION_ERROR); // dispatch a test command currSeq++; @@ -554,7 +554,7 @@ namespace Svc { this->clearEvents(); this->m_seqStatusRcvd = false; // perform command response - this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::COMMAND_INVALID_OPCODE); + this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::CmdResponse::INVALID_OPCODE); ASSERT_EQ(Fw::QueuedComponentBase::MSG_DISPATCH_OK,this->m_impl.doDispatch()); // Check dispatch table @@ -572,7 +572,7 @@ namespace Svc { ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(this->m_seqStatusOpCode,(U32)testOpCode); ASSERT_EQ(testContext,this->m_seqStatusCmdSeq); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_INVALID_OPCODE); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::INVALID_OPCODE); currSeq++; // dispatch a test command @@ -608,7 +608,7 @@ namespace Svc { this->clearEvents(); this->m_seqStatusRcvd = false; // perform command response - this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::CmdResponse::VALIDATION_ERROR); ASSERT_EQ(Fw::QueuedComponentBase::MSG_DISPATCH_OK,this->m_impl.doDispatch()); // Check dispatch table @@ -626,7 +626,7 @@ namespace Svc { ASSERT_TRUE(this->m_seqStatusRcvd); ASSERT_EQ(this->m_seqStatusOpCode,(U32)testOpCode); ASSERT_EQ(testContext,this->m_seqStatusCmdSeq); - ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::COMMAND_VALIDATION_ERROR); + ASSERT_EQ(this->m_seqStatusCmdResponse,Fw::CmdResponse::VALIDATION_ERROR); } void CommandDispatcherImplTester::runInvalidCommand(void) { @@ -873,7 +873,7 @@ namespace Svc { clearHistory(); // send command complete - this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::COMMAND_OK); + this->invoke_to_compCmdStat(0,testOpCode,this->m_cmdSendCmdSeq,Fw::CmdResponse::OK); ASSERT_EQ(Fw::QueuedComponentBase::MSG_DISPATCH_OK,this->m_impl.doDispatch()); // verify no status returned diff --git a/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.hpp b/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.hpp index a9d4456701..7001c483c7 100644 --- a/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.hpp +++ b/Svc/CmdDispatcher/test/ut/CommandDispatcherImplTester.hpp @@ -43,12 +43,12 @@ namespace Svc { U32 m_cmdSendCmdSeq; Fw::CmdArgBuffer m_cmdSendArgs; - void from_seqCmdStatus_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response); + void from_seqCmdStatus_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response); bool m_seqStatusRcvd; FwOpcodeType m_seqStatusOpCode; U32 m_seqStatusCmdSeq; - Fw::CommandResponse m_seqStatusCmdResponse; + Fw::CmdResponse m_seqStatusCmdResponse; }; diff --git a/Svc/CmdSequencer/CmdSequencerImpl.cpp b/Svc/CmdSequencer/CmdSequencerImpl.cpp index 1e9079315c..491586adbd 100644 --- a/Svc/CmdSequencer/CmdSequencerImpl.cpp +++ b/Svc/CmdSequencer/CmdSequencerImpl.cpp @@ -97,13 +97,13 @@ namespace Svc { const Fw::CmdStringArg& fileName) { if (not this->requireRunMode(STOPPED)) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); return; } // load commands if (not this->loadFile(fileName)) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -115,7 +115,7 @@ namespace Svc { this->performCmd_Step(); } - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } void CmdSequencerComponentImpl::CS_VALIDATE_cmdHandler( @@ -125,13 +125,13 @@ namespace Svc { ) { if (!this->requireRunMode(STOPPED)) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); return; } // load commands if (not this->loadFile(fileName)) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -140,7 +140,7 @@ namespace Svc { this->log_ACTIVITY_HI_CS_SequenceValid(this->m_sequence->getLogFileName()); - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } @@ -151,7 +151,7 @@ namespace Svc { ) { if (!this->requireRunMode(STOPPED)) { - this->seqDone_out(0,0,0,Fw::COMMAND_EXECUTION_ERROR); + this->seqDone_out(0,0,0,Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -161,7 +161,7 @@ namespace Svc { Fw::CmdStringArg cmdStr(filename); const bool status = this->loadFile(cmdStr); if (!status) { - this->seqDone_out(0,0,0,Fw::COMMAND_EXECUTION_ERROR); + this->seqDone_out(0,0,0,Fw::CmdResponse::EXECUTION_ERROR); return; } } @@ -169,7 +169,7 @@ namespace Svc { // No sequence loaded this->log_WARNING_LO_CS_NoSequenceActive(); this->error(); - this->seqDone_out(0,0,0,Fw::COMMAND_EXECUTION_ERROR); + this->seqDone_out(0,0,0,Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -194,7 +194,7 @@ namespace Svc { } else { this->log_WARNING_LO_CS_NoSequenceActive(); } - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } // ---------------------------------------------------------------------- @@ -227,7 +227,7 @@ namespace Svc { this->m_executedCount = 0; // write sequence done port with error, if connected if (this->isConnected_seqDone_OutputPort(0)) { - this->seqDone_out(0,0,0,Fw::COMMAND_EXECUTION_ERROR); + this->seqDone_out(0,0,0,Fw::CmdResponse::EXECUTION_ERROR); } } @@ -237,7 +237,7 @@ namespace Svc { NATIVE_INT_TYPE portNum, FwOpcodeType opcode, U32 cmdSeq, - Fw::CommandResponse response + Fw::CmdResponse response ) { if (this->m_runMode == STOPPED) { @@ -246,8 +246,8 @@ namespace Svc { } else { // clear command timeout this->m_cmdTimeoutTimer.clear(); - if (response != Fw::COMMAND_OK) { - this->commandError(this->m_executedCount, opcode, response); + if (response != Fw::CmdResponse::OK) { + this->commandError(this->m_executedCount, opcode, response.e); this->performCmd_Cancel(); } else if (this->m_runMode == RUNNING && this->m_stepMode == AUTO) { // Auto mode @@ -297,17 +297,17 @@ namespace Svc { if (not this->m_sequence->hasMoreRecords()) { // No sequence loaded this->log_WARNING_LO_CS_NoSequenceActive(); - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); return; } if (!this->requireRunMode(STOPPED)) { - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); return; } this->m_runMode = RUNNING; this->performCmd_Step(); this->log_ACTIVITY_HI_CS_CmdStarted(this->m_sequence->getLogFileName()); - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::OK); } void CmdSequencerComponentImpl :: @@ -322,9 +322,9 @@ namespace Svc { this->m_executedCount ); } - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::OK); } else { - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } } @@ -334,9 +334,9 @@ namespace Svc { if (this->requireRunMode(STOPPED)) { this->m_stepMode = AUTO; this->log_ACTIVITY_HI_CS_ModeSwitched(SEQ_AUTO_MODE); - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::OK); } else { - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } } @@ -346,9 +346,9 @@ namespace Svc { if (this->requireRunMode(STOPPED)) { this->m_stepMode = MANUAL; this->log_ACTIVITY_HI_CS_ModeSwitched(SEQ_STEP_MODE); - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::OK); } else { - this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opcode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } } @@ -415,7 +415,7 @@ namespace Svc { this->m_executedCount = 0; // write sequence done port, if connected if (this->isConnected_seqDone_OutputPort(0)) { - this->seqDone_out(0,0,0,Fw::COMMAND_OK); + this->seqDone_out(0,0,0,Fw::CmdResponse::OK); } } diff --git a/Svc/CmdSequencer/CmdSequencerImpl.hpp b/Svc/CmdSequencer/CmdSequencerImpl.hpp index 19efa8b7eb..7239c2a2c6 100644 --- a/Svc/CmdSequencer/CmdSequencerImpl.hpp +++ b/Svc/CmdSequencer/CmdSequencerImpl.hpp @@ -597,7 +597,7 @@ namespace Svc { NATIVE_INT_TYPE portNum, //!< The port number FwOpcodeType opcode, //!< The command opcode U32 cmdSeq, //!< The command sequence number - Fw::CommandResponse response //!< The command response + Fw::CmdResponse response //!< The command response ); //! Handler for input port schedIn diff --git a/Svc/CmdSequencer/test/ut/AMPCS.cpp b/Svc/CmdSequencer/test/ut/AMPCS.cpp index d6179c4ad4..20b39a902e 100644 --- a/Svc/CmdSequencer/test/ut/AMPCS.cpp +++ b/Svc/CmdSequencer/test/ut/AMPCS.cpp @@ -50,7 +50,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events Fw::EightyCharString crcFileName(fileName); @@ -79,7 +79,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); diff --git a/Svc/CmdSequencer/test/ut/Immediate.cpp b/Svc/CmdSequencer/test/ut/Immediate.cpp index 962c93c6ec..cd3aa971b2 100644 --- a/Svc/CmdSequencer/test/ut/Immediate.cpp +++ b/Svc/CmdSequencer/test/ut/Immediate.cpp @@ -182,7 +182,7 @@ namespace Svc { this->component.m_cmdTimeoutTimer.m_state ); // Send command response - this->invoke_to_cmdResponseIn(0, i, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, i, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); if (i < numCommands - 1) { // Assert events diff --git a/Svc/CmdSequencer/test/ut/ImmediateBase.cpp b/Svc/CmdSequencer/test/ut/ImmediateBase.cpp index 15416ca6c4..19d5419130 100644 --- a/Svc/CmdSequencer/test/ut/ImmediateBase.cpp +++ b/Svc/CmdSequencer/test/ut/ImmediateBase.cpp @@ -72,7 +72,7 @@ namespace Svc { ); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); } @@ -102,7 +102,7 @@ namespace Svc { ); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); } void Tester :: @@ -124,7 +124,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_START, startCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -157,7 +157,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_START, startCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -172,7 +172,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_AUTO, autoCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -187,7 +187,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_MANUAL, manualCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -217,7 +217,7 @@ namespace Svc { this->clearAndDispatch(); // Assert seqDone response ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0U, 0U, 0U, Fw::COMMAND_EXECUTION_ERROR); + ASSERT_from_seqDone(0U, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR)); // Assert events ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_CS_NoSequenceActive_SIZE(1); @@ -261,7 +261,7 @@ namespace Svc { ); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); // Send step command. Should return error since no active sequence const U32 stepCmdSeq = 12; this->sendCmd_CS_STEP(0, stepCmdSeq); @@ -272,7 +272,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_STEP, stepCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -318,7 +318,7 @@ namespace Svc { ); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); } void Tester :: @@ -347,7 +347,7 @@ namespace Svc { ); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); } // ---------------------------------------------------------------------- @@ -379,7 +379,7 @@ namespace Svc { this->startNewSequence(fileName); } // Send status back - this->invoke_to_cmdResponseIn(0, i, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, i, 0, Fw::CmdResponse(Fw::CmdResponse::OK)); this->clearAndDispatch(); if (i < numCommands - 1) { // Assert events @@ -417,7 +417,7 @@ namespace Svc { ASSERT_from_comCmdOut(0, comBuff, 0U); if (i == 0) { // Send good status back - this->invoke_to_cmdResponseIn(0, i, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, i, 0, Fw::CmdResponse(Fw::CmdResponse::OK)); this->clearAndDispatch(); // Assert events ASSERT_EVENTS_SIZE(1); @@ -432,7 +432,7 @@ namespace Svc { 0, i, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR) ); this->clearAndDispatch(); // Assert events @@ -443,7 +443,7 @@ namespace Svc { fileName, 1, i, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert telemetry ASSERT_TLM_SIZE(1); @@ -451,7 +451,7 @@ namespace Svc { ASSERT_TLM_CS_Errors(0, 1); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_EXECUTION_ERROR); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR)); } } } diff --git a/Svc/CmdSequencer/test/ut/ImmediateEOS.cpp b/Svc/CmdSequencer/test/ut/ImmediateEOS.cpp index 121b928b1e..1300fbf155 100644 --- a/Svc/CmdSequencer/test/ut/ImmediateEOS.cpp +++ b/Svc/CmdSequencer/test/ut/ImmediateEOS.cpp @@ -147,7 +147,7 @@ namespace Svc { this->component.m_cmdTimeoutTimer.m_state ); // Send command response - this->invoke_to_cmdResponseIn(0, i, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, i, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); // Assert events ASSERT_EVENTS_SIZE(1); diff --git a/Svc/CmdSequencer/test/ut/InvalidFiles.cpp b/Svc/CmdSequencer/test/ut/InvalidFiles.cpp index 8aac93bd4f..1bd9baaf3f 100644 --- a/Svc/CmdSequencer/test/ut/InvalidFiles.cpp +++ b/Svc/CmdSequencer/test/ut/InvalidFiles.cpp @@ -55,7 +55,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events const CmdSequencerComponentImpl::FPrimeSequence::CRC& crc = @@ -92,7 +92,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -111,7 +111,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -143,7 +143,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -176,7 +176,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -200,7 +200,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -238,7 +238,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -266,7 +266,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -295,7 +295,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -319,7 +319,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -338,7 +338,7 @@ namespace Svc { this->clearAndDispatch(); // Assert seqDone response ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0U, 0U, 0U, Fw::COMMAND_EXECUTION_ERROR); + ASSERT_from_seqDone(0U, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR)); // Assert events ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_CS_FileInvalid( @@ -368,7 +368,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR) ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -397,7 +397,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -416,7 +416,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -447,7 +447,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -467,7 +467,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -499,7 +499,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -518,7 +518,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); diff --git a/Svc/CmdSequencer/test/ut/Mixed.cpp b/Svc/CmdSequencer/test/ut/Mixed.cpp index 09575b5dde..88f8f93292 100644 --- a/Svc/CmdSequencer/test/ut/Mixed.cpp +++ b/Svc/CmdSequencer/test/ut/Mixed.cpp @@ -90,7 +90,7 @@ namespace Svc { ASSERT_from_comCmdOut_SIZE(1); ASSERT_from_comCmdOut(0, comBuff, 0U); // Send status back - this->invoke_to_cmdResponseIn(0, 0, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, 0, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); // Assert events ASSERT_EVENTS_SIZE(1); @@ -114,7 +114,7 @@ namespace Svc { ASSERT_from_comCmdOut_SIZE(1); ASSERT_from_comCmdOut(0, comBuff, 0U); // Send status back - this->invoke_to_cmdResponseIn(0, 2, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, 2, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); // Assert events ASSERT_EVENTS_SIZE(1); @@ -149,7 +149,7 @@ namespace Svc { ASSERT_from_comCmdOut_SIZE(1); ASSERT_from_comCmdOut(0, comBuff, 0U); // Send status back - this->invoke_to_cmdResponseIn(0, 4, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, 4, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); // Assert events ASSERT_EVENTS_SIZE(1); @@ -178,7 +178,7 @@ namespace Svc { ASSERT_from_comCmdOut_SIZE(1); ASSERT_from_comCmdOut(0, comBuff, 0U); // Send status back - this->invoke_to_cmdResponseIn(0, 6, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, 6, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); // Assert that timer is clear - no scheduled command ASSERT_EQ( @@ -195,7 +195,7 @@ namespace Svc { ASSERT_TLM_CS_CommandsExecuted(0, 4); // Check for command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); // Run a cycle. Should be no output this->invoke_to_schedIn(0, 0); this->clearAndDispatch(); diff --git a/Svc/CmdSequencer/test/ut/Relative.cpp b/Svc/CmdSequencer/test/ut/Relative.cpp index 10b7474847..2c2bdffb53 100644 --- a/Svc/CmdSequencer/test/ut/Relative.cpp +++ b/Svc/CmdSequencer/test/ut/Relative.cpp @@ -81,7 +81,7 @@ namespace Svc { ASSERT_from_comCmdOut_SIZE(1); ASSERT_from_comCmdOut(0, comBuff, 0U); // Send status back - this->invoke_to_cmdResponseIn(0, i, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, i, 0, Fw::CmdResponse::OK); this->clearAndDispatch(); if (i < numCommands - 1) { // Assert events @@ -112,7 +112,7 @@ namespace Svc { ); // Assert command complete on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_OK); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::OK)); } // No port call ASSERT_from_comCmdOut_SIZE(0); diff --git a/Svc/CmdSequencer/test/ut/Tester.cpp b/Svc/CmdSequencer/test/ut/Tester.cpp index 7410dfd2e1..3e7a877032 100644 --- a/Svc/CmdSequencer/test/ut/Tester.cpp +++ b/Svc/CmdSequencer/test/ut/Tester.cpp @@ -63,7 +63,7 @@ namespace Svc { const NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, - Fw::CommandResponse response + Fw::CmdResponse response ) { this->pushFromPortEntry_seqDone(opCode, cmdSeq, response); @@ -245,7 +245,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, validateCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -288,7 +288,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, validateCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -335,7 +335,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, validateCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -364,7 +364,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, validateCmdSeq, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR) ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -389,7 +389,7 @@ namespace Svc { this->clearAndDispatch(); // Assert seqDone response ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0U, 0U, 0U, Fw::COMMAND_EXECUTION_ERROR); + ASSERT_from_seqDone(0U, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR))); // Assert events ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_CS_NoSequenceActive_SIZE(1); @@ -454,7 +454,7 @@ namespace Svc { ASSERT_EQ(0U, this->component.m_executedCount); // Assert command response on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_EXECUTION_ERROR); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR))); } @@ -468,7 +468,7 @@ namespace Svc { // Run the sequence this->parameterizedAutoByCommand(file, numCommands, bound); // Send unexpected command response - this->invoke_to_cmdResponseIn(0, 0x10, 0, Fw::COMMAND_OK); + this->invoke_to_cmdResponseIn(0, 0x10, 0, Fw::CmdResponse(Fw::CmdResponse::OK)); this->clearAndDispatch(); // Check events ASSERT_EVENTS_SIZE(1); @@ -567,7 +567,7 @@ namespace Svc { textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { @@ -621,7 +621,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); // Assert events ASSERT_EVENTS_SIZE(2); @@ -653,7 +653,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -703,7 +703,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_RUN, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_CS_InvalidMode_SIZE(1); @@ -716,7 +716,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_VALIDATE, 0, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -727,7 +727,7 @@ namespace Svc { this->clearAndDispatch(); // Assert response on seqDone ASSERT_from_seqDone_SIZE(1); - ASSERT_from_seqDone(0, 0U, 0U, Fw::COMMAND_EXECUTION_ERROR); + ASSERT_from_seqDone(0, 0U, 0U, Fw::CmdResponse(Fw::CmdResponse::EXECUTION_ERROR)); // Assert events ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_CS_InvalidMode_SIZE(1); @@ -745,7 +745,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_START, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -784,7 +784,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_MANUAL, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse(Fw::CmdResponse::OK) ); // Assert events ASSERT_EVENTS_SIZE(1); @@ -806,7 +806,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_AUTO, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse(Fw::CmdResponse::OK) ); } @@ -822,7 +822,7 @@ namespace Svc { 0, CmdSequencerComponentBase::OPCODE_CS_STEP, cmdSeq, - Fw::COMMAND_OK + Fw::CmdResponse(Fw::CmdResponse::OK) ); } diff --git a/Svc/CmdSequencer/test/ut/Tester.hpp b/Svc/CmdSequencer/test/ut/Tester.hpp index 90463bad41..762d93fb45 100644 --- a/Svc/CmdSequencer/test/ut/Tester.hpp +++ b/Svc/CmdSequencer/test/ut/Tester.hpp @@ -261,7 +261,7 @@ namespace Svc { const NATIVE_INT_TYPE portNum, //!< The port number FwOpcodeType opCode, //!< Command Op Code U32 cmdSeq, //!< Command Sequence - Fw::CommandResponse response //!< The command response argument + Fw::CmdResponse response //!< The command response argument ); //! Handler for from_comCmdOut @@ -290,7 +290,7 @@ namespace Svc { void textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); #endif diff --git a/Svc/ComLogger/ComLogger.cpp b/Svc/ComLogger/ComLogger.cpp index ea943df241..41830796a2 100644 --- a/Svc/ComLogger/ComLogger.cpp +++ b/Svc/ComLogger/ComLogger.cpp @@ -123,7 +123,7 @@ namespace Svc { ) { this->closeFile(); - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } void ComLogger :: diff --git a/Svc/ComLogger/test/ut/Tester.cpp b/Svc/ComLogger/test/ut/Tester.cpp index c23cd340cc..759628d723 100644 --- a/Svc/ComLogger/test/ut/Tester.cpp +++ b/Svc/ComLogger/test/ut/Tester.cpp @@ -507,7 +507,7 @@ namespace Svc { i, ComLogger::OPCODE_CLOSEFILE, i+1, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); } @@ -535,7 +535,7 @@ namespace Svc { i, ComLogger::OPCODE_CLOSEFILE, i+1, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); } diff --git a/Svc/ComSplitter/ComSplitter.fpp b/Svc/ComSplitter/ComSplitter.fpp new file mode 100644 index 0000000000..62a72ab43f --- /dev/null +++ b/Svc/ComSplitter/ComSplitter.fpp @@ -0,0 +1,11 @@ +module Svc { + + passive component ComSplitter { + + sync input port comIn: [1] Fw.Com + + output port comOut: [5] Fw.Com + + } + +} diff --git a/Svc/ComSplitter/ComSplitterComponentAi.xml b/Svc/ComSplitter/ComSplitterComponentAi.xml index 546f818f0f..978c5bee97 100644 --- a/Svc/ComSplitter/ComSplitterComponentAi.xml +++ b/Svc/ComSplitter/ComSplitterComponentAi.xml @@ -1,12 +1,16 @@ - + + Fw/Com/ComPortAi.xml - - + + diff --git a/Svc/ComSplitter/all.do b/Svc/ComSplitter/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/ComSplitter/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/ComSplitter/clean.do b/Svc/ComSplitter/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/ComSplitter/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/ComSplitter/defs.sh b/Svc/ComSplitter/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/ComSplitter/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/ComSplitter/depend.do b/Svc/ComSplitter/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/ComSplitter/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/ComSplitter/locate-uses.do b/Svc/ComSplitter/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/ComSplitter/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/ComSplitter/xml.do b/Svc/ComSplitter/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/ComSplitter/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/Cycle/Cycle.fpp b/Svc/Cycle/Cycle.fpp new file mode 100644 index 0000000000..b2bcabccd8 --- /dev/null +++ b/Svc/Cycle/Cycle.fpp @@ -0,0 +1,10 @@ +module Svc { + + type TimerVal + + @ Time cycle Port with timestamp argument + port Cycle( + ref cycleStart: Svc.TimerVal @< Cycle start timer value + ) + +} diff --git a/Svc/Cycle/CyclePortAi.xml b/Svc/Cycle/CyclePortAi.xml index d50384e4ce..79e4461608 100644 --- a/Svc/Cycle/CyclePortAi.xml +++ b/Svc/Cycle/CyclePortAi.xml @@ -1,13 +1,19 @@ - - Svc/Cycle/TimerVal.hpp - - Time cycle Port with timestamp argument - - - - Cycle start timer value - - - + + + + Time cycle Port with timestamp argument + + Svc/Cycle/TimerVal.hpp + + + + Cycle start timer value + + + + diff --git a/Svc/Cycle/all.do b/Svc/Cycle/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Cycle/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Cycle/clean.do b/Svc/Cycle/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Cycle/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Cycle/defs.sh b/Svc/Cycle/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Cycle/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Cycle/depend.do b/Svc/Cycle/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Cycle/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Cycle/locate-uses.do b/Svc/Cycle/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Cycle/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Cycle/xml.do b/Svc/Cycle/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Cycle/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/Deframer/Deframer.fpp b/Svc/Deframer/Deframer.fpp new file mode 100644 index 0000000000..ca6fd69d93 --- /dev/null +++ b/Svc/Deframer/Deframer.fpp @@ -0,0 +1,23 @@ +module Svc { + + passive component Deframer { + + output port comOut: [1] Fw.Com + + output port bufferOut: [1] Fw.BufferSend + + output port bufferAllocate: [1] Fw.BufferGet + + output port bufferDeallocate: [1] Fw.BufferSend + + guarded input port framedIn: [1] Drv.ByteStreamRecv + + output port framedDeallocate: [1] Fw.BufferSend + + output port framedPoll: [1] Drv.ByteStreamPoll + + guarded input port schedIn: [1] Svc.Sched + + } + +} diff --git a/Svc/Deframer/DeframerComponentAi.xml b/Svc/Deframer/DeframerComponentAi.xml index 46736ca020..46af815683 100644 --- a/Svc/Deframer/DeframerComponentAi.xml +++ b/Svc/Deframer/DeframerComponentAi.xml @@ -1,40 +1,27 @@ - - Fw/Com/ComPortAi.xml - Fw/Buffer/BufferSendPortAi.xml - Fw/Buffer/BufferGetPortAi.xml - Svc/Sched/SchedPortAi.xml - Drv/ByteStreamDriverModel/ByteStreamRecvPortAi.xml - Drv/ByteStreamDriverModel/ByteStreamPollPortAi.xml - + + - - - + Drv/ByteStreamDriverModel/ByteStreamPollPortAi.xml + Drv/ByteStreamDriverModel/ByteStreamRecvPortAi.xml + Fw/Buffer/BufferGetPortAi.xml + Fw/Buffer/BufferSendPortAi.xml + Fw/Com/ComPortAi.xml + Svc/Sched/SchedPortAi.xml - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - diff --git a/Svc/Deframer/all.do b/Svc/Deframer/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Deframer/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Deframer/clean.do b/Svc/Deframer/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Deframer/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Deframer/defs.sh b/Svc/Deframer/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Deframer/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Deframer/depend.do b/Svc/Deframer/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Deframer/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Deframer/locate-uses.do b/Svc/Deframer/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Deframer/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Deframer/xml.do b/Svc/Deframer/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Deframer/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/Fatal/Fatal.fpp b/Svc/Fatal/Fatal.fpp new file mode 100644 index 0000000000..7955bb50b4 --- /dev/null +++ b/Svc/Fatal/Fatal.fpp @@ -0,0 +1,8 @@ +module Svc { + + @ Fatal announce port with FATAL Event ID + port FatalEvent( + Id: FwEventIdType @< The ID of the FATAL event + ) + +} diff --git a/Svc/Fatal/FatalEventPortAi.xml b/Svc/Fatal/FatalEventPortAi.xml index fe7da01a89..1577d492cf 100644 --- a/Svc/Fatal/FatalEventPortAi.xml +++ b/Svc/Fatal/FatalEventPortAi.xml @@ -1,12 +1,18 @@ - - - Fatal announce port with FATAL Event ID - - - - The ID of the FATAL event - - - + + + + Fatal announce port with FATAL Event ID + + + + + The ID of the FATAL event + + + + diff --git a/Svc/Fatal/all.do b/Svc/Fatal/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Fatal/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Fatal/clean.do b/Svc/Fatal/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Fatal/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Fatal/defs.sh b/Svc/Fatal/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Fatal/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Fatal/depend.do b/Svc/Fatal/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Fatal/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Fatal/locate-uses.do b/Svc/Fatal/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Fatal/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Fatal/xml.do b/Svc/Fatal/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Fatal/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/FatalHandler/FatalHandler.fpp b/Svc/FatalHandler/FatalHandler.fpp new file mode 100644 index 0000000000..08e93b3bd0 --- /dev/null +++ b/Svc/FatalHandler/FatalHandler.fpp @@ -0,0 +1,11 @@ +module Svc { + + @ Handles FATAL calls + passive component FatalHandler { + + @ FATAL event receive port + sync input port FatalReceive: Svc.FatalEvent + + } + +} diff --git a/Svc/FatalHandler/FatalHandlerComponentAi.xml b/Svc/FatalHandler/FatalHandlerComponentAi.xml index 4f71c2b874..0ee40fdef9 100644 --- a/Svc/FatalHandler/FatalHandlerComponentAi.xml +++ b/Svc/FatalHandler/FatalHandlerComponentAi.xml @@ -1,15 +1,23 @@ + + + + + Handles FATAL calls + + + Svc/Fatal/FatalEventPortAi.xml + + + + + FATAL event receive port + + + - - Svc/Fatal/FatalEventPortAi.xml - Handles FATAL calls - - - - FATAL event receive port - - - - diff --git a/Svc/FatalHandler/all.do b/Svc/FatalHandler/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/FatalHandler/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/FatalHandler/clean.do b/Svc/FatalHandler/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/FatalHandler/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/FatalHandler/defs.sh b/Svc/FatalHandler/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/FatalHandler/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/FatalHandler/depend.do b/Svc/FatalHandler/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/FatalHandler/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/FatalHandler/locate-uses.do b/Svc/FatalHandler/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/FatalHandler/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/FatalHandler/xml.do b/Svc/FatalHandler/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/FatalHandler/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/FileDownlink/FileDownlink.cpp b/Svc/FileDownlink/FileDownlink.cpp index 22d3866bf2..ea39aeb98f 100644 --- a/Svc/FileDownlink/FileDownlink.cpp +++ b/Svc/FileDownlink/FileDownlink.cpp @@ -252,7 +252,7 @@ namespace Svc { Os::Queue::QueueStatus status = fileQueue.send((U8 *) &entry, sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING); if(status != Os::Queue::QUEUE_OK) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } } @@ -285,7 +285,7 @@ namespace Svc { Os::Queue::QueueStatus status = fileQueue.send((U8 *) &entry, sizeof(entry), 0, Os::Queue::QUEUE_NONBLOCKING); if(status != Os::Queue::QUEUE_OK) { - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR); } } @@ -299,32 +299,32 @@ namespace Svc { if (this->mode.get() == Mode::DOWNLINK || this->mode.get() == Mode::WAIT) { this->mode.set(Mode::CANCEL); } - this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK); + this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK); } // ---------------------------------------------------------------------- // Private helper methods // ---------------------------------------------------------------------- - Fw::CommandResponse FileDownlink :: + Fw::CmdResponse FileDownlink :: statusToCmdResp(SendFileStatus status) { switch(status.e) { case SendFileStatus::OK: - return Fw::COMMAND_OK; + return Fw::CmdResponse::OK; case SendFileStatus::ERROR: - return Fw::COMMAND_EXECUTION_ERROR; + return Fw::CmdResponse::EXECUTION_ERROR; case SendFileStatus::INVALID: - return Fw::COMMAND_VALIDATION_ERROR; + return Fw::CmdResponse::VALIDATION_ERROR; case SendFileStatus::BUSY: - return Fw::COMMAND_BUSY; + return Fw::CmdResponse::BUSY; default: // Trigger assertion if given unknown status FW_ASSERT(false); } // It's impossible to reach this, but added to suppress gcc missing return warning - return Fw::COMMAND_EXECUTION_ERROR; + return Fw::CmdResponse::EXECUTION_ERROR; } void FileDownlink :: diff --git a/Svc/FileDownlink/FileDownlink.fpp b/Svc/FileDownlink/FileDownlink.fpp new file mode 100644 index 0000000000..824b6c4113 --- /dev/null +++ b/Svc/FileDownlink/FileDownlink.fpp @@ -0,0 +1,15 @@ +module Svc { + + enum SendFileStatus { + OK = 0 + ERROR = 1 + INVALID = 2 + BUSY = 3 + } + + struct SendFileResponse { + status: Svc.SendFileStatus + context: U32 + } + +} diff --git a/Svc/FileDownlink/FileDownlink.hpp b/Svc/FileDownlink/FileDownlink.hpp index 618562eaa6..a397b1320b 100644 --- a/Svc/FileDownlink/FileDownlink.hpp +++ b/Svc/FileDownlink/FileDownlink.hpp @@ -384,7 +384,7 @@ namespace Svc { //Finish the file transfer void finishHelper(bool is_cancel); // Convert internal status enum to a command response; - Fw::CommandResponse statusToCmdResp(SendFileStatus status); + Fw::CmdResponse statusToCmdResp(SendFileStatus status); //Send response after completing file downlink void sendResponse(SendFileStatus resp); diff --git a/Svc/FileDownlink/SendFileResponseSerializableAi.xml b/Svc/FileDownlink/SendFileResponseSerializableAi.xml index 8423255529..cae2be0366 100644 --- a/Svc/FileDownlink/SendFileResponseSerializableAi.xml +++ b/Svc/FileDownlink/SendFileResponseSerializableAi.xml @@ -1,9 +1,13 @@ - - Svc/FileDownlink/SendFileStatusEnumAi.xml - - - - + + + Svc/FileDownlink/SendFileStatusEnumAi.xml + + + + diff --git a/Svc/FileDownlink/SendFileStatusEnumAi.xml b/Svc/FileDownlink/SendFileStatusEnumAi.xml index e1ac6378dd..226e5c4cf9 100644 --- a/Svc/FileDownlink/SendFileStatusEnumAi.xml +++ b/Svc/FileDownlink/SendFileStatusEnumAi.xml @@ -1,8 +1,12 @@ - - Status of file transfer. - - - - + + + + + + + diff --git a/Svc/FileDownlink/all.do b/Svc/FileDownlink/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/FileDownlink/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/FileDownlink/check.xml b/Svc/FileDownlink/check.xml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Svc/FileDownlink/clean.do b/Svc/FileDownlink/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/FileDownlink/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/FileDownlink/defs.sh b/Svc/FileDownlink/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/FileDownlink/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/FileDownlink/depend.do b/Svc/FileDownlink/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/FileDownlink/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/FileDownlink/locate-uses.do b/Svc/FileDownlink/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/FileDownlink/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/FileDownlink/test/ut/Tester.cpp b/Svc/FileDownlink/test/ut/Tester.cpp index d7b2722948..efc93398b5 100644 --- a/Svc/FileDownlink/test/ut/Tester.cpp +++ b/Svc/FileDownlink/test/ut/Tester.cpp @@ -65,7 +65,7 @@ namespace Svc { fileBufferOut.write(sourceFileName); // Send the file and assert COMMAND_OK - this->sendFile(sourceFileName, destFileName, Fw::COMMAND_OK); + this->sendFile(sourceFileName, destFileName, Fw::CmdResponse::OK); // Assert telemetry ASSERT_TLM_SIZE(4); @@ -115,11 +115,11 @@ namespace Svc { const char *const sourceFileName = "missing_directory/source.bin"; const char *const destFileName = "dest.bin"; - // Send the file and assert COMMAND_EXECUTION_ERROR + // Send the file and assert CmdResponse::EXECUTION_ERROR this->sendFile( sourceFileName, destFileName, - (FILEDOWNLINK_COMMAND_FAILURES_DISABLED) ? Fw::COMMAND_OK : Fw::COMMAND_EXECUTION_ERROR + (FILEDOWNLINK_COMMAND_FAILURES_DISABLED) ? Fw::CmdResponse::OK : Fw::CmdResponse::EXECUTION_ERROR ); // Assert telemetry @@ -158,7 +158,7 @@ namespace Svc { this->component.doDispatch(); // Dispatch cancel command // Assert cancelation response ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0, FileDownlink::OPCODE_CANCEL, CMD_SEQ, Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0, FileDownlink::OPCODE_CANCEL, CMD_SEQ, Fw::CmdResponse::OK); this->cmdResponseHistory->clear(); ASSERT_EQ(FileDownlink::Mode::CANCEL, this->component.mode.get()); @@ -166,7 +166,7 @@ namespace Svc { this->component.doDispatch(); // Process return of cancel packet // Ensure initial send file command also receives a response. - Fw::CommandResponse resp = (FILEDOWNLINK_COMMAND_FAILURES_DISABLED) ? Fw::COMMAND_OK : Fw::COMMAND_EXECUTION_ERROR; + Fw::CmdResponse resp = (FILEDOWNLINK_COMMAND_FAILURES_DISABLED) ? Fw::CmdResponse::OK : Fw::CmdResponse::EXECUTION_ERROR; ASSERT_CMD_RESPONSE_SIZE(1); ASSERT_CMD_RESPONSE(0, FileDownlink::OPCODE_SENDFILE, CMD_SEQ, resp); @@ -189,7 +189,7 @@ namespace Svc { ASSERT_EQ(FileDownlink::Mode::IDLE, this->component.mode.get()); // Send a cancel command - this->cancel(Fw::COMMAND_OK); + this->cancel(Fw::CmdResponse::OK); this->component.Run_handler(0,0); // Assert idle mode @@ -216,7 +216,7 @@ namespace Svc { FileBuffer fileBufferOutSubset(dataSubset, sizeof(dataSubset)); // Test send partial past end of file, should return COMMAND_OK but raise an warning event. - Fw::CommandResponse expResp = FILEDOWNLINK_COMMAND_FAILURES_DISABLED ? Fw::COMMAND_OK : Fw::COMMAND_VALIDATION_ERROR; + Fw::CmdResponse expResp = FILEDOWNLINK_COMMAND_FAILURES_DISABLED ? Fw::CmdResponse::OK : Fw::CmdResponse::VALIDATION_ERROR; this->sendFilePartial(sourceFileName, destFileName, expResp, sizeof(data), length); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_DownlinkPartialFail(0, sourceFileName, destFileName, sizeof(data), sizeof(data)); @@ -224,7 +224,7 @@ namespace Svc { this->clearEvents(); // Send the file and assert COMMAND_OK - this->sendFilePartial(sourceFileName, destFileName, Fw::COMMAND_OK, offset, length); + this->sendFilePartial(sourceFileName, destFileName, Fw::CmdResponse::OK, offset, length); // Assert telemetry ASSERT_TLM_SIZE(4); @@ -302,7 +302,7 @@ namespace Svc { this->component.Run_handler(0,0); ASSERT_CMD_RESPONSE_SIZE(1); - Fw::CommandResponse expResp = FILEDOWNLINK_COMMAND_FAILURES_DISABLED ? Fw::COMMAND_OK : Fw::COMMAND_EXECUTION_ERROR; + Fw::CmdResponse expResp = FILEDOWNLINK_COMMAND_FAILURES_DISABLED ? Fw::CmdResponse::OK : Fw::CmdResponse::EXECUTION_ERROR; ASSERT_CMD_RESPONSE(0, FileDownlink::OPCODE_SENDFILE, CMD_SEQ, expResp); // Assert telemetry @@ -523,7 +523,7 @@ namespace Svc { sendFile( const char *const sourceFileName, const char *const destFileName, - const Fw::CommandResponse response + const Fw::CmdResponse response ) { Fw::CmdStringArg sourceCmdStringArg(sourceFileName); @@ -553,7 +553,7 @@ namespace Svc { sendFilePartial( const char *const sourceFileName, //!< The source file name const char *const destFileName, //!< The destination file name - const Fw::CommandResponse response, //!< The expected command response + const Fw::CmdResponse response, //!< The expected command response U32 startIndex, //!< The starting index U32 length //!< The amount of bytes to downlink ) @@ -584,7 +584,7 @@ namespace Svc { } void Tester :: - cancel(const Fw::CommandResponse response) + cancel(const Fw::CmdResponse response) { // Command the File Downlink component to cancel a file downlink this->sendCmd_Cancel(INSTANCE, CMD_SEQ); diff --git a/Svc/FileDownlink/test/ut/Tester.hpp b/Svc/FileDownlink/test/ut/Tester.hpp index 2e63339329..d593fa60f8 100644 --- a/Svc/FileDownlink/test/ut/Tester.hpp +++ b/Svc/FileDownlink/test/ut/Tester.hpp @@ -182,7 +182,7 @@ namespace Svc { void sendFile( const char *const sourceFileName, //!< The source file name const char *const destFileName, //!< The destination file name - const Fw::CommandResponse response //!< The expected command response + const Fw::CmdResponse response //!< The expected command response ); //! Command the FileDownlink component to send a file @@ -191,7 +191,7 @@ namespace Svc { void sendFilePartial( const char *const sourceFileName, //!< The source file name const char *const destFileName, //!< The destination file name - const Fw::CommandResponse response, //!< The expected command response + const Fw::CmdResponse response, //!< The expected command response U32 startIndex, //!< The starting index U32 length //!< The amount of bytes to downlink ); @@ -200,7 +200,7 @@ namespace Svc { //! Assert a command response //! void cancel( - const Fw::CommandResponse response //!< The expected command response + const Fw::CmdResponse response //!< The expected command response ); //! Remove a file diff --git a/Svc/FileDownlink/xml.do b/Svc/FileDownlink/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/FileDownlink/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/FileManager/FileManager.cpp b/Svc/FileManager/FileManager.cpp index 96067e322d..52dc534377 100644 --- a/Svc/FileManager/FileManager.cpp +++ b/Svc/FileManager/FileManager.cpp @@ -271,7 +271,7 @@ namespace Svc { opCode, cmdSeq, (status == Os::FileSystem::OP_OK) ? - Fw::COMMAND_OK : Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::OK : Fw::CmdResponse::EXECUTION_ERROR ); } diff --git a/Svc/FileManager/test/ut/Tester.cpp b/Svc/FileManager/test/ut/Tester.cpp index 652f79858b..8b3f07d2a9 100644 --- a/Svc/FileManager/test/ut/Tester.cpp +++ b/Svc/FileManager/test/ut/Tester.cpp @@ -591,7 +591,7 @@ namespace Svc { 0, opcode, CMD_SEQ, - Fw::COMMAND_OK + Fw::CmdResponse::OK ); ASSERT_EVENTS_SIZE(eventSize); @@ -626,7 +626,7 @@ namespace Svc { 0, opcode, CMD_SEQ, - Fw::COMMAND_EXECUTION_ERROR + Fw::CmdResponse::EXECUTION_ERROR ); ASSERT_EVENTS_SIZE(2); // Starting event + Error diff --git a/Svc/Framer/Framer.fpp b/Svc/Framer/Framer.fpp new file mode 100644 index 0000000000..59bfafa9d6 --- /dev/null +++ b/Svc/Framer/Framer.fpp @@ -0,0 +1,19 @@ +module Svc { + + passive component Framer { + + guarded input port comIn: [1] Fw.Com + + guarded input port bufferIn: [1] Fw.BufferSend + + output port bufferDeallocate: [1] Fw.BufferSend + + output port framedAllocate: [1] Fw.BufferGet + + output port framedOut: [1] Drv.ByteStreamSend + + time get port timeGet + + } + +} diff --git a/Svc/Framer/FramerComponentAi.xml b/Svc/Framer/FramerComponentAi.xml index 6ed5b613f7..5cf09dd405 100644 --- a/Svc/Framer/FramerComponentAi.xml +++ b/Svc/Framer/FramerComponentAi.xml @@ -1,33 +1,24 @@ - - Fw/Time/TimePortAi.xml - Fw/Com/ComPortAi.xml - Fw/Buffer/BufferSendPortAi.xml - Fw/Buffer/BufferGetPortAi.xml - Drv/ByteStreamDriverModel/ByteStreamSendPortAi.xml - + + - - - + Drv/ByteStreamDriverModel/ByteStreamSendPortAi.xml + Fw/Buffer/BufferGetPortAi.xml + Fw/Buffer/BufferSendPortAi.xml + Fw/Com/ComPortAi.xml + Fw/Time/TimePortAi.xml - - + + + + + + + + - - - - - - - - - - - - - - - diff --git a/Svc/Framer/all.do b/Svc/Framer/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Framer/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Framer/clean.do b/Svc/Framer/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Framer/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Framer/defs.sh b/Svc/Framer/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Framer/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Framer/depend.do b/Svc/Framer/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Framer/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Framer/locate-uses.do b/Svc/Framer/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Framer/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Framer/xml.do b/Svc/Framer/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Framer/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/FramingProtocol/DeframingProtocol.cpp b/Svc/FramingProtocol/DeframingProtocol.cpp index 8dad6d8ffa..b9eaf39e83 100644 --- a/Svc/FramingProtocol/DeframingProtocol.cpp +++ b/Svc/FramingProtocol/DeframingProtocol.cpp @@ -22,4 +22,4 @@ void DeframingProtocol::setup(DeframingProtocolInterface& interface) { FW_ASSERT(m_interface == NULL); m_interface = &interface; } -}; \ No newline at end of file +}; diff --git a/Svc/FramingProtocol/FramingProtocol.cpp b/Svc/FramingProtocol/FramingProtocol.cpp index f91190b8ff..c8478b51f3 100644 --- a/Svc/FramingProtocol/FramingProtocol.cpp +++ b/Svc/FramingProtocol/FramingProtocol.cpp @@ -22,4 +22,4 @@ void FramingProtocol::setup(FramingProtocolInterface& interface) { FW_ASSERT(m_interface == NULL); m_interface = &interface; } -}; \ No newline at end of file +}; diff --git a/Svc/Health/HealthComponentImpl.cpp b/Svc/Health/HealthComponentImpl.cpp index 7c1ba7ef2a..225a2e7587 100644 --- a/Svc/Health/HealthComponentImpl.cpp +++ b/Svc/Health/HealthComponentImpl.cpp @@ -152,7 +152,7 @@ namespace Svc { isEnabled = HEALTH_CHECK_ENABLED; } this->log_ACTIVITY_HI_HLTH_CHECK_ENABLE(isEnabled); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } @@ -161,13 +161,13 @@ namespace Svc { NATIVE_INT_TYPE entryIndex = this->findEntry(entry); if (-1 == entryIndex) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::VALIDATION_ERROR); return; } // check enable value if (enable != HealthImpl::HLTH_PING_DISABLED && enable != HealthImpl::HLTH_PING_ENABLED) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::VALIDATION_ERROR); return; } @@ -179,14 +179,14 @@ namespace Svc { Fw::LogStringArg arg; arg = entry; this->log_ACTIVITY_HI_HLTH_CHECK_PING(isEnabled,arg); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } void HealthImpl::HLTH_CHNG_PING_cmdHandler(const FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg& entry, U32 warningValue, U32 fatalValue) { // check to see if entry is in range NATIVE_INT_TYPE entryIndex = this->findEntry(entry); if (-1 == entryIndex) { - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::VALIDATION_ERROR); return; } @@ -195,7 +195,7 @@ namespace Svc { Fw::LogStringArg arg; arg = entry; this->log_WARNING_HI_HLTH_PING_INVALID_VALUES(arg,warningValue,fatalValue); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_VALIDATION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::VALIDATION_ERROR); return; } @@ -203,7 +203,7 @@ namespace Svc { this->m_pingTrackerEntries[entryIndex].entry.fatalCycles = fatalValue; Fw::LogStringArg arg = entry; this->log_ACTIVITY_HI_HLTH_PING_UPDATED(arg,warningValue,fatalValue); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } NATIVE_INT_TYPE HealthImpl::findEntry(Fw::CmdStringArg entry) { diff --git a/Svc/Health/test/ut/Tester.cpp b/Svc/Health/test/ut/Tester.cpp index 514ef5bf70..c692ee4aff 100644 --- a/Svc/Health/test/ut/Tester.cpp +++ b/Svc/Health/test/ut/Tester.cpp @@ -440,7 +440,7 @@ namespace Svc { this->sendCmd_HLTH_PING_ENABLE(0,10,name,HealthComponentBase::HLTH_PING_DISABLED); this->dispatchAll(); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,10,Fw::CmdResponse::OK); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_HLTH_CHECK_PING(0,Svc::HealthComponentBase::HEALTH_PING_DISABLED,name); @@ -469,7 +469,7 @@ namespace Svc { this->sendCmd_HLTH_PING_ENABLE(0,10,name,HealthComponentBase::HLTH_PING_ENABLED); this->dispatchAll(); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,10,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,10,Fw::CmdResponse::OK); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_HLTH_CHECK_PING(0,Svc::HealthComponentBase::HEALTH_PING_ENABLED,name); @@ -674,14 +674,14 @@ namespace Svc { this->dispatchAll(); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,0,Fw::COMMAND_VALIDATION_ERROR); + ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,0,Fw::CmdResponse::VALIDATION_ERROR); //send command with bad ping entry sendCmd_HLTH_PING_ENABLE(0,0,"notask",HealthImpl::HLTH_PING_ENABLED); this->dispatchAll(); ASSERT_CMD_RESPONSE_SIZE(2); - ASSERT_CMD_RESPONSE(1,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,0,Fw::COMMAND_VALIDATION_ERROR); + ASSERT_CMD_RESPONSE(1,HealthComponentBase::OPCODE_HLTH_PING_ENABLE,0,Fw::CmdResponse::VALIDATION_ERROR); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_HLTH_CHECK_LOOKUP_ERROR_SIZE(1); ASSERT_EVENTS_HLTH_CHECK_LOOKUP_ERROR(0,"notask"); @@ -693,7 +693,7 @@ namespace Svc { this->dispatchAll(); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_CHNG_PING,0,Fw::COMMAND_VALIDATION_ERROR); + ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_CHNG_PING,0,Fw::CmdResponse::VALIDATION_ERROR); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_HLTH_PING_INVALID_VALUES_SIZE(1); ASSERT_EVENTS_HLTH_PING_INVALID_VALUES(0,"task0",10,9); @@ -706,7 +706,7 @@ namespace Svc { this->dispatchAll(); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_CHNG_PING,0,Fw::COMMAND_VALIDATION_ERROR); + ASSERT_CMD_RESPONSE(0,HealthComponentBase::OPCODE_HLTH_CHNG_PING,0,Fw::CmdResponse::VALIDATION_ERROR); this->clearEvents(); this->clearHistory(); @@ -757,7 +757,7 @@ namespace Svc { void Tester::textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Svc/Health/test/ut/Tester.hpp b/Svc/Health/test/ut/Tester.hpp index ba36a8e8ff..490849074d 100644 --- a/Svc/Health/test/ut/Tester.hpp +++ b/Svc/Health/test/ut/Tester.hpp @@ -108,7 +108,7 @@ namespace Svc { void textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); diff --git a/Svc/LinuxTimer/LinuxTimer.fpp b/Svc/LinuxTimer/LinuxTimer.fpp new file mode 100644 index 0000000000..f1ab15d70a --- /dev/null +++ b/Svc/LinuxTimer/LinuxTimer.fpp @@ -0,0 +1,11 @@ +module Svc { + + @ A Linux interval timer + passive component LinuxTimer { + + @ Cycle output + output port CycleOut: Cycle + + } + +} diff --git a/Svc/LinuxTimer/LinuxTimerComponentAi.xml b/Svc/LinuxTimer/LinuxTimerComponentAi.xml index b8d272668d..58d41a6f48 100644 --- a/Svc/LinuxTimer/LinuxTimerComponentAi.xml +++ b/Svc/LinuxTimer/LinuxTimerComponentAi.xml @@ -1,15 +1,23 @@ - - Svc/Cycle/CyclePortAi.xml - A Linux interval timer - - - - - Cycle output - - - - + + + + A Linux interval timer + + + Svc/Cycle/CyclePortAi.xml + + + + + Cycle output + + + + + diff --git a/Svc/LinuxTimer/all.do b/Svc/LinuxTimer/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/LinuxTimer/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/LinuxTimer/clean.do b/Svc/LinuxTimer/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/LinuxTimer/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/LinuxTimer/defs.sh b/Svc/LinuxTimer/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/LinuxTimer/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/LinuxTimer/depend.do b/Svc/LinuxTimer/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/LinuxTimer/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/LinuxTimer/locate-uses.do b/Svc/LinuxTimer/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/LinuxTimer/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/LinuxTimer/xml.do b/Svc/LinuxTimer/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/LinuxTimer/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.hpp b/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.hpp index 6a539dff9f..e148e9c251 100644 --- a/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.hpp +++ b/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImpl.hpp @@ -17,7 +17,7 @@ namespace Svc { private: // downcalls for input ports - void TextLogger_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::TextLogSeverity severity, Fw::TextLogString &text); + void TextLogger_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::TextLogString &text); }; } diff --git a/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp b/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp index 8b18268c62..4af64bdacf 100644 --- a/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp +++ b/Svc/PassiveConsoleTextLogger/ConsoleTextLoggerImplCommon.cpp @@ -15,28 +15,28 @@ namespace Svc { ConsoleTextLoggerImpl::~ConsoleTextLoggerImpl(void) {} - void ConsoleTextLoggerImpl::TextLogger_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::TextLogSeverity severity, Fw::TextLogString &text) { + void ConsoleTextLoggerImpl::TextLogger_handler(NATIVE_INT_TYPE portNum, FwEventIdType id, Fw::Time &timeTag, Fw::LogSeverity severity, Fw::TextLogString &text) { const char *severityString = "UNKNOWN"; - switch (severity) { - case Fw::TEXT_LOG_FATAL: + switch (severity.e) { + case Fw::LogSeverity::FATAL: severityString = "FATAL"; break; - case Fw::TEXT_LOG_WARNING_HI: + case Fw::LogSeverity::WARNING_HI: severityString = "WARNING_HI"; break; - case Fw::TEXT_LOG_WARNING_LO: + case Fw::LogSeverity::WARNING_LO: severityString = "WARNING_LO"; break; - case Fw::TEXT_LOG_COMMAND: + case Fw::LogSeverity::COMMAND: severityString = "COMMAND"; break; - case Fw::TEXT_LOG_ACTIVITY_HI: + case Fw::LogSeverity::ACTIVITY_HI: severityString = "ACTIVITY_HI"; break; - case Fw::TEXT_LOG_ACTIVITY_LO: + case Fw::LogSeverity::ACTIVITY_LO: severityString = "ACTIVITY_LO"; break; - case Fw::TEXT_LOG_DIAGNOSTIC: + case Fw::LogSeverity::DIAGNOSTIC: severityString = "DIAGNOSTIC"; break; default: diff --git a/Svc/Ping/Ping.fpp b/Svc/Ping/Ping.fpp new file mode 100644 index 0000000000..3f80ec912b --- /dev/null +++ b/Svc/Ping/Ping.fpp @@ -0,0 +1,8 @@ +module Svc { + + @ Port for pinging active components + port Ping( + key: U32 @< Value to return to pinger + ) + +} diff --git a/Svc/Ping/PingPortAi.xml b/Svc/Ping/PingPortAi.xml index 2d41c11d1b..7d2732e22c 100644 --- a/Svc/Ping/PingPortAi.xml +++ b/Svc/Ping/PingPortAi.xml @@ -1,12 +1,18 @@ - - - Port for pinging active components - - - - Value to return to pinger - - - + + + + Port for pinging active components + + + + + Value to return to pinger + + + + diff --git a/Svc/Ping/all.do b/Svc/Ping/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Ping/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Ping/clean.do b/Svc/Ping/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Ping/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Ping/defs.sh b/Svc/Ping/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Ping/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Ping/depend.do b/Svc/Ping/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Ping/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Ping/locate-uses.do b/Svc/Ping/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Ping/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Ping/xml.do b/Svc/Ping/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Ping/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/PolyDb/PolyDb.fpp b/Svc/PolyDb/PolyDb.fpp new file mode 100644 index 0000000000..0ce7411f12 --- /dev/null +++ b/Svc/PolyDb/PolyDb.fpp @@ -0,0 +1,14 @@ +module Svc { + + @ A component for dispatching commands + passive component PolyDb { + + @ Port to get values + guarded input port getValue: Svc.Poly + + @ Port to set values + guarded input port setValue: Svc.Poly + + } + +} diff --git a/Svc/PolyDb/PolyDbComponentAi.xml b/Svc/PolyDb/PolyDbComponentAi.xml index 213afd98f0..e7f18484c9 100644 --- a/Svc/PolyDb/PolyDbComponentAi.xml +++ b/Svc/PolyDb/PolyDbComponentAi.xml @@ -1,19 +1,28 @@ - - Svc/PolyIf/PolyPortAi.xml - A component for dispatching commands - - - - Port to get values - - - - - Port to set values - - - - + + + + A component for dispatching commands + + + Svc/PolyIf/PolyPortAi.xml + + + + + Port to get values + + + + + Port to set values + + + + + diff --git a/Svc/PolyDb/PolyDbImpl.cpp b/Svc/PolyDb/PolyDbImpl.cpp index 973e2431bb..03310344a0 100644 --- a/Svc/PolyDb/PolyDbImpl.cpp +++ b/Svc/PolyDb/PolyDbImpl.cpp @@ -13,7 +13,7 @@ namespace Svc { PolyDbImpl::PolyDbImpl(const char* name) : PolyDbComponentBase(name) { // initialize all entries to stale for (NATIVE_INT_TYPE entry = 0; entry < POLYDB_NUM_DB_ENTRIES; entry++) { - this->m_db[entry].status = MEASUREMENT_STALE; + this->m_db[entry].status = MeasurementStatus::STALE; } } diff --git a/Svc/PolyDb/PolyDbImpl.hpp b/Svc/PolyDb/PolyDbImpl.hpp index cce08f7aa9..d2180b812c 100644 --- a/Svc/PolyDb/PolyDbImpl.hpp +++ b/Svc/PolyDb/PolyDbImpl.hpp @@ -32,7 +32,7 @@ namespace Svc { public: //! \brief PolyDbImpl constructor //! - //! The constructor initializes the database to "MEASUREMENT_STALE." + //! The constructor initializes the database to "MeasurementStatus::STALE." //! All values retrieved will have this status until the first //! update is received. //! @@ -85,7 +85,7 @@ namespace Svc { //! \brief PolyDb database structure //! //! This structure stores the latest values of the measurements. - //! The statuses are all initialized to MEASUREMENT_STALE by the constructor. + //! The statuses are all initialized to MeasurementStatus::STALE by the constructor. //! struct t_dbStruct { diff --git a/Svc/PolyDb/all.do b/Svc/PolyDb/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/PolyDb/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/PolyDb/clean.do b/Svc/PolyDb/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/PolyDb/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/PolyDb/defs.sh b/Svc/PolyDb/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/PolyDb/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/PolyDb/depend.do b/Svc/PolyDb/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/PolyDb/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/PolyDb/locate-uses.do b/Svc/PolyDb/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/PolyDb/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/PolyDb/test/ut/PolyDbImplTester.cpp b/Svc/PolyDb/test/ut/PolyDbImplTester.cpp index 65fa67cb83..184ed805b0 100644 --- a/Svc/PolyDb/test/ut/PolyDbImplTester.cpp +++ b/Svc/PolyDb/test/ut/PolyDbImplTester.cpp @@ -53,7 +53,8 @@ namespace Svc { bool r004Emitted = false; // read and write normal values for each entry in the database with each status type - for (MeasurementStatus mstat = MEASUREMENT_OK; mstat <= MEASUREMENT_STALE;) { + for (MeasurementStatus::t mstatValue = MeasurementStatus::OK; mstatValue <= MeasurementStatus::STALE;) { + MeasurementStatus mstat(mstatValue); for (U32 entry = 0; entry < POLYDB_NUM_DB_ENTRIES; entry++) { if (not r001Emitted) { REQUIREMENT("PDB-001"); @@ -82,9 +83,9 @@ namespace Svc { REQUIREMENT("PDB-004"); r004Emitted = true; } - ASSERT_EQ(mstat,checkStat); + ASSERT_EQ(mstatValue,checkStat.e); } - mstat = (MeasurementStatus)((NATIVE_INT_TYPE)mstat + 1); + mstatValue = (MeasurementStatus::t)((NATIVE_INT_TYPE)mstatValue + 1); } } diff --git a/Svc/PolyDb/xml.do b/Svc/PolyDb/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/PolyDb/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/PolyIf/CMakeLists.txt b/Svc/PolyIf/CMakeLists.txt index 1320a099dd..bf531a718a 100644 --- a/Svc/PolyIf/CMakeLists.txt +++ b/Svc/PolyIf/CMakeLists.txt @@ -8,6 +8,7 @@ #### set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/PolyPortAi.xml" + "${CMAKE_CURRENT_LIST_DIR}/MeasurementStatusEnumAi.xml" ) register_fprime_module() diff --git a/Svc/PolyIf/MeasurementStatusEnumAi.xml b/Svc/PolyIf/MeasurementStatusEnumAi.xml new file mode 100644 index 0000000000..81a7d8ba5b --- /dev/null +++ b/Svc/PolyIf/MeasurementStatusEnumAi.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/Svc/PolyIf/PolyIf.fpp b/Svc/PolyIf/PolyIf.fpp new file mode 100644 index 0000000000..89b6137387 --- /dev/null +++ b/Svc/PolyIf/PolyIf.fpp @@ -0,0 +1,17 @@ +module Svc { + + enum MeasurementStatus { + OK = 0 @< Measurement was good + FAILURE = 1 @< Failure to retrieve measurement + STALE = 2 @< Measurement is stale + } + + @ Port for setting and getting PolyType values + port Poly( + entry: U32 @< The entry to access + ref status: MeasurementStatus @< The command response argument + ref $time: Fw.Time @< The time of the measurement + ref val: Fw.PolyType @< The value to be passed + ) + +} diff --git a/Svc/PolyIf/PolyPortAi.xml b/Svc/PolyIf/PolyPortAi.xml index 7596e87e25..2b7ad15479 100644 --- a/Svc/PolyIf/PolyPortAi.xml +++ b/Svc/PolyIf/PolyPortAi.xml @@ -1,28 +1,36 @@ - - Fw/Types/PolyType.hpp - Fw/Time/Time.hpp - - Port for setting and getting PolyType values - - - - The entry to access - - - - - - - - The command response argument - - - The time of the measurement - - - The value to be passed - - - + + + + Port for setting and getting PolyType values + + Svc/PolyIf/MeasurementStatusEnumAi.xml + Fw/Time/Time.hpp + Fw/Types/PolyType.hpp + + + + The entry to access + + + + + The command response argument + + + + + The time of the measurement + + + + + The value to be passed + + + + diff --git a/Svc/PolyIf/all.do b/Svc/PolyIf/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/PolyIf/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/PolyIf/clean.do b/Svc/PolyIf/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/PolyIf/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/PolyIf/defs.sh b/Svc/PolyIf/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/PolyIf/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/PolyIf/depend.do b/Svc/PolyIf/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/PolyIf/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/PolyIf/locate-uses.do b/Svc/PolyIf/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/PolyIf/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/PolyIf/xml.do b/Svc/PolyIf/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/PolyIf/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/PrmDb/PrmDbImpl.cpp b/Svc/PrmDb/PrmDbImpl.cpp index 4f125ac514..c8a3611980 100644 --- a/Svc/PrmDb/PrmDbImpl.cpp +++ b/Svc/PrmDb/PrmDbImpl.cpp @@ -60,20 +60,20 @@ namespace Svc { Fw::ParamValid PrmDbImpl::getPrm_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val) { // search for entry - Fw::ParamValid stat = Fw::PARAM_INVALID; + Fw::ParamValid stat = Fw::ParamValid::INVALID; for (I32 entry = 0; entry < PRMDB_NUM_DB_ENTRIES; entry++) { if (this->m_db[entry].used) { if (this->m_db[entry].id == id) { val = this->m_db[entry].val; - stat = Fw::PARAM_VALID; + stat = Fw::ParamValid::VALID; break; } } } // if unable to find parameter, send error message - if (Fw::PARAM_INVALID == stat) { + if (Fw::ParamValid::INVALID == stat.e) { this->log_WARNING_LO_PrmIdNotFound(id); } @@ -130,7 +130,7 @@ namespace Svc { Os::File::Status stat = paramFile.open(this->m_fileName.toChar(),Os::File::OPEN_WRITE); if (stat != Os::File::OP_OK) { this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_OPEN,0,stat); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -149,13 +149,13 @@ namespace Svc { if (stat != Os::File::OP_OK) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_DELIMITER,numRecords,stat); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } if (writeSize != sizeof(delim)) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_DELIMITER_SIZE,numRecords,writeSize); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } // serialize record size = id field + data @@ -173,13 +173,13 @@ namespace Svc { if (stat != Os::File::OP_OK) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_RECORD_SIZE,numRecords,stat); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } if (writeSize != sizeof(writeSize)) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_RECORD_SIZE_SIZE,numRecords,writeSize); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -198,13 +198,13 @@ namespace Svc { if (stat != Os::File::OP_OK) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_PARAMETER_ID,numRecords,stat); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } if (writeSize != (NATIVE_INT_TYPE)buff.getBuffLength()) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_PARAMETER_ID_SIZE,numRecords,writeSize); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } @@ -215,13 +215,13 @@ namespace Svc { if (stat != Os::File::OP_OK) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_PARAMETER_VALUE,numRecords,stat); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } if (writeSize != (NATIVE_INT_TYPE)this->m_db[entry].val.getBuffLength()) { this->unLock(); this->log_WARNING_HI_PrmFileWriteError(PRM_WRITE_PARAMETER_VALUE_SIZE,numRecords,writeSize); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_EXECUTION_ERROR); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR); return; } numRecords++; @@ -230,7 +230,7 @@ namespace Svc { this->unLock(); this->log_ACTIVITY_HI_PrmFileSaveComplete(numRecords); - this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_OK); + this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK); } diff --git a/Svc/PrmDb/test/ut/PrmDbImplTester.cpp b/Svc/PrmDb/test/ut/PrmDbImplTester.cpp index a99491cb50..81a6860314 100644 --- a/Svc/PrmDb/test/ut/PrmDbImplTester.cpp +++ b/Svc/PrmDb/test/ut/PrmDbImplTester.cpp @@ -128,7 +128,7 @@ namespace Svc { Fw::QueuedComponentBase::MsgDispatchStatus stat = this->m_impl.doDispatch(); EXPECT_EQ(stat,Fw::QueuedComponentBase::MSG_DISPATCH_OK); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::OK); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_PrmFileSaveComplete_SIZE(1); ASSERT_EVENTS_PrmFileSaveComplete(0,2); @@ -178,7 +178,7 @@ namespace Svc { // ask for ID that isn't present this->clearEvents(); Fw::ParamBuffer pBuff; - EXPECT_EQ(Fw::PARAM_INVALID,this->invoke_to_getPrm(0,0x1000,pBuff)); + EXPECT_EQ(Fw::ParamValid::INVALID,this->invoke_to_getPrm(0,0x1000,pBuff).e); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_PrmIdNotFound_SIZE(1); ASSERT_EVENTS_PrmIdNotFound(0,0x1000); @@ -332,7 +332,7 @@ namespace Svc { EXPECT_EQ(mstat,Fw::QueuedComponentBase::MSG_DISPATCH_OK); ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_OK); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::OK); ASSERT_EVENTS_SIZE(1); ASSERT_EVENTS_PrmFileSaveComplete_SIZE(1); ASSERT_EVENTS_PrmFileSaveComplete(0,4); @@ -583,7 +583,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearOpenInterceptor(); @@ -612,7 +612,7 @@ void PrmDbImplTester::runFileReadError(void) { ASSERT_EVENTS_PrmFileWriteError(0,PrmDbImpl::PRM_WRITE_DELIMITER,0,Os::File::NOT_OPENED); // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); // Test delimiter write size error @@ -642,7 +642,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); @@ -667,7 +667,7 @@ void PrmDbImplTester::runFileReadError(void) { ASSERT_EVENTS_PrmFileWriteError(0,PrmDbImpl::PRM_WRITE_RECORD_SIZE,0,Os::File::NOT_OPENED); // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); // Test record size write size error @@ -694,7 +694,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); @@ -719,7 +719,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); @@ -747,7 +747,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); @@ -773,7 +773,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); // Test parameter value write size error @@ -800,7 +800,7 @@ void PrmDbImplTester::runFileReadError(void) { // check command status ASSERT_CMD_RESPONSE_SIZE(1); - ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::COMMAND_EXECUTION_ERROR); + ASSERT_CMD_RESPONSE(0,PrmDbImpl::OPCODE_PRM_SAVE_FILE,12,Fw::CmdResponse::EXECUTION_ERROR); Os::clearWriteInterceptor(); } diff --git a/Svc/Sched/Sched.fpp b/Svc/Sched/Sched.fpp new file mode 100644 index 0000000000..9911bf48bd --- /dev/null +++ b/Svc/Sched/Sched.fpp @@ -0,0 +1,8 @@ +module Svc { + + @ Scheduler Port with order argument + port Sched( + context: NATIVE_UINT_TYPE @< The call order + ) + +} diff --git a/Svc/Sched/SchedPortAi.xml b/Svc/Sched/SchedPortAi.xml index 5c71068ac4..9adb6dc213 100644 --- a/Svc/Sched/SchedPortAi.xml +++ b/Svc/Sched/SchedPortAi.xml @@ -1,12 +1,18 @@ - - - Scheduler Port with order argument - - - - The call order - - - + + + + Scheduler Port with order argument + + + + + The call order + + + + diff --git a/Svc/Sched/all.do b/Svc/Sched/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Sched/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Sched/clean.do b/Svc/Sched/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Sched/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Sched/defs.sh b/Svc/Sched/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Sched/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Sched/depend.do b/Svc/Sched/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Sched/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Sched/locate-uses.do b/Svc/Sched/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Sched/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Sched/xml.do b/Svc/Sched/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Sched/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/Seq/CmdSeqInPortAi.xml b/Svc/Seq/CmdSeqInPortAi.xml index 8b365a357a..aa43438115 100644 --- a/Svc/Seq/CmdSeqInPortAi.xml +++ b/Svc/Seq/CmdSeqInPortAi.xml @@ -1,13 +1,19 @@ - - Fw/Types/EightyCharString.hpp - - Port to request a sequence be run - - - - The sequence file - - - + + + + Port to request a sequence be run + + Fw/Types/EightyCharString.hpp + + + + The sequence file + + + + diff --git a/Svc/Seq/Seq.fpp b/Svc/Seq/Seq.fpp new file mode 100644 index 0000000000..52ac7ed015 --- /dev/null +++ b/Svc/Seq/Seq.fpp @@ -0,0 +1,8 @@ +module Svc { + + @ Port to request a sequence be run + port CmdSeqIn( + ref filename: Fw.EightyCharString @< The sequence file + ) + +} diff --git a/Svc/Seq/all.do b/Svc/Seq/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Seq/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Seq/clean.do b/Svc/Seq/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Seq/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Seq/defs.sh b/Svc/Seq/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Seq/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Seq/depend.do b/Svc/Seq/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Seq/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Seq/locate-uses.do b/Svc/Seq/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Seq/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Seq/xml.do b/Svc/Seq/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Seq/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/Time/Time.fpp b/Svc/Time/Time.fpp new file mode 100644 index 0000000000..ef55d4fe72 --- /dev/null +++ b/Svc/Time/Time.fpp @@ -0,0 +1,11 @@ +module Svc { + + @ A component for getting time + passive component Time { + + @ Port to retrieve time + sync input port timeGetPort: Fw.Time + + } + +} diff --git a/Svc/Time/TimeComponentAi.xml b/Svc/Time/TimeComponentAi.xml index 768d6d51e6..5c54ac553c 100644 --- a/Svc/Time/TimeComponentAi.xml +++ b/Svc/Time/TimeComponentAi.xml @@ -1,14 +1,23 @@ - - Fw/Time/TimePortAi.xml - A component for getting time - - - - Port to retrieve time - - - - + + + + A component for getting time + + + Fw/Time/TimePortAi.xml + + + + + Port to retrieve time + + + + + diff --git a/Svc/Time/all.do b/Svc/Time/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/Time/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/Time/clean.do b/Svc/Time/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/Time/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/Time/defs.sh b/Svc/Time/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/Time/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/Time/depend.do b/Svc/Time/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/Time/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/Time/locate-uses.do b/Svc/Time/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/Time/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/Time/xml.do b/Svc/Time/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/Time/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/TlmChan/TlmChan.fpp b/Svc/TlmChan/TlmChan.fpp new file mode 100644 index 0000000000..3c7fa65e03 --- /dev/null +++ b/Svc/TlmChan/TlmChan.fpp @@ -0,0 +1,26 @@ +module Svc { + + @ A component for storing telemetry + active component TlmChan { + + @ Telemetry input port + guarded input port TlmRecv: Fw.Tlm + + @ Telemetry input port + guarded input port TlmGet: Fw.Tlm + + @ Run port for starting packet send cycle + async input port Run: Svc.Sched + + @ Packet send port + output port PktSend: Fw.Com + + @ Ping input port + async input port pingIn: [1] Svc.Ping + + @ Ping output port + output port pingOut: [1] Svc.Ping + + } + +} diff --git a/Svc/TlmChan/TlmChanComponentAi.xml b/Svc/TlmChan/TlmChanComponentAi.xml index a4133fad46..8ec7cb7649 100644 --- a/Svc/TlmChan/TlmChanComponentAi.xml +++ b/Svc/TlmChan/TlmChanComponentAi.xml @@ -1,42 +1,51 @@ - - Fw/Tlm/TlmPortAi.xml - Fw/Com/ComPortAi.xml - Svc/Sched/SchedPortAi.xml - Svc/Ping/PingPortAi.xml - A component for storing telemetry - - - - Telemetry input port - - - - - Telemetry input port - - - - - Run port for starting packet send cycle - - - - - Packet send port - - - - - Ping input port - - - - - Ping output port - - - - + + + + A component for storing telemetry + + + Fw/Com/ComPortAi.xml + Fw/Tlm/TlmPortAi.xml + Svc/Ping/PingPortAi.xml + Svc/Sched/SchedPortAi.xml + + + + + Packet send port + + + + + Run port for starting packet send cycle + + + + + Telemetry input port + + + + + Telemetry input port + + + + + Ping input port + + + + + Ping output port + + + + + diff --git a/Svc/TlmChan/all.do b/Svc/TlmChan/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/TlmChan/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/TlmChan/clean.do b/Svc/TlmChan/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/TlmChan/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/TlmChan/defs.sh b/Svc/TlmChan/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/TlmChan/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/TlmChan/depend.do b/Svc/TlmChan/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/TlmChan/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/TlmChan/locate-uses.do b/Svc/TlmChan/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/TlmChan/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/TlmChan/xml.do b/Svc/TlmChan/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/TlmChan/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/UdpReceiver/test/ut/Tester.cpp b/Svc/UdpReceiver/test/ut/Tester.cpp index 9f8811f3d0..8a518b2122 100644 --- a/Svc/UdpReceiver/test/ut/Tester.cpp +++ b/Svc/UdpReceiver/test/ut/Tester.cpp @@ -201,7 +201,7 @@ namespace Svc { void Tester::textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Svc/UdpReceiver/test/ut/Tester.hpp b/Svc/UdpReceiver/test/ut/Tester.hpp index 494730c375..44053700b6 100644 --- a/Svc/UdpReceiver/test/ut/Tester.hpp +++ b/Svc/UdpReceiver/test/ut/Tester.hpp @@ -97,7 +97,7 @@ namespace Svc { void textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); diff --git a/Svc/UdpSender/test/ut/Tester.cpp b/Svc/UdpSender/test/ut/Tester.cpp index aee7c2707e..f59e56fad6 100644 --- a/Svc/UdpSender/test/ut/Tester.cpp +++ b/Svc/UdpSender/test/ut/Tester.cpp @@ -172,7 +172,7 @@ namespace Svc { void Tester::textLogIn(const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ) { TextLogEntry e = { id, timeTag, severity, text }; diff --git a/Svc/UdpSender/test/ut/Tester.hpp b/Svc/UdpSender/test/ut/Tester.hpp index 2d42e21c85..3a02c31148 100644 --- a/Svc/UdpSender/test/ut/Tester.hpp +++ b/Svc/UdpSender/test/ut/Tester.hpp @@ -77,7 +77,7 @@ namespace Svc { void textLogIn( const FwEventIdType id, //!< The event ID Fw::Time& timeTag, //!< The time - const Fw::TextLogSeverity severity, //!< The severity + const Fw::LogSeverity severity, //!< The severity const Fw::TextLogString& text //!< The event string ); diff --git a/Svc/WatchDog/WatchDog.fpp b/Svc/WatchDog/WatchDog.fpp new file mode 100644 index 0000000000..0d74a1b268 --- /dev/null +++ b/Svc/WatchDog/WatchDog.fpp @@ -0,0 +1,8 @@ +module Svc { + + @ Port for stroking a watchdog timer + port WatchDog( + code: U32 @< Watchdog stroke code + ) + +} diff --git a/Svc/WatchDog/WatchDogPortAi.xml b/Svc/WatchDog/WatchDogPortAi.xml index a4f52e799d..0ca8b75d23 100644 --- a/Svc/WatchDog/WatchDogPortAi.xml +++ b/Svc/WatchDog/WatchDogPortAi.xml @@ -1,12 +1,18 @@ - - - Port for stroking a watchdog timer - - - - Watchdog stroke code - - - + + + + Port for stroking a watchdog timer + + + + + Watchdog stroke code + + + + diff --git a/Svc/WatchDog/all.do b/Svc/WatchDog/all.do new file mode 100644 index 0000000000..4fbace832f --- /dev/null +++ b/Svc/WatchDog/all.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-ifchange xml +update xml/*.xml diff --git a/Svc/WatchDog/clean.do b/Svc/WatchDog/clean.do new file mode 100644 index 0000000000..37a3c7ba6c --- /dev/null +++ b/Svc/WatchDog/clean.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do diff --git a/Svc/WatchDog/defs.sh b/Svc/WatchDog/defs.sh new file mode 100644 index 0000000000..eb20074a48 --- /dev/null +++ b/Svc/WatchDog/defs.sh @@ -0,0 +1,6 @@ +#!/bin/sh -e + +export FPRIME_ROOT=../.. +export FPP_FILES=`basename $PWD`.fpp + +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/WatchDog/depend.do b/Svc/WatchDog/depend.do new file mode 100644 index 0000000000..f4477b9979 --- /dev/null +++ b/Svc/WatchDog/depend.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +depend_do "$@" diff --git a/Svc/WatchDog/locate-uses.do b/Svc/WatchDog/locate-uses.do new file mode 100644 index 0000000000..2a645b6cab --- /dev/null +++ b/Svc/WatchDog/locate-uses.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +redo-always +locate_uses_do "$@" 1>&2 diff --git a/Svc/WatchDog/xml.do b/Svc/WatchDog/xml.do new file mode 100644 index 0000000000..ceffc51020 --- /dev/null +++ b/Svc/WatchDog/xml.do @@ -0,0 +1,5 @@ +#!/bin/sh + +. ./defs.sh + +xml_do "$@" diff --git a/Svc/all.do b/Svc/all.do new file mode 100644 index 0000000000..9a54eb9dbd --- /dev/null +++ b/Svc/all.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +subdir_targets redo-ifchange all diff --git a/Svc/build b/Svc/build new file mode 100755 index 0000000000..a82c5ffb78 --- /dev/null +++ b/Svc/build @@ -0,0 +1,21 @@ +#!/bin/sh -e + +export GREEN='\033[32m' +export RED='\033[31m' +export NO_COLOR='\033[0m' + +files=`find . -name CMakeLists.txt | xargs grep -l '^register_fprime_module' | sort | uniq` +here=$PWD +for file in $files +do + dir=`dirname $file` + printf '%-60s' $dir + cd $dir + if fprime-util build > /dev/null 2>&1 + then + echo $GREEN'OK'$NO_COLOR + else + echo $RED'FAILED'$NO_COLOR + fi + cd $here +done diff --git a/Svc/check b/Svc/check new file mode 100755 index 0000000000..d81031c1b8 --- /dev/null +++ b/Svc/check @@ -0,0 +1,21 @@ +#!/bin/sh -e + +export GREEN='\033[32m' +export RED='\033[31m' +export NO_COLOR='\033[0m' + +files=`find . -name CMakeLists.txt | xargs grep -l '^register_fprime_ut' | sort | uniq` +here=$PWD +for file in $files +do + dir=`dirname $file` + printf '%-60s' $dir + cd $dir + if fprime-util check 2>&1 | grep -q '100% tests passed' + then + echo $GREEN'PASSED'$NO_COLOR + else + echo $RED'FAILED'$NO_COLOR + fi + cd $here +done diff --git a/Svc/clean.do b/Svc/clean.do new file mode 100644 index 0000000000..63754a36ca --- /dev/null +++ b/Svc/clean.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do +subdir_targets redo clean diff --git a/Svc/defs.sh b/Svc/defs.sh new file mode 100644 index 0000000000..ad819373e3 --- /dev/null +++ b/Svc/defs.sh @@ -0,0 +1,24 @@ +#!/bin/sh -e + +export FPRIME_ROOT=.. +export SUBDIRS=" +ActiveRateGroup +ActiveTextLogger +ComSplitter +Cycle +Deframer +Fatal +FatalHandler +FileDownlink +Framer +LinuxTimer +Ping +PolyDb +PolyIf +Sched +Seq +Time +TlmChan +WatchDog +" +. $FPRIME_ROOT/defs-root.sh diff --git a/Svc/locs.fpp b/Svc/locs.fpp new file mode 100644 index 0000000000..3fee8060b1 --- /dev/null +++ b/Svc/locs.fpp @@ -0,0 +1,22 @@ +locate component Svc.ActiveLogger at "ActiveLogger/ActiveLogger.fpp" +locate component Svc.ActiveRateGroup at "ActiveRateGroup/ActiveRateGroup.fpp" +locate component Svc.ActiveTextLogger at "ActiveTextLogger/ActiveTextLogger.fpp" +locate component Svc.ComSplitter at "ComSplitter/ComSplitter.fpp" +locate component Svc.Deframer at "Deframer/Deframer.fpp" +locate component Svc.FatalHandler at "FatalHandler/FatalHandler.fpp" +locate component Svc.Framer at "Framer/Framer.fpp" +locate component Svc.LinuxTimer at "LinuxTimer/LinuxTimer.fpp" +locate component Svc.PolyDb at "PolyDb/PolyDb.fpp" +locate component Svc.Time at "Time/Time.fpp" +locate component Svc.TlmChan at "TlmChan/TlmChan.fpp" +locate port Svc.CmdSeqIn at "Seq/Seq.fpp" +locate port Svc.Cycle at "Cycle/Cycle.fpp" +locate port Svc.FatalEvent at "Fatal/Fatal.fpp" +locate port Svc.Ping at "Ping/Ping.fpp" +locate port Svc.Poly at "PolyIf/PolyIf.fpp" +locate port Svc.Sched at "Sched/Sched.fpp" +locate port Svc.WatchDog at "WatchDog/WatchDog.fpp" +locate type Svc.MeasurementStatus at "PolyIf/PolyIf.fpp" +locate type Svc.SendFileResponse at "FileDownlink/FileDownlink.fpp" +locate type Svc.SendFileStatus at "FileDownlink/FileDownlink.fpp" +locate type Svc.TimerVal at "Cycle/Cycle.fpp" diff --git a/Svc/update-locs b/Svc/update-locs new file mode 100755 index 0000000000..76583058af --- /dev/null +++ b/Svc/update-locs @@ -0,0 +1,3 @@ +#!/bin/sh + +fpp-locate-defs `find . -name '*.fpp'` > locs.fpp diff --git a/all.do b/all.do new file mode 100644 index 0000000000..9a54eb9dbd --- /dev/null +++ b/all.do @@ -0,0 +1,5 @@ +#!/bin/sh -e + +. ./defs.sh + +subdir_targets redo-ifchange all diff --git a/clean.do b/clean.do new file mode 100644 index 0000000000..63754a36ca --- /dev/null +++ b/clean.do @@ -0,0 +1,6 @@ +#!/bin/sh -e + +. ./defs.sh + +clean_do +subdir_targets redo clean diff --git a/config/AcConstants.fpp b/config/AcConstants.fpp new file mode 100644 index 0000000000..7529677788 --- /dev/null +++ b/config/AcConstants.fpp @@ -0,0 +1,2 @@ +@ Number of rate group member output ports for ActiveRateGroup +constant ActiveRateGroupOutputPorts = 10 diff --git a/config/FpConfig.fpp b/config/FpConfig.fpp new file mode 100644 index 0000000000..2f6a848e77 --- /dev/null +++ b/config/FpConfig.fpp @@ -0,0 +1,7 @@ +type FwEventIdType +type FwChanIdType +type FwOpcodeType +type FwPrmIdType +type NATIVE_INT_TYPE +type NATIVE_UINT_TYPE +type POINTER_CAST diff --git a/config/locs.fpp b/config/locs.fpp new file mode 100644 index 0000000000..7e5c4d37e5 --- /dev/null +++ b/config/locs.fpp @@ -0,0 +1,8 @@ +locate constant ActiveRateGroupOutputPorts at "AcConstants.fpp" +locate type FwChanIdType at "FpConfig.fpp" +locate type FwEventIdType at "FpConfig.fpp" +locate type FwOpcodeType at "FpConfig.fpp" +locate type FwPrmIdType at "FpConfig.fpp" +locate type NATIVE_INT_TYPE at "FpConfig.fpp" +locate type NATIVE_UINT_TYPE at "FpConfig.fpp" +locate type POINTER_CAST at "FpConfig.fpp" diff --git a/config/update-locs b/config/update-locs new file mode 100755 index 0000000000..76583058af --- /dev/null +++ b/config/update-locs @@ -0,0 +1,3 @@ +#!/bin/sh + +fpp-locate-defs `find . -name '*.fpp'` > locs.fpp diff --git a/defs-root.sh b/defs-root.sh new file mode 100644 index 0000000000..deb6634bdf --- /dev/null +++ b/defs-root.sh @@ -0,0 +1,168 @@ +#!/bin/sh -e + +# ---------------------------------------------------------------------- +# defs-root.sh +# Root definitions for FPP models +# ---------------------------------------------------------------------- + +# Require environment variables to be set +require_vars() +{ + for var in $@ + do + cmd='echo $'$var + out="`eval $cmd`" + if test -z "$out" + then + echo "$var not set" 1>&2 + exit 1 + fi + done +} + +# Require and canonicalize FPRIME_ROOT +require_vars FPRIME_ROOT +export FPRIME_ROOT=`cd $FPRIME_ROOT; echo $PWD` +if test -z "$CONFIG_FPP_LOCS" +then + export CONFIG_FPP_LOCS=$FPRIME_ROOT/config/locs.fpp +fi +export FRAMEWORK_FPP_LOCS=" +$FPRIME_ROOT/Drv/locs.fpp +$FPRIME_ROOT/Fw/locs.fpp +$FPRIME_ROOT/Ref/locs.fpp +$FPRIME_ROOT/Svc/locs.fpp +" +export FPP_LOCS=" +$CONFIG_FPP_LOCS +$FRAMEWORK_FPP_LOCS +$CLIENT_FPP_LOCS +" + +redo-ifchange defs.sh +redo-ifchange $FPRIME_ROOT/defs-root.sh + +# Run command on all files matching regex +doall() +{ + cmd=$1 + shift + for regex in "$@" + do + shift + for file in `find . -maxdepth 1 -name "$regex"` + do + $cmd $file + done + done +} + +# Find and run all subdirectory targets +subdir_targets() +{ + for dir in $SUBDIRS + do + echo $dir/$2 + done | xargs $1 +} + +# Clean files +clean_do() +{ + doall 'rm -rf' '*~' depend xml '*.targets.txt' +} + +# Generate depend directory +depend_do() +{ + require_vars FPP_FILES + # Regenerate the dependencies if any of these files have changed + redo-ifchange $FPP_LOCS $FPP_FILES + rm -rf $3 + mkdir $3 + fpp-depend -m $3/missing.txt $FPP_LOCS $FPP_FILES > $3/noinclude.txt + fpp-depend -i $FPP_LOCS $FPP_FILES > $3/include.txt + missing=`cat $3/missing.txt` + if test -n "$missing" + then + echo "WARNING: missing dependency files" 1>&2 + echo $missing 1>&2 + fi + # If the generated dependencies have not changed, then we don't + # need to report a change upwards in the build + cat $3/*.txt | redo-stamp +} + +# Convert import dependencies to comma-separated format +get_comma_deps() +{ + # Recompute all dependencies + redo-ifchange depend + # Compute the files this build depends on + # Count included dependencies + build_deps=`cat depend/include.txt` + redo-ifchange $FPP_FILES $build_deps + # Compute the files to import + # Don't count included dependencies + import_deps=`cat depend/noinclude.txt` + if test -n "$import_deps" + then + echo $import_deps | sed 's/ /,/g' + fi +} + +# Generate XML files +xml_do() +{ + comma_deps=`get_comma_deps` + if test -n "$comma_deps" + then + import_deps="-i $comma_deps" + else + unset import_deps + fi + rm -rf $3 + mkdir $3 + fpp-to-xml -d $3 -p $FPRIME_ROOT$FPP_PATH_PREFIXES $import_deps $FPP_FILES +} + +# Generate cpp files +cpp_do() +{ + comma_deps=`get_comma_deps` + if test -n "$comma_deps" + then + import_deps="-i $comma_deps" + else + unset import_deps + fi + rm -rf $3 + mkdir $3 + fpp-to-cpp -d $3 -p $FPRIME_ROOT$FPP_PATH_PREFIXES $import_deps $FPP_FILES +} + +# Locate uses +locate_uses_do() +{ + comma_deps=`get_comma_deps` + if test -n "$comma_deps" + then + import_deps="-i $comma_deps,$FPP_LOCS" + else + import_deps="-i $FPP_LOCS" + fi + fpp-locate-uses $import_deps $FPP_FILES +} + +# Update generated files +update() +{ + for file in $@ + do + base=`basename $file` + if ! test -f $base || ! diff -q $file $base > /dev/null + then + cp $file $base + fi + done +} diff --git a/defs.sh b/defs.sh new file mode 100755 index 0000000000..4774da0ff2 --- /dev/null +++ b/defs.sh @@ -0,0 +1,9 @@ +#!/bin/sh -e + +export FPRIME_ROOT=. +export SUBDIRS=" +Fw +Ref +Svc +" +. $FPRIME_ROOT/defs-root.sh diff --git a/update-locs b/update-locs new file mode 100755 index 0000000000..83e069c4c7 --- /dev/null +++ b/update-locs @@ -0,0 +1,14 @@ +#!/bin/sh + +subdirs=" +Drv +Fw +Ref +config +Svc +" + +for dir in $subdirs +do + (cd $dir; ./update-locs) +done