-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
void PingReceiverComponentBase ::
tlmWrite_PR_NumPings(U32 arg)
{
+ Fw::Time _tlmTime;
+ if (this->m_Time_OutputPort[0].isConnected()) {
+ this->m_Time_OutputPort[0].invoke( _tlmTime);
+ }
+ this->tlmWrite_PR_NumPings(arg, _tlmTime);
+ }
+ void PingReceiverComponentBase ::
+ tlmWrite_PR_NumPings(U32 arg, Fw::Time& _tlmTime)
+ {
if (this->m_Tlm_OutputPort[0].isConnected()) {
- Fw::Time _tlmTime;
- if (this->m_Time_OutputPort[0].isConnected()) {
- this->m_Time_OutputPort[0].invoke( _tlmTime);
- } ~~HPP File:~~~ //! Write telemetry channel PR_NumPings
//!
/* Number of pings received */
void tlmWrite_PR_NumPings(
U32 arg /*!< The telemetry value*/
);
+ void tlmWrite_PR_NumPings(
+ U32 arg /*!< The telemetry value*/,
+ Fw::Time& _tlmTime //!< Timestamp of telemetry override if needed
+ );
|
45c47f5
to
685ba0a
Compare
@bocchino, @timcanham I have gotten the code-size down to 7.35% more than a binary compiled without this feature. This is using a test-case of 10000+ telemetry items to ensure that the effect is significant. If this is sufficient, I can push this solution and we can move forward. |
685ba0a
to
b703bd0
Compare
This looks fine to me. |
Do you have the latest diff? |
@timcanham difference of autogenerated code (latest) HPP File //!
/* Type of the output signal: SINE, TRIANGLE, etc. */
void tlmWrite_Type(
- Ref::SignalType& arg /*!< The telemetry value*/
+ Ref::SignalType& arg /*!< The telemetry value*/,
+ Fw::Time _tlmTime=Fw::Time() /*!< Timestamp. Default: unspecified, request from getTime port*/
); CPP void SignalGenComponentBase ::
- tlmWrite_Type(Ref::SignalType& arg)
+ tlmWrite_Type(Ref::SignalType& arg, Fw::Time _tlmTime)
{
-
if (this->m_tlmOut_OutputPort[0].isConnected()) {
- Fw::Time _tlmTime;
- if (this->m_timeCaller_OutputPort[0].isConnected()) {
+ if (this->m_timeCaller_OutputPort[0].isConnected() && _tlmTime == Fw::ZERO_TIME) {
|
b703bd0
to
5ea2dab
Compare
@timcanham can you review this. |
Change Description
Some use cases for sending telemetry include overriding the "time" the telemetry was taken. This may have to do with hardware, a previously stored read, or the need to correlate across sample. This currently can only be done crudely by copying AC code into one's user code. This breaks the telemetry call into two polymorphic calls: one maintains current behavior and delegates internally to the second, which uses supplied time not calculated time.
Future Work
Is there sufficient use cases enough to add this to Events?