任务的 UML 表示
我正在设计具有许多任务和大量任务间消息的系统。 该系统基本上将用 C 语言开发。
在我的设计中,我尝试使用 UML 表示来显示任务之间传递的消息。 但表示决策等事情变得越来越困难。
他们是否有任何预定义的方法来为使用大量消息的基于任务的系统创建流程图?
不需要是UML,还有其他标准方法可以用于此设计吗?
I am in the process of designing system with a many tasks and a lot of inter-task messages. The system will be basically developed in C.
In my design I am trying to use UML representation to show the messages that are passed between tasks. But it is becoming difficult to represent things like decision making etc.
Are their any predefined method for creating a flow-chart for task based systems that uses a lot messages?
Need not be UML, is their any other standard method that can be used for this design?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用带有 MARTE(实时嵌入式系统建模和分析的 UML 配置文件)注释的序列图或状态机图,因为我注意到您正在使用实时操作系统
use sequence diagram or state machine diagram with MARTE(UML profile for modeling and analysis of real-time embedded system) annotation because i noticed you are working with real-time operating system
如果您用 UML 表示您的设计,请尝试使用名为 Umbrello 的软件。 这为您提供了很大的灵活性来表达您的设计
Please try a software called Umbrello if you are representing your design in UML. This gives you lot of flexibility in representing your design
也许您需要 状态机 或 序列图。
Maybe you need state machines or sequence diagrams.
为了记录消息流,我发现状态机和序列图各有其用处。 状态机更擅长描述改变系统状态的决策。 序列图更适合描述实现协议特定元素的消息。
因为我喜欢使用 Doxygen 作为内部文档,并且它喜欢用 < 绘制调用图和其他图形a href="http://www.graphviz.org/" rel="nofollow noreferrer">GraphViz 工具 dot,我开始使用 dot 来记录我的状态机。 由于 Doxygen 具有直接在源代码中包含点语言的语法(甚至允许从绘图中的元素到生成文档的其他页面的超链接),这非常方便。 最近,Doxygen 明确支持用 mscgen 表示的序列图,允许两种样式的图使用。
与在 Visio 或其他绘图工具中外部绘制相比,直接在源代码中以相当自然的方式表达图形使它们更容易维护。
For documenting message flow, I have found that state machines and sequence diagrams each have their place. State machines are better at describing the decisions that change the state of a system. Sequence diagrams are better at describing the messages that implement a specific element of a protocol.
Since I like to use Doxygen for internal documentation anyway, and it likes to draw call graphs and other figures with GraphViz tool dot, I started using dot to document my state machines. Since Doxygen has a syntax for including a dot language directly in the source code (and even allows hyperlinks from elements in the drawing to other pages of the generated documentation) this has been really convenient. Recently, Doxygen grew explicit support for sequence diagrams expressed with mscgen, allowing both styles of diagram to be used.
Having the figures expressed in a reasonably natural way directly in the source code makes them a lot more likely to be maintained than if they were drawn externally in Visio or some other drawing tool.