This commit is contained in:
robin
2022-05-21 06:48:12 +08:00
parent b5f918776e
commit 96333ae7a9
45 changed files with 650 additions and 64 deletions
+14
View File
@@ -0,0 +1,14 @@
'use strict';
// 监听事件
module.exports = {
"event1": (args) => {
console.log(args || 'event1')
},
"event2": (args) => {
console.log(args || 'event2')
},
//status定义的有限状态机
"start.ling": (args) => {
console.log(args || 'event2')
},
}
+13
View File
@@ -0,0 +1,13 @@
'use strict';
const Smf = require('bamboo_smf');
const smf = new Smf()
// 测试状态
smf.init('test', 'start')
.push('start', 'start.ling')
.push('ling', 'start.end')
.push('end')
module.exports = smf.getSmfData()
View File