Skip to content

Commit

Permalink
Added Message Payload Example to training examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
seidewitz committed Nov 10, 2022
1 parent 05b5205 commit 3dee89b
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package 'Interaction Example-1' {
import 'Event Occurrence Example'::*;

attribute def SetSpeed;
attribute def SensedSpeed;
attribute def FuelCommand;
item def SetSpeed;
item def SensedSpeed;
item def FuelCommand;

occurrence def CruiseControlInteraction {
ref part :>> driver;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package 'Interaction Example-2' {
import 'Event Occurrence Example'::*;

attribute def SetSpeed;
attribute def SensedSpeed;
attribute def FuelCommand;
item def SetSpeed;
item def SensedSpeed;
item def FuelCommand;

occurrence def CruiseControlInteraction {

Expand Down
36 changes: 36 additions & 0 deletions sysml/src/training/26. Occurrences/Message Payload Example.sysml
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;

}
}

0 comments on commit 3dee89b

Please sign in to comment.