24 lines
555 B
Text
24 lines
555 B
Text
@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;
|
|
else (MESSAGE_ANSWER_ROBOT_TIMEOUT || \nMESSAGE_ANSWER_ROBOT_UNKNOWN_COMMAND || \nMESSAGE_ANSWER_ROBOT_ERROR)
|
|
:counter++;
|
|
if (counter) then (3)
|
|
:stopRobot!;
|
|
:closeComRobot!;
|
|
:monitor.write(Message(MESSAGE_ANSWER_COM_ERROR));
|
|
else ()
|
|
endif
|
|
endif
|
|
endif
|
|
endwhile
|
|
stop
|
|
@enduml
|