Add comRobot thread to activity diagrams
This commit is contained in:
parent
7d3372a443
commit
c1ce48a19e
3 changed files with 23 additions and 11 deletions
18
conception/th_comRobot.txt
Normal file
18
conception/th_comRobot.txt
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
@startuml
|
||||||
|
skinparam monochrome true
|
||||||
|
start
|
||||||
|
while ()
|
||||||
|
:openComRobot?;
|
||||||
|
:err = robot.Open();
|
||||||
|
if (err) then (robot_ok)
|
||||||
|
:msgSend = new Message(MESSAGE_ANSWER_ACK);
|
||||||
|
else
|
||||||
|
:msgSend = new Message(MESSAGE_ANSWER_NACK);
|
||||||
|
endif
|
||||||
|
:messageToMon!msgSend;
|
||||||
|
|
||||||
|
:closeComRobot?;
|
||||||
|
:robot.Close();
|
||||||
|
endwhile
|
||||||
|
stop
|
||||||
|
@enduml
|
|
@ -3,14 +3,6 @@ skinparam monochrome true
|
||||||
start
|
start
|
||||||
while ()
|
while ()
|
||||||
:startRobot?;
|
: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)
|
if (watchdogMode) then (WITH_WATCHDOG)
|
||||||
:msgSend = robot.Write(new Message(MESSAGE_ROBOT_START_WITH_WD));
|
:msgSend = robot.Write(new Message(MESSAGE_ROBOT_START_WITH_WD));
|
||||||
|
@ -26,7 +18,6 @@ while ()
|
||||||
|
|
||||||
:stopRobot?
|
:stopRobot?
|
||||||
:ordre = STOP_MOVE;
|
:ordre = STOP_MOVE;
|
||||||
:robot.Close();
|
|
||||||
|
|
||||||
endwhile
|
endwhile
|
||||||
stop
|
stop
|
||||||
|
|
|
@ -8,16 +8,19 @@ while ()
|
||||||
:printf("Connection avec le moniteur perdue");
|
:printf("Connection avec le moniteur perdue");
|
||||||
:stopCamera!;
|
:stopCamera!;
|
||||||
:stopRobot!;
|
:stopRobot!;
|
||||||
|
:stopComRobot!;
|
||||||
:stopServer!;
|
:stopServer!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_COM_OPEN)) then (true)
|
if (msgRcv.CompareID(MESSAGE_ROBOT_COM_OPEN)) then (true)
|
||||||
:openComRobot!;
|
:openComRobot!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true)
|
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITHOUT_WD)) then (true)
|
||||||
:startRobotWithoutWd!;
|
:watchdogMode = WITHOUT_WATCHDOG;
|
||||||
|
:startRobot!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true)
|
if (msgRcv.CompareID(MESSAGE_ROBOT_START_WITH_WD)) then (true)
|
||||||
:startRobotWithWd!;
|
:watchdogMode = WITH_WATCHDOG;
|
||||||
|
:startRobot!;
|
||||||
endif
|
endif
|
||||||
if (msgRcv.CompareID(MESSAGE_ROBOT_GO_FORWARD
|
if (msgRcv.CompareID(MESSAGE_ROBOT_GO_FORWARD
|
||||||
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_BACKWARD
|
|| msgRcv.CompareID(MESSAGE_ROBOT_GO_BACKWARD
|
||||||
|
|
Loading…
Reference in a new issue