We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
您可以查看我的 C++ 模板类框架 STTCL ,该框架旨在提供 UML 2.2 状态的映射实现类的图表符号。 STTCL 方法是 GoF 状态模式的改进,并试图填补 UML 状态图表示法的空白。
只要需要,框架实现就操作系统依赖性而言是可配置的(仅适用于异步执行模型)。
有一个 PDF 文档更详细地解释了这个概念。
You may have a look at my C++ template class framework STTCL that is purposed to provide mapping of UML 2.2 state diagram notation to implementation classes. The STTCL approach is a refinement of the GoF state pattern and tries to fill the gap(s) to the UML state chart notation.
The framework implementations are configurable regarding OS dependencies as far these are needed (only for asynchronous execution models).
There's a PDF document available explaining the concept in more detail.
查看量子平台。
我已经在几个嵌入式项目(从非常小的到非常大的)中使用过它,它支持您需要的所有项目符号项目,甚至更多。
QP 的网页比我在这里做得更好。
请注意,QP 并未实现 UML 规范中指定的 100% 功能,但对偏离的情况进行了明确解释,并且根据我使用 QP 的所有经验,它们都不是项目的问题。
还有 2 个 Boost statechart 包,您似乎知道这些。
Check out the Quantum Platform.
I've used it on several embedded projects (from very tiny to very large), and it supports all of the bullet items you require, and more.
The web page for the QP does a much better job of explaining itself than I can do here.
Be aware, the QP does not implement 100% of the functionality specified in the UML specification, but the departures are clearly explained, and in all my experience with the QP, none of them have been a problem for the project.
There are also 2 Boost statechart packages, which you seem to know about.
你应该去看看 Boost MSM,它是 Boost 1.44 的新功能,但看起来相当完整。我自己还没有尝试过,但看起来很有希望。
You should go and check out Boost MSM, it's new for Boost 1.44 but seems quite complete. I have not yet tried it out myself but it looks quite promising.
截至今天,有一个新的 C++(支持带有 Boost 的 C++11 和 C++03)替代方案。它被称为 yasmine (我是架构师)。
它满足上述所有要求。
一些优点和缺点(引自 yasmine 网页):
注意
我知道这是一个老问题,但它是 Google 的“c++ uml 状态机”排名第一的问题,这使得它非常相关。
As of today there is a new C++ (supports C++11 and C++03 with Boost) alternative available. It's called yasmine (and I am the architect).
It fulfills all the above requirements.
Some pros and cons (cited from the yasmine web page):
Note
I know this is an old question, but it's Google's #1 for "c++ uml state machine" which makes it very relevant.
如果您正在寻找一个支持具有 UML 语义的分层和并发状态机(进入/退出、转换、防护、带参数的事件、异步/同步)的框架,请查看我的 状态机代码和图表生成器。
而不是“手动”实现状态机,而是用简单的人类可读可写的 xml 描述来描述状态机,并让状态机生成器用 C++、C# 或 java 编写代码源。
实际上,对于C++版本,生成的代码可以很容易地针对中/大型嵌入式系统进行交叉编译。它已经完成了。
If you are looking for a framework that supports hierarchical and concurrent state machines with UML semantics (entry/exit, transitions, guards, events with parameters, asynchronous/synchronous), have a look at my state machine code and diagram generator.
Instead on implementing the state machine "by hand", describe the state machine in a simple human readable and writable xml description and let the state machine generator write the code source in C++, C# or java.
Actually, for the C++ version, the generated code can be easily cross-compiled for an medium/large size embedded system. It has been done already.