-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Message Payload Example to training examples.
- Loading branch information
Showing
5 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
sysml/src/training/26. Occurrences/Interaction Example-1.sysml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
sysml/src/training/26. Occurrences/Interaction Example-2.sysml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
sysml/src/training/26. Occurrences/Message Payload Example.sysml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package 'Message Payload Example' { | ||
import 'Event Occurrence Example'::*; | ||
|
||
item def SetSpeed; | ||
item def SensedSpeed; | ||
item def FuelCommand { | ||
attribute fuelFlow : ScalarValues::Real; | ||
} | ||
|
||
part def EngineController; | ||
|
||
part vehicle1 :> vehicle { | ||
part engineController : EngineController { | ||
event occurrence fuelCommandReceived; | ||
then event occurrence fuelCommandForwarded; | ||
} | ||
} | ||
|
||
occurrence def CruiseControlInteraction { | ||
ref part :>> driver; | ||
ref part vehicle :>> vehicle1; | ||
|
||
message setSpeedMessage of SetSpeed | ||
from driver.setSpeedSent to vehicle.cruiseController.setSpeedReceived; | ||
|
||
then message sensedSpeedMessage of SensedSpeed | ||
from vehicle.speedometer.sensedSpeedSent to vehicle.cruiseController.sensedSpeedReceived; | ||
|
||
then message fuelCommandMessage of fuelCommand : FuelCommand | ||
from vehicle.cruiseController.fuelCommandSent to vehicle.engineController.fuelCommandReceived; | ||
|
||
then message fuelCommandForwardingMessage of fuelCommand : FuelCommand = fuelCommandMessage.fuelCommand | ||
from vehicle.engineController.fuelCommandForwarded to vehicle.engine.fuelCommandReceived; | ||
|
||
} | ||
} |