Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lestarch: add in ability to override telemetry time #713

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -890,22 +890,17 @@ 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 $update == "on_change"
// Check to see if it is the first time
if (not this->m_first_update_$tlmname) {
Expand All @@ -923,8 +918,7 @@ namespace ${namespace} {

#end if
if (this->m_${Tlm_Name}_OutputPort[0].isConnected()) {
Fw::Time _tlmTime;
if (this->m_${Time_Name}_OutputPort[0].isConnected()) {
if (this->m_${Time_Name}_OutputPort[0].isConnected() && _tlmTime == Fw::ZERO_TIME) {
this->m_${Time_Name}_OutputPort[0].invoke( _tlmTime);
}
Fw::TlmBuffer _tlmBuff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,32 +813,23 @@ $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")
);
#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=Fw::Time() $doxygen_post_comment("Timestamp. Default: unspecified, request from getTime port")
);
#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
1 change: 1 addition & 0 deletions Fw/Time/Time.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ namespace Fw {
TimeBase m_timeBase; // !< basis of time (defined by system)
FwTimeContextStoreType m_timeContext; // !< user settable value. Could be reboot count, node, etc
};
const static Time ZERO_TIME = Time();

}

Expand Down