我目前正在学校进行最后的项目。并且即将毕业。我在使用UML图时总是遇到困难,并且我在做出决定使用我的代码来作图时要做出艰难的决定。
我的代码是python脚本,并且包含以以下方式工作的循环:
I run the script from a terminal ->
Terminal listens to two keys (W & Q).
If Q is pressed the script stops.
If W is pressed the loop begins in the following order:
Raspberry Pi camera takes a picture ->
Crop specific portion out of said picture and save it ->
Run Text recognition on that picture, which returns a text string and is saved in a variable ->
Run Regex to filter out junk characters from text string and create new "clean" text string ->
Run GET request to website using clean text string, and get return based on it. ->
Print out response from request.
哪个图是使该序列易于理解的最佳选择。我研究了各种图,例如系统序列图等。但是我还没有找到真正适合我使用的东西。我应该只使用流程图吗?还是那里有更好的东西可供我使用?
您要使用事件驱动的流程链(EPC)。
在这种情况下(看不到您的代码),我建议使用“事件驱动的流程链”简称:(EPC),[德语:(EPK),Ereignisgesteuerte Prozesskette]。
大多数时候,UML习惯于显示“类结构”而不是链/脚本中的过程。
EPC使用逻辑运算符,例如OR,AND和XOR,可以表示以下事件:
'终端监听两个键(W&Q)' => XOR-> W-> Q
您可以在此处了解更多信息。
编辑:
在仅限于UML图的情况下:
在七个行为UML图中,您确实应该使用qwerty_so用户建议的“ UML活动图”。它类似于EPC,可以描述为UML“流程图”变体。
UML图仅限于六个“结构” UML图和七个“行为” UML图:
行为UML图
您可以在此处阅读有关活动图的更多信息。
您可以在此处阅读有关UML图类型的更多信息。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句