Skip to content

Commit

Permalink
lestarch: add in ability to override telemetry time
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch committed Jun 15, 2021
1 parent db086fd commit 45c47f5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -890,22 +890,28 @@ namespace ${namespace} {
// ----------------------------------------------------------------------

#for $ids, $tlmname, $type, $size, $update, $comment, $typeinfo in $channels:
void ${class_name} ::
#set $tlm_type = $type
#if $type == "string":
tlmWrite_${tlmname}(Fw::TlmString& arg)
#set $tlm_type = "Fw::TlmString&"
#else if $typeinfo == "user"
#set $tlm_type = $type + "&"
#else
#if $typeinfo == "enum":
tlmWrite_${tlmname}(${type} arg)
#else
#if $typeinfo == "user":
tlmWrite_${tlmname}(${type}& arg)
#else
tlmWrite_${tlmname}(${type} arg)
#end if
#end if
#set $tlm_type = $type
#end if

void ${class_name} ::
tlmWrite_${tlmname}(${tlm_type} arg)
{
Fw::Time _tlmTime;
if (this->m_${Time_Name}_OutputPort[0].isConnected()) {
this->m_${Time_Name}_OutputPort[0].invoke( _tlmTime);
}
this->tlmWrite_${tlmname}(arg, _tlmTime);
}

void ${class_name} ::
tlmWrite_${tlmname}(${tlm_type} arg, Fw::Time& _tlmTime)
{
#if $update == "on_change"
// Check to see if it is the first time
if (not this->m_first_update_$tlmname) {
Expand All @@ -923,10 +929,7 @@ namespace ${namespace} {

#end if
if (this->m_${Tlm_Name}_OutputPort[0].isConnected()) {
Fw::Time _tlmTime;
if (this->m_${Time_Name}_OutputPort[0].isConnected()) {
this->m_${Time_Name}_OutputPort[0].invoke( _tlmTime);
}

Fw::TlmBuffer _tlmBuff;
#if $type == "string":
arg.setMaxSerialize($size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,32 +813,27 @@ $emit_non_port_params(8, $params)
// ----------------------------------------------------------------------

#for $ids, $name, $type, $size, $update, $comment, $typeinfo in $channels:
#set $tlm_type = $type
#if $type == "string":
#set $tlm_type = "Fw::TlmString&"
#else if $typeinfo == "user"
#set $tlm_type = $type + "&"
#else
#set $tlm_type = $type
#end if

//! Write telemetry channel $name
//!
#if not $comment is None
/* $comment */
#end if
#if $type == "string":
void tlmWrite_${name}(
Fw::TlmString& arg $doxygen_post_comment("The telemetry value")
${tlm_type} arg $doxygen_post_comment("The telemetry value")
);
#else:
#if $typeinfo == "enum":
void tlmWrite_${name}(
${type} arg $doxygen_post_comment("The telemetry value")
${tlm_type} arg $doxygen_post_comment("The telemetry value"),
Fw::Time& _tlmTime //!< Timestamp of telemetry override if needed
);
#else:
#if $typeinfo == "user":
void tlmWrite_${name}(
${type}& arg $doxygen_post_comment("The telemetry value")
);
#else:
void tlmWrite_${name}(
${type} arg $doxygen_post_comment("The telemetry value")
);
#end if
#end if
#end if

#end for
#end if
Expand Down

0 comments on commit 45c47f5

Please sign in to comment.