当前位置:网站首页>【Rhapsody学习笔记】3:Dishwasher
【Rhapsody学习笔记】3:Dishwasher
2022-07-31 05:17:00 【G_Summer_Song】
Exercise 3 :Dishwasher
1 新建项目Dishwasher
2 添加类“Dishwasher”
3 添加以下属性(Attributes)
类型为int型,初始值为0。
4 添加操作
各操作实现如下:
5 添加类型
浏览器选择包Default,右键选择“新增”–“类型”。
名称设置为“MAX_CYCLES”,种类设置为“Language”,添加描述:const int %s = 3;
。
6 创建组件
按照前面的例程(【Rhapsody学习笔记】1:Hello World)重命名组件 DefaultComponent 为 Test,配置 Defaultconfig 为 Debug。Debug 配置为动画。
7 创建状态图
详细步骤可参考【Rhapsody学习笔记】2:Count Down
8 创建并发状态
用“与线”功能创建并发状态。
9 显示状态名称
在状态图某状态框空白位置右键选择“显示选项”,选择名称。
10 重命名状态名
双击状态名可进行重命名。
11 添加状态
添加以下状态。
12 添加历史记录连接符与图连接符
13 添加缺省转换
14 添加转换
图中[isDryed()]应为[isDried()]。
15 入口操作
对normal状态添加入口操作
16 保存、编译执行
保存文件,编译执行。
点击“转为闲置”,创建一个实例。
- 如果未出现Dishwasher实例,可能是因为配置中没有选择一个初始的instance。
17 打开实例状态图
应该有三个高亮状态
18 插入事件
此时Dishwasher处于闲置状态。
生成事件evStart。方法:右击实例状态图任意位置,点击生成事件。
此时evStart出现在事件队列中。
19 创建测试脚本
- 在组件Test中新增一个文件TestScript.cfg。
- 设置路径为
..\..
- 设置类型为“其他”
- 添加文本元素
- 输入以下内容:
// Script to test the Dishwasher
output TestScript.log
trace #all all
timestamp
// First get the Dishwasher to a known state
go idle
Dishwasher->GEN(evService)
Dishwasher->GEN(evMode)
break Dishwasher stateEntered off
break Dishwasher stateEntered faulty
Dishwasher->GEN(evStart)
go
Dishwasher->GEN(evStart)
go
Dishwasher->GEN(evStart)
go
Dishwasher->GEN(evStart)
go
//should now be in faulty
go
//remove breakpoints
break Dishwasher -stateEntered off
break Dishwasher -stateEntered faulty
20 运行测试脚本
- 此时,脚本已经创建了一个日志文件TestScript.log,我们可以通过添加一个文件,名字为TestScript.log,类型为“其他”,路径为
..\..
。
21 阅读日志文件
浏览器右键日志文件TestScript.log,选择“编辑File”,注意需要项目停止运行。
边栏推荐
- DSPE-PEG-COOH CAS:1403744-37-5 磷脂-聚乙二醇-羧基脂质PEG共轭物
- mPEG-DMPE 甲氧基-聚乙二醇-双肉豆蔻磷脂酰乙醇胺用于形成隐形脂质体
- The array technique, my love
- 词向量——demo
- 机器学习和深度学习概述
- pyspark.ml特征变换模块
- Tensorflow——demo
- 钉钉企业内部-H5微应用开发
- [Solved] ssh connection report: Bad owner or permissions on C:\\Users/XXX/.ssh/config
- Data Preprocessing, Feature Engineering, and Feature Learning - Excerpt
猜你喜欢
The browser looks for events bound or listened to by js
Learn how to get a database connection with JDBC
朴素贝叶斯文本分类(代码实现)
Cholesterol-PEG-Amine CLS-PEG-NH2 Cholesterol-Polyethylene Glycol-Amino Research Use
多元线性回归方程原理及其推导
WeChat applet source code acquisition and decompilation method
VS connects to MYSQL through ODBC (2)
After unicloud is released, the applet prompts that the connection to the local debugging service failed. Please check whether the client and the host are under the same local area network.
DSPE-PEG-Azide DSPE-PED-N3 磷脂-聚乙二醇-叠氮脂质PFG
This in js points to the prototype object
随机推荐
wangeditor编辑器内容传至后台服务器存储
Redis-Hash
VS connects to MYSQL through ODBC (2)
VS2017 connects to MYSQL
深度学习知识点杂谈
DSPE-PEG-Biotin,CAS:385437-57-0,磷脂-聚乙二醇-生物素可延长循环半衰期
Embedding cutting-edge understanding
Pytorch实现ResNet
DSPE-PEG-COOH CAS:1403744-37-5 磷脂-聚乙二醇-羧基脂质PEG共轭物
Navicat从本地文件中导入sql文件
cocos2d-x-3.2 image graying effect
2022年SQL大厂高频实战面试题(详细解析)
Software Testing Interview Questions 2021
DSPE-PEG-Biotin, CAS: 385437-57-0, phospholipid-polyethylene glycol-biotin prolongs circulating half-life
mPEG-DSPE 178744-28-0 Methoxy-polyethylene glycol-phosphatidylethanolamine linear PEG phospholipids
DSPE-PEG-Thiol DSPE-PEG-SH phospholipid-polyethylene glycol-thiol liposome for later use
cv2.resize()是反的
自己设置的私密文件,在哪找
Picture-in-Picture API in the browser
random.randint函数用法