diff --git a/conception/th_receiveFromMon.txt b/conception/th_receiveFromMon.txt index 0d1caf3..4515680 100644 --- a/conception/th_receiveFromMon.txt +++ b/conception/th_receiveFromMon.txt @@ -3,53 +3,55 @@ skinparam monochrome true start :serverOk?; while () - :msgRcv = monitor.Read(); - if (msgRcv.CompareID(MESSAGE_MONITOR_LOST)) then (true) - :printf("Connection avec le moniteur perdue"); - :stopCamera!; - :stopRobot!; - :stopComRobot!; - :stopServer!; - endif + :msgRcv = monitor.Read(); + if (msgRcv.CompareID(MESSAGE_MONITOR_LOST)) then (true) + :printf("Connection avec le moniteur perdue"); + :stopCamera!; + :stopRobot!; + :stopServer!; + endif if (msgRcv.CompareID(MESSAGE_ROBOT_COM_OPEN)) then (true) :openComRobot!; - endif - if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true) - :watchdogMode = WITHOUT_WATCHDOG; - :startRobot!; - endif - if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true) - :watchdogMode = WITH_WATCHDOG; - :startRobot!; - endif - if (msgRcv.CompareID(MESSAGE_ROBOT_GO_FORWARD - || msgRcv.CompareID(MESSAGE_ROBOT_GO_BACKWARD - || msgRcv.CompareID(MESSAGE_ROBOT_GO_LEFT - || msgRcv.CompareID(MESSAGE_ROBOT_GO_RIGHT - || msgRcv.CompareID(MESSAGE_ROBOT_STOP)) then (true) - :move = msg.GetId(); - endif - if (msgRcv.CompareID(MESSAGE_CAM_OPEN)) then (true) - :startCamera!; - endif - if (msgRcv.CompareID(MESSAGE_CAM_CLOSE)) then (true) - :stopCamera!; - endif - if (msgRcv.CompareID(MESSAGE_CAM_ASK_ARENA)) then (true) - :searchArena!; - endif - if (msgRcv.CompareID(MESSAGE_CAM_ARENA_CONFIRM)) then (true) - :validateArena!; - endif - if (msgRcv.CompareID(MESSAGE_CAM_ARENA_INFIRM)) then (true) - :cancelArena!; - endif - if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) then (true) - :startPosition!; - endif - if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) then (true) - :stopPosition!; - endif + endif + if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true) + :watchdogMode = WITHOUT_WATCHDOG; + :startRobot!; + endif + if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true) + :watchdogMode = WITH_WATCHDOG; + :startRobot!; + endif + if (msgRcv.CompareID(MESSAGE_ROBOT_RESET)) then (true) + :stopRobot!; + endif + if (msgRcv.CompareID(MESSAGE_ROBOT_GO_FORWARD + || msgRcv.CompareID(MESSAGE_ROBOT_GO_BACKWARD + || msgRcv.CompareID(MESSAGE_ROBOT_GO_LEFT + || msgRcv.CompareID(MESSAGE_ROBOT_GO_RIGHT + || msgRcv.CompareID(MESSAGE_ROBOT_STOP)) then (true) + :move = msg.GetId(); + endif + if (msgRcv.CompareID(MESSAGE_CAM_OPEN)) then (true) + :startCamera!; + endif + if (msgRcv.CompareID(MESSAGE_CAM_CLOSE)) then (true) + :stopCamera!; + endif + if (msgRcv.CompareID(MESSAGE_CAM_ASK_ARENA)) then (true) + :searchArena!; + endif + if (msgRcv.CompareID(MESSAGE_CAM_ARENA_CONFIRM)) then (true) + :validateArena!; + endif + if (msgRcv.CompareID(MESSAGE_CAM_ARENA_INFIRM)) then (true) + :cancelArena!; + endif + if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_START)) then (true) + :startPosition!; + endif + if (msgRcv.CompareID(MESSAGE_CAM_POSITION_COMPUTE_STOP)) then (true) + :stopPosition!; + endif endwhile stop -@enduml +@enduml \ No newline at end of file