mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
FPP Types and Ports (#727)
* Revise command response port Replace inline enum with XML enum type Generate XML from FPP Revise uses to match * Revise xml-gen script * Revise event ports Replace inline enums with external enums * Add missing files * Revise ActiveLogger * Revise text log port * Revise text log port Replace inline enum with external LogSeverity enum Now Log and TextLog share the same enum for severity * Revise Fw/Prm * Revise uses of Fw/Prm * Revise Fw/Cmd model * Revise Fw/Cmd build * Revise build for Fw/Cmd * Refactor Fw/Log model * Refactor build for Fw/Prm * Revise build scripts Remove workarounds after compiler fix * Revise model Revise build scripts Regerate XML * Revise FPP model in Fw * Add gen-xml * Add metadata files * Add redo scripts * Remove gen-xml scripts * Revise redo scripts * Revise redo scripts * Add redo scripts * Add FPP model for Fw/Com * Add FPP model for Fw/Time * Revise redo scripts * Add FPP model for Fw/Tlm * Revise redo scripts * Revise redo scripts * Revise redo scripts, gitignore * Remove unused file * Revise redo scripts * Add FPP.adoc * Add FPP model for Svc/Cycle * Revise defs.fpp and build rules * Revise do files Rename fpp-defs to defs * Update redo scripts * Revise redo scripts * Fix build rules * Add FPP model for Svc/Sched * Revise update script * Rename defs.fpp --> locs.fpp * Revise build scripts * Revise Svc.Cycle model Make TimerVal argument by value, not by reference This is required for compliance with FPP semantics, because Svc.Cycle is used in async input ports * Revert "Revise Svc.Cycle model" This reverts commit a31c12f1c0a9639da818d79da4f7ddd036c0b3d8. Under the revised semantics of FPP, this change is not necessary. * Revise Fw/Types build Add missing file * Revise FatalHandler Abort with SIGABRT, not SIGSEGV * Add FPP model for Ping port * Revise GDS launcher Make the HTML server port configurable Interpret -g 5001 as "Run the HTML GUI at port 5001" * Fix bug in XML array parser * Revise build scripts * Revise build script * Fix merge errors * Fix merge errors * Fix redo scripts * redo not overwriting Svc/FileDownlink .xml files * Remove redo database * Revise .gitignore * Revise FileDownlink FPP model * pre redo all in Drv/ByteStreamDriveModel * Revisited SignalPair to run redo all * redo all in Ref/SignalGen * Saving before running redo all * /Svc/Watchdog pre redo all * All Svc Enums etc. done minus /Svc/PolyIf and /Svc/WatchDog * Forgot to add /Seq/Seq.fpp on last commit * Created Type.fpp, ran redo xml in /Svc/Seq * /Svc/PolyIf pre redo all * /Svc/PolyIf returning .hpp error on fprime-util build * Svc ports etc. complete * Svc/ActiveLogger pre redo * /Svc/PolyDb pre redo * /Svc/ActiveTextLogger pre-redo * /Svc/ActiveTextLogger post redo * Svc/ComSplitter pre redo * Svc/ComSplitter post redo * /Svc/Deframer pre redo * Svc/Deframer post redo * /Svc/FatalHandler pre redo * /Svc/FatalHandler post redo * /Svc/Framer pre redo * /Svc/FramerComponentAi post redo * /Svc/LinuxTimer pre redo * post redo for /Svc/LinuxTimer /Svc/PolyDb * /Svc/Time pre redo * /Svc/Time post redo * /Svc/TlmChan pre redo * /Svc/TlmChan post redo * Remove files deleted from mainline * Revert change to Fatal Handler * Rename CommandResponse to CmdResponse * Revert name of enum constant * updated Fw/types.fpp * Added ActiveRateGroupOutputPorts to Fpconfig.fpp, Svc/ActiveRateGroup pre redo * /Svc/ActiveRateGroup component finished * Revise build scripts * Revise Ref redo build Make it into a separate project * Revise fpp build * Revise fpp build * Revise ActiveRateGroup Put AcConstants variable back in for now * Revise FPP model * Revise fpp model Add AcConstants.fpp * Remove local setup scripts * Fix spelling in comment * Revise spell check Co-authored-by: jweadick <joshua.m.weadick@jpl.nasa.gov>
This commit is contained in:
parent
37cab74b7f
commit
53b2dcd0c9
7
.github/actions/spelling/expect.txt
vendored
7
.github/actions/spelling/expect.txt
vendored
@ -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
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@ -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/
|
||||
|
||||
0
.redo-base
Normal file
0
.redo-base
Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_cpp.tmpl
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_cpp.tmpl
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/arrays/array_hpp.tmpl
Executable file → Normal file
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
0
Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_cpp.tmpl
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_cpp.tmpl
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/generators/templates/enums/enum_hpp.tmpl
Executable file → Normal file
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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",
|
||||
)
|
||||
|
||||
|
||||
@ -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",
|
||||
)
|
||||
|
||||
|
||||
0
Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py
Executable file → Normal file
0
Autocoders/Python/src/fprime_ac/parsers/XmlEnumParser.py
Executable file → Normal file
@ -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); // <! Example output port
|
||||
this->cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
|
||||
this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
|
||||
}
|
||||
|
||||
void ExampleComponentImpl::parameterUpdated(FwPrmIdType id) {
|
||||
|
||||
Binary file not shown.
21
Autocoders/Python/test/build
Executable file
21
Autocoders/Python/test/build
Executable file
@ -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
|
||||
21
Autocoders/Python/test/check
Executable file
21
Autocoders/Python/test/check
Executable file
@ -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
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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_ */
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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_ */
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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_ */
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 };
|
||||
|
||||
@ -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
|
||||
);
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@ -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); // <! Example output port
|
||||
this->cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
|
||||
this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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:
|
||||
};
|
||||
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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); // <! Example output port
|
||||
this->cmdResponse_out(opCode,cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
|
||||
this->cmdResponse_out(opCode,cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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_ */
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
35
Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp
Normal file
35
Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp
Normal file
@ -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
|
||||
|
||||
}
|
||||
6
Drv/ByteStreamDriverModel/all.do
Normal file
6
Drv/ByteStreamDriverModel/all.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-ifchange xml
|
||||
update xml/*.xml
|
||||
5
Drv/ByteStreamDriverModel/clean.do
Normal file
5
Drv/ByteStreamDriverModel/clean.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
clean_do
|
||||
6
Drv/ByteStreamDriverModel/defs.sh
Normal file
6
Drv/ByteStreamDriverModel/defs.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
export FPRIME_ROOT=../..
|
||||
export FPP_FILES=`basename $PWD`.fpp
|
||||
|
||||
. $FPRIME_ROOT/defs-root.sh
|
||||
5
Drv/ByteStreamDriverModel/depend.do
Normal file
5
Drv/ByteStreamDriverModel/depend.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
depend_do "$@"
|
||||
6
Drv/ByteStreamDriverModel/locate-uses.do
Normal file
6
Drv/ByteStreamDriverModel/locate-uses.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-always
|
||||
locate_uses_do "$@" 1>&2
|
||||
5
Drv/ByteStreamDriverModel/xml.do
Normal file
5
Drv/ByteStreamDriverModel/xml.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
xml_do "$@"
|
||||
6
Drv/locs.fpp
Normal file
6
Drv/locs.fpp
Normal file
@ -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"
|
||||
3
Drv/update-locs
Executable file
3
Drv/update-locs
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
fpp-locate-defs `find . -name '*.fpp'` > locs.fpp
|
||||
21
FPP.adoc
Normal file
21
FPP.adoc
Normal file
@ -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.
|
||||
13
Fw/Buffer/Buffer.fpp
Normal file
13
Fw/Buffer/Buffer.fpp
Normal file
@ -0,0 +1,13 @@
|
||||
module Fw {
|
||||
|
||||
type Buffer
|
||||
|
||||
port BufferSend(
|
||||
ref fwBuffer: Fw.Buffer
|
||||
)
|
||||
|
||||
port BufferGet(
|
||||
$size: U32
|
||||
) -> Fw.Buffer
|
||||
|
||||
}
|
||||
@ -1,10 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<interface name="BufferGet" namespace="Fw">
|
||||
<include_header>Fw/Buffer/Buffer.hpp</include_header>
|
||||
<args>
|
||||
<arg name="size" type="U32" pass_by="value">
|
||||
</arg>
|
||||
</args>
|
||||
<return type="Fw::Buffer" pass_by="value"></return>
|
||||
<!-- =====================================================================
|
||||
BufferGetPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="BufferGet">
|
||||
<include_header>Fw/Buffer/Buffer.hpp</include_header>
|
||||
<args>
|
||||
<arg name="size" type="U32"/>
|
||||
</args>
|
||||
<return type="Fw::Buffer"/>
|
||||
</interface>
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<interface name="BufferSend" namespace="Fw">
|
||||
<include_header>Fw/Buffer/Buffer.hpp</include_header>
|
||||
<args>
|
||||
<arg name="fwBuffer" type="Fw::Buffer" pass_by="reference">
|
||||
</arg>
|
||||
</args>
|
||||
<!-- =====================================================================
|
||||
BufferSendPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="BufferSend">
|
||||
<include_header>Fw/Buffer/Buffer.hpp</include_header>
|
||||
<args>
|
||||
<arg name="fwBuffer" type="Fw::Buffer" pass_by="reference"/>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
6
Fw/Buffer/all.do
Normal file
6
Fw/Buffer/all.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-ifchange xml
|
||||
update xml/*.xml
|
||||
5
Fw/Buffer/clean.do
Normal file
5
Fw/Buffer/clean.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
clean_do
|
||||
9
Fw/Buffer/defs.sh
Normal file
9
Fw/Buffer/defs.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
export FPRIME_ROOT=../..
|
||||
|
||||
export FPP_FILES="
|
||||
Buffer.fpp
|
||||
"
|
||||
|
||||
. $FPRIME_ROOT/defs-root.sh
|
||||
5
Fw/Buffer/depend.do
Normal file
5
Fw/Buffer/depend.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
depend_do "$@"
|
||||
6
Fw/Buffer/locate-uses.do
Normal file
6
Fw/Buffer/locate-uses.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-always
|
||||
locate_uses_do "$@" 1>&2
|
||||
5
Fw/Buffer/xml.do
Normal file
5
Fw/Buffer/xml.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
xml_do "$@"
|
||||
@ -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()
|
||||
|
||||
34
Fw/Cmd/Cmd.fpp
Normal file
34
Fw/Cmd/Cmd.fpp
Normal file
@ -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
|
||||
)
|
||||
|
||||
}
|
||||
@ -1,18 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="Cmd" namespace="Fw">
|
||||
<include_header>Fw/Cmd/CmdArgBuffer.hpp</include_header>
|
||||
<comment>
|
||||
Command port
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="opCode" type="FwOpcodeType">
|
||||
<comment>Command Op Code</comment>
|
||||
</arg>
|
||||
<arg name="cmdSeq" type="U32">
|
||||
<comment>Command Sequence</comment>
|
||||
</arg>
|
||||
<arg name="args" type="CmdArgBuffer" pass_by="reference">
|
||||
<comment>Buffer containing arguments</comment>
|
||||
</arg>
|
||||
</args>
|
||||
|
||||
<!-- =====================================================================
|
||||
CmdPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="Cmd">
|
||||
<comment>
|
||||
Port for sending commands
|
||||
</comment>
|
||||
<include_header>Fw/Cmd/CmdArgBuffer.hpp</include_header>
|
||||
<args>
|
||||
<arg name="opCode" type="FwOpcodeType">
|
||||
<comment>
|
||||
Command Op Code
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="cmdSeq" type="U32">
|
||||
<comment>
|
||||
Command Sequence
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="args" type="Fw::CmdArgBuffer" pass_by="reference">
|
||||
<comment>
|
||||
Buffer containing arguments
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
@ -1,11 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="CmdReg" namespace="Fw">
|
||||
<comment>
|
||||
Command registration port
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="opCode" type="FwOpcodeType">
|
||||
<comment>Command Op Code</comment>
|
||||
</arg>
|
||||
</args>
|
||||
|
||||
<!-- =====================================================================
|
||||
CmdRegPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="CmdReg">
|
||||
<comment>
|
||||
Command registration port
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="opCode" type="FwOpcodeType">
|
||||
<comment>
|
||||
Command Op Code
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
17
Fw/Cmd/CmdResponseEnumAi.xml
Normal file
17
Fw/Cmd/CmdResponseEnumAi.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- =====================================================================
|
||||
CmdResponseEnumAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<enum namespace="Fw" name="CmdResponse">
|
||||
<comment>
|
||||
Enum representing a command response
|
||||
</comment>
|
||||
<item name="OK" value="0" comment="Command successfully executed"/>
|
||||
<item name="INVALID_OPCODE" value="1" comment="Invalid opcode dispatched"/>
|
||||
<item name="VALIDATION_ERROR" value="2" comment="Command failed validation"/>
|
||||
<item name="FORMAT_ERROR" value="3" comment="Command failed to deserialize"/>
|
||||
<item name="EXECUTION_ERROR" value="4" comment="Command had execution error"/>
|
||||
<item name="BUSY" value="5" comment="Component busy"/>
|
||||
</enum>
|
||||
@ -1,25 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="CmdResponse" namespace="Fw">
|
||||
<comment>
|
||||
Command port
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="opCode" type="FwOpcodeType">
|
||||
<comment>Command Op Code</comment>
|
||||
</arg>
|
||||
<arg name="cmdSeq" type="U32">
|
||||
<comment>Command Sequence</comment>
|
||||
</arg>
|
||||
<arg name="response" type="ENUM">
|
||||
<enum name="CommandResponse">
|
||||
<item name="COMMAND_OK" comment="Command successfully executed"/>
|
||||
<item name="COMMAND_INVALID_OPCODE" comment="Invalid opcode dispatched"/>
|
||||
<item name="COMMAND_VALIDATION_ERROR" comment="Command failed validation"/>
|
||||
<item name="COMMAND_FORMAT_ERROR" comment="Command failed to deserialize"/>
|
||||
<item name="COMMAND_EXECUTION_ERROR" comment="Command had execution error"/>
|
||||
<item name="COMMAND_BUSY" comment="Component busy"/>
|
||||
</enum>
|
||||
<comment>The command response argument</comment>
|
||||
</arg>
|
||||
</args>
|
||||
|
||||
<!-- =====================================================================
|
||||
CmdResponsePortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="CmdResponse">
|
||||
<comment>
|
||||
Port for sending command responses
|
||||
</comment>
|
||||
<import_enum_type>Fw/Cmd/CmdResponseEnumAi.xml</import_enum_type>
|
||||
<args>
|
||||
<arg name="opCode" type="FwOpcodeType">
|
||||
<comment>
|
||||
Command Op Code
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="cmdSeq" type="U32">
|
||||
<comment>
|
||||
Command Sequence
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="response" type="Fw::CmdResponse">
|
||||
<comment>
|
||||
The command response argument
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
6
Fw/Cmd/all.do
Normal file
6
Fw/Cmd/all.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-ifchange xml
|
||||
update xml/*.xml
|
||||
5
Fw/Cmd/clean.do
Normal file
5
Fw/Cmd/clean.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
clean_do
|
||||
9
Fw/Cmd/defs.sh
Normal file
9
Fw/Cmd/defs.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
export FPRIME_ROOT=../..
|
||||
|
||||
export FPP_FILES="
|
||||
Cmd.fpp
|
||||
"
|
||||
|
||||
. $FPRIME_ROOT/defs-root.sh
|
||||
5
Fw/Cmd/depend.do
Normal file
5
Fw/Cmd/depend.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
depend_do "$@"
|
||||
6
Fw/Cmd/locate-uses.do
Normal file
6
Fw/Cmd/locate-uses.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-always
|
||||
locate_uses_do "$@" 1>&2
|
||||
5
Fw/Cmd/xml.do
Normal file
5
Fw/Cmd/xml.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
xml_do "$@"
|
||||
11
Fw/Com/Com.fpp
Normal file
11
Fw/Com/Com.fpp
Normal file
@ -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
|
||||
)
|
||||
|
||||
}
|
||||
@ -1,15 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="Com" namespace="Fw">
|
||||
<include_header>Fw/Com/ComBuffer.hpp</include_header>
|
||||
<comment>
|
||||
Port for passing communication packet buffers
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="data" type="ComBuffer" pass_by="reference">
|
||||
<comment>Buffer containing packet data</comment>
|
||||
</arg>
|
||||
<arg name="context" type="U32" pass_by="value">
|
||||
<comment>Call context value; meaning chosen by user</comment>
|
||||
</arg>
|
||||
</args>
|
||||
|
||||
<!-- =====================================================================
|
||||
ComPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="Com">
|
||||
<comment>
|
||||
Port for passing communication packet buffers
|
||||
</comment>
|
||||
<include_header>Fw/Com/ComBuffer.hpp</include_header>
|
||||
<args>
|
||||
<arg name="data" type="Fw::ComBuffer" pass_by="reference">
|
||||
<comment>
|
||||
Buffer containing packet data
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="context" type="U32">
|
||||
<comment>
|
||||
Call context value; meaning chosen by user
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
6
Fw/Com/all.do
Normal file
6
Fw/Com/all.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-ifchange xml
|
||||
update xml/*.xml
|
||||
5
Fw/Com/clean.do
Normal file
5
Fw/Com/clean.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
clean_do
|
||||
9
Fw/Com/defs.sh
Normal file
9
Fw/Com/defs.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
export FPRIME_ROOT=../..
|
||||
|
||||
export FPP_FILES="
|
||||
Com.fpp
|
||||
"
|
||||
|
||||
. $FPRIME_ROOT/defs-root.sh
|
||||
5
Fw/Com/depend.do
Normal file
5
Fw/Com/depend.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
depend_do "$@"
|
||||
6
Fw/Com/locate-uses.do
Normal file
6
Fw/Com/locate-uses.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-always
|
||||
locate_uses_do "$@" 1>&2
|
||||
5
Fw/Com/xml.do
Normal file
5
Fw/Com/xml.do
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
xml_do "$@"
|
||||
@ -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()
|
||||
register_fprime_ut()
|
||||
|
||||
35
Fw/Log/Log.fpp
Normal file
35
Fw/Log/Log.fpp
Normal file
@ -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
|
||||
)
|
||||
|
||||
}
|
||||
@ -1,31 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="Log" namespace="Fw">
|
||||
<include_header>Fw/Log/LogBuffer.hpp</include_header>
|
||||
<include_header>Fw/Time/Time.hpp</include_header>
|
||||
<comment>
|
||||
Log port
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="id" type="FwEventIdType">
|
||||
<comment>Log ID</comment>
|
||||
</arg>
|
||||
<arg name="timeTag" type="Fw::Time" pass_by="reference">
|
||||
<comment>Time Tag</comment>
|
||||
</arg>
|
||||
<arg name="severity" type="ENUM">
|
||||
<enum name="LogSeverity">
|
||||
<item name="LOG_FATAL" value="1" comment="A fatal non-recoverable event"/>
|
||||
<item name="LOG_WARNING_HI" value="2" comment="A serious but recoverable event"/>
|
||||
<item name="LOG_WARNING_LO" value="3" comment="A less serious but recoverable event"/>
|
||||
<item name="LOG_COMMAND" value="4" comment="An activity related to commanding"/>
|
||||
<item name="LOG_ACTIVITY_HI" value="5" comment="Important informational events"/>
|
||||
<item name="LOG_ACTIVITY_LO" value="6" comment="Less important informational events"/>
|
||||
<item name="LOG_DIAGNOSTIC" value="7" comment="Software diagnostic events"/>
|
||||
</enum>
|
||||
<comment>The severity argument</comment>
|
||||
</arg>
|
||||
<arg name="args" type="LogBuffer" pass_by="reference">
|
||||
<comment>Buffer containing serialized log entry</comment>
|
||||
</arg>
|
||||
</args>
|
||||
|
||||
<!-- =====================================================================
|
||||
LogPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="Log">
|
||||
<comment>
|
||||
Event log port
|
||||
</comment>
|
||||
<import_enum_type>Fw/Log/LogSeverityEnumAi.xml</import_enum_type>
|
||||
<include_header>Fw/Log/LogBuffer.hpp</include_header>
|
||||
<include_header>Fw/Time/Time.hpp</include_header>
|
||||
<args>
|
||||
<arg name="id" type="FwEventIdType">
|
||||
<comment>
|
||||
Log ID
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="timeTag" type="Fw::Time" pass_by="reference">
|
||||
<comment>
|
||||
Time Tag
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="severity" type="Fw::LogSeverity">
|
||||
<comment>
|
||||
The severity argument
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="args" type="Fw::LogBuffer" pass_by="reference">
|
||||
<comment>
|
||||
Buffer containing serialized log entry
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
18
Fw/Log/LogSeverityEnumAi.xml
Normal file
18
Fw/Log/LogSeverityEnumAi.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- =====================================================================
|
||||
LogSeverityEnumAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<enum namespace="Fw" name="LogSeverity">
|
||||
<comment>
|
||||
Enum representing event severity
|
||||
</comment>
|
||||
<item name="FATAL" value="1" comment="A fatal non-recoverable event"/>
|
||||
<item name="WARNING_HI" value="2" comment="A serious but recoverable event"/>
|
||||
<item name="WARNING_LO" value="3" comment="A less serious but recoverable event"/>
|
||||
<item name="COMMAND" value="4" comment="An activity related to commanding"/>
|
||||
<item name="ACTIVITY_HI" value="5" comment="Important informational events"/>
|
||||
<item name="ACTIVITY_LO" value="6" comment="Less important informational events"/>
|
||||
<item name="DIAGNOSTIC" value="7" comment="Software diagnostic events"/>
|
||||
</enum>
|
||||
@ -1,31 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface name="LogText" namespace="Fw">
|
||||
<include_header>Fw/Time/Time.hpp</include_header>
|
||||
<include_header>Fw/Log/TextLogString.hpp</include_header>
|
||||
<comment>
|
||||
Text Log port - meant to be used for development and debugging, turn off for flight
|
||||
</comment>
|
||||
<args>
|
||||
<arg name="id" type="FwEventIdType">
|
||||
<comment>Log ID</comment>
|
||||
</arg>
|
||||
<arg name="timeTag" type="Fw::Time" pass_by="reference">
|
||||
<comment>Time Tag</comment>
|
||||
</arg>
|
||||
<arg name="severity" type="ENUM">
|
||||
<enum name="TextLogSeverity">
|
||||
<item name="TEXT_LOG_FATAL" value="1" comment="A fatal non-recoverable event"/>
|
||||
<item name="TEXT_LOG_WARNING_HI" value="2" comment="A serious but recoverable event"/>
|
||||
<item name="TEXT_LOG_WARNING_LO" value="3" comment="A less serious but recoverable event"/>
|
||||
<item name="TEXT_LOG_COMMAND" value="4" comment="An activity related to commanding"/>
|
||||
<item name="TEXT_LOG_ACTIVITY_HI" value="5" comment="Important informational events"/>
|
||||
<item name="TEXT_LOG_ACTIVITY_LO" value="6" comment="Less important informational events"/>
|
||||
<item name="TEXT_LOG_DIAGNOSTIC" value="7" comment="Software diagnostic events"/>
|
||||
</enum>
|
||||
<comment>The severity argument</comment>
|
||||
</arg>
|
||||
<arg name="text" type="Fw::TextLogString" pass_by="reference">
|
||||
<comment>Text of log message</comment>
|
||||
</arg>
|
||||
</args>
|
||||
|
||||
<!-- =====================================================================
|
||||
LogTextPortAi.xml
|
||||
Generated by fpp-to-xml
|
||||
====================================================================== -->
|
||||
<interface namespace="Fw" name="LogText">
|
||||
<comment>
|
||||
Text event log port
|
||||
Use for development and debugging, turn off for flight
|
||||
</comment>
|
||||
<import_enum_type>Fw/Log/LogSeverityEnumAi.xml</import_enum_type>
|
||||
<include_header>Fw/Log/TextLogString.hpp</include_header>
|
||||
<include_header>Fw/Time/Time.hpp</include_header>
|
||||
<args>
|
||||
<arg name="id" type="FwEventIdType">
|
||||
<comment>
|
||||
Log ID
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="timeTag" type="Fw::Time" pass_by="reference">
|
||||
<comment>
|
||||
Time Tag
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="severity" type="Fw::LogSeverity">
|
||||
<comment>
|
||||
The severity argument
|
||||
</comment>
|
||||
</arg>
|
||||
<arg name="text" type="Fw::TextLogString" pass_by="reference">
|
||||
<comment>
|
||||
Text of log message
|
||||
</comment>
|
||||
</arg>
|
||||
</args>
|
||||
</interface>
|
||||
|
||||
6
Fw/Log/all.do
Normal file
6
Fw/Log/all.do
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
. ./defs.sh
|
||||
|
||||
redo-ifchange xml
|
||||
update xml/*.xml
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user