Compare commits

..

No commits in common. "267365183447b5e79f228ccd92402db8ef9fad35" and "66d4c6f94d0feb91727b015bd907529d59a855c4" have entirely different histories.

8 changed files with 0 additions and 147 deletions

View file

@ -1,33 +0,0 @@
@startuml
skinparam monochrome true
start
while ()
:startRobot?;
:err = robot.Open();
if (err) then (robot_ok)
:msgSend = new Message(MESSAGE_ANSWER_ACK);
else
:msgSend = new Message(MESSAGE_ANSWER_NACK);
endif
:messageToMon!msgSend;
if (watchdogMode) then (WITH_WATCHDOG)
:msgSend = robot.Write(new Message(MESSAGE_ROBOT_START_WITH_WD));
else (WITHOUT_WATCHDOG)
:msgSend = robot.Write(new Message(MESSAGE_ROBOT_START_WITHOUT_WD));
endif
if (msgSend->getId()) then (MESSAGE_ANSWER_ACK)
:robotStarted = true;
endif
:messageToMon!msgSend;
:stopRobot?
:ordre = STOP_MOVE;
:robot.Close();
endwhile
stop
@enduml

View file

@ -1,24 +0,0 @@
@startuml
skinparam monochrome true
start
:counter = 0;
:start_period(100 ms);
while ()
:wait_next_period();
if (robotStarted) then (true)
:msgSend = robot.Write(new Message(move));
if (msgSend->getId()) then (MESSAGE_ANSWER_ACK)
:counter = 0;
:robotStarted = true;
else (MESSAGE_ANSWER_ROBOT_TIMEOUT || \nMESSAGE_ANSWER_ROBOT_UNKNOWN_COMMAND || \nMESSAGE_ANSWER_ROBOT_ERROR)
:counter++;
if (counter) then (3)
:stopRobot!;
:monitor.write(Message(MESSAGE_ANSWER_COM_ERROR));
else ()
endif
endif
endif
endwhile
stop
@enduml

View file

@ -1,52 +0,0 @@
@startuml
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!;
:stopServer!;
endif
if (msgRcv.CompareID(MESSAGE_ROBOT_COM_OPEN)) then (true)
:openComRobot!;
endif
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true)
:startRobotWithoutWd!;
endif
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true)
:startRobotWithWd!;
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

View file

@ -1,15 +0,0 @@
@startuml
skinparam monochrome true
start
:start_period(500 ms);
while ()
:wait_next_period();
if(robotStarted)then(true)
:msgSend=robot.Write(robot.getBattery());
:messageToMon!msgSend;
endif
endwhile
stop
@enduml

View file

@ -1,10 +0,0 @@
@startuml
skinparam monochrome true
start
:serverOK?;
while ()
:messageToMon?msg;
:monitor.Write(msg);
endwhile
stop
@enduml

View file

@ -1,13 +0,0 @@
@startuml
skinparam monochrome true
start
:status = monitor.Open();
if (status) then (failed)
:print("Unable to start server");
stop
else (succeed)
:monitor.AcceptClient();
:serverOk!;
stop
endif
@enduml