Skip to content
Open
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
9 changes: 9 additions & 0 deletions Source/Components/GAMs/MessageGAM/MessageGAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ bool MessageGAM::Initialise(StructuredDataI &data) {
trigOnChange = (tempTrigOnChange != 0u);
}
}
if (ret) {
uint8 tempfirstTime;
if (!data.Read("FirstTime", tempfirstTime)) {
firstTime = true;
}
else {
firstTime = (tempfirstTime != 0u);
}
}
return ret;
}

Expand Down
3 changes: 3 additions & 0 deletions Source/Components/GAMs/MessageGAM/MessageGAM.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ namespace MARTe{
* that every state change (e.g. PrepareNextState) the GAM stores the current value to wait for a change happening in the future, by comparing
* past value with current, during that specific state context. In other words, the GAM has to see and "edge" in the command value to trigger a message.
* - TriggerOnChange disabled: the GAM does not need to see an edge in command value to trigger the message, even across state changes.
* - FirstTime: For the first execution of this GAM, regard previousValue as 0. This causes a trigger on change to be true even if this is the first iteration of the Message being
* executed. By disabling this it will ignore the first iteration if TriggerOnChange is enabled and subsequent iterations the previousValue will be what it started with.
* As the GAM keeps track of sent messages and received replies, if the message sent as a consequence of a triggering event is still awaiting for a reply, no further message will
* be sent until the reply acknowledgement.
* Constraints:\n
Expand All @@ -67,6 +69,7 @@ namespace MARTe{
* +GAM1 = {
* Class = TriggerOnChangeGAM
* TriggerOnChange = 1 //Defaults to 1 = true if not present. Allowed values 0 == false or disabled, != 0 == true or enabled (see above)
* FirstTime = 1 // Defaults to 1 = true if not present. Allowed values 0 == false or disabled, != 0 == true or enabled (see above)
* +Events = {
* Class = ReferenceContainer
* +Event1 = {
Expand Down