Skip to content

MessageGAM ignores trigOnChange if it starts in the true state for the command #3

Description

@sudilav

The TrigOnChange value is set such that if it moves from a zero to a 1 then it should then actually send the message.
However it tracks this by keeping a value for previousValue and comparing this to currentValue. However, what if currentValue starts as 1 and previousValue was set to 0 in Setup?

It seems this is somewhat managed in https://github.com/aneto0/MARTe2-components/blob/master/Source/Components/GAMs/MessageGAM/MessageGAM.cpp#L242 and https://github.com/aneto0/MARTe2-components/blob/master/Source/Components/GAMs/MessageGAM/MessageGAM.cpp#L259

However, why is it that it has this "firstTime" setup?

In our case, one our reactor. We will start where a field which tells us our trigger states is still 0xfff from the previous pulse test when we start. It is only at a later state of the start up sequence that this field gets reset to 0x000. So what we found if even with trigOnChange, because we're in the first state we run into, it immediately moves through states. When I remove this section of "firstTime", my configuration works as expected.

What is the purpose of this? Maybe this could be moved to a parameter so that I can merge back to using the develop branch of MARTe2-components? I'll create an implementation and suggest a merge, where it defaults to firstTime = 1 for others so no one gets there code disrupted but my config can run in a way to effectively ignore this section of code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions