nodeskini 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/client/archive/bundle.js +11528 -0
- package/client/archive/golem.html +60 -0
- package/client/archive/golemClient.js +595 -0
- package/client/archive/golembundle.js +11634 -0
- package/client/archive/sequencer.html +43 -0
- package/client/archive/sequenceurClient.js +815 -0
- package/client/archive/stylegolem.css +158 -0
- package/client/archive/stylesequenceur.css +204 -0
- package/client/clientListe/Sortable-master/.circleci/config.yml +33 -0
- package/client/clientListe/Sortable-master/.editorconfig +15 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/bug-report.md +73 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/custom-template.md +48 -0
- package/client/clientListe/Sortable-master/.github/ISSUE_TEMPLATE/feature-request.md +41 -0
- package/client/clientListe/Sortable-master/.jshintrc +25 -0
- package/client/clientListe/Sortable-master/.testcaferc.json +7 -0
- package/client/clientListe/Sortable-master/CONTRIBUTING.md +26 -0
- package/client/clientListe/Sortable-master/LICENSE +21 -0
- package/client/clientListe/Sortable-master/README.md +813 -0
- package/client/clientListe/Sortable-master/Sortable.js +3709 -0
- package/client/clientListe/Sortable-master/Sortable.min.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.js +2 -0
- package/client/clientListe/Sortable-master/Sortable.min.old.old.js +2 -0
- package/client/clientListe/Sortable-master/babel.config.js +27 -0
- package/client/clientListe/Sortable-master/bower.json +30 -0
- package/client/clientListe/Sortable-master/entry/entry-complete.js +8 -0
- package/client/clientListe/Sortable-master/entry/entry-core.js +19 -0
- package/client/clientListe/Sortable-master/entry/entry-defaults.js +19 -0
- package/client/clientListe/Sortable-master/index.html +460 -0
- package/client/clientListe/Sortable-master/modular/sortable.complete.esm.js +3701 -0
- package/client/clientListe/Sortable-master/modular/sortable.core.esm.js +3698 -0
- package/client/clientListe/Sortable-master/modular/sortable.esm.js +3699 -0
- package/client/clientListe/Sortable-master/package-lock.json +5704 -0
- package/client/clientListe/Sortable-master/package.json +56 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/AutoScroll.js +270 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/README.md +80 -0
- package/client/clientListe/Sortable-master/plugins/AutoScroll/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/MultiDrag.js +617 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/README.md +96 -0
- package/client/clientListe/Sortable-master/plugins/MultiDrag/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/OnSpill.js +79 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/README.md +60 -0
- package/client/clientListe/Sortable-master/plugins/OnSpill/index.js +1 -0
- package/client/clientListe/Sortable-master/plugins/README.md +178 -0
- package/client/clientListe/Sortable-master/plugins/Swap/README.md +55 -0
- package/client/clientListe/Sortable-master/plugins/Swap/Swap.js +90 -0
- package/client/clientListe/Sortable-master/plugins/Swap/index.js +1 -0
- package/client/clientListe/Sortable-master/scripts/banner.js +8 -0
- package/client/clientListe/Sortable-master/scripts/build.js +17 -0
- package/client/clientListe/Sortable-master/scripts/esm-build.js +28 -0
- package/client/clientListe/Sortable-master/scripts/minify.js +11 -0
- package/client/clientListe/Sortable-master/scripts/test-compat.js +30 -0
- package/client/clientListe/Sortable-master/scripts/test.js +21 -0
- package/client/clientListe/Sortable-master/scripts/umd-build.js +15 -0
- package/client/clientListe/Sortable-master/src/Animation.js +175 -0
- package/client/clientListe/Sortable-master/src/BrowserInfo.js +12 -0
- package/client/clientListe/Sortable-master/src/EventDispatcher.js +57 -0
- package/client/clientListe/Sortable-master/src/PluginManager.js +87 -0
- package/client/clientListe/Sortable-master/src/Sortable.js +1971 -0
- package/client/clientListe/Sortable-master/src/utils.js +556 -0
- package/client/clientListe/Sortable-master/st/app.js +224 -0
- package/client/clientListe/Sortable-master/st/iframe/frame.html +32 -0
- package/client/clientListe/Sortable-master/st/iframe/index.html +49 -0
- package/client/clientListe/Sortable-master/st/logo.png +0 -0
- package/client/clientListe/Sortable-master/st/og-image.png +0 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.css +1 -0
- package/client/clientListe/Sortable-master/st/prettify/prettify.js +46 -0
- package/client/clientListe/Sortable-master/st/prettify/run_prettify.js +64 -0
- package/client/clientListe/Sortable-master/st/saucelabs.svg +1 -0
- package/client/clientListe/Sortable-master/st/theme.css +254 -0
- package/client/clientListe/Sortable-master/tests/Sortable.compat.test.js +39 -0
- package/client/clientListe/Sortable-master/tests/Sortable.test.js +386 -0
- package/client/clientListe/Sortable-master/tests/dual-list.html +34 -0
- package/client/clientListe/Sortable-master/tests/empty-list.html +30 -0
- package/client/clientListe/Sortable-master/tests/filter.html +27 -0
- package/client/clientListe/Sortable-master/tests/handles.html +27 -0
- package/client/clientListe/Sortable-master/tests/nested.html +67 -0
- package/client/clientListe/Sortable-master/tests/single-list.html +25 -0
- package/client/clientListe/Sortable-master/tests/style.css +18 -0
- package/client/clientListe/clientListe.html +148 -0
- package/client/clientListe/clientListe.js +1508 -0
- package/client/clientListe/clientListebundle.js +13164 -0
- package/client/clientListe/images/poubelle.png +0 -0
- package/client/clientListe/images/start.png +0 -0
- package/client/clientListe/images/stop.png +0 -0
- package/client/clientListe/images/submit.png +0 -0
- package/client/clientListe/sortable-theme-bootstrap.css +90 -0
- package/client/configurateur/configReact.js +273 -0
- package/client/configurateur/configReactbundle.js +295 -0
- package/client/configurateur/configurateur.css +95 -0
- package/client/configurateur/configurateur.html +48 -0
- package/client/configurateur/lib/jexcel.css +755 -0
- package/client/configurateur/lib/jexcel.js +14970 -0
- package/client/configurateur/lib/jsuites.css +2801 -0
- package/client/configurateur/lib/jsuites.js +11822 -0
- package/client/configurateur/lib/react-dom.production.min.js +239 -0
- package/client/configurateur/lib/react.production.min.js +32 -0
- package/client/configurateur/src/configReact.js +247 -0
- package/client/controleur/clientcontroleur.js +536 -0
- package/client/controleur/clientcontroleur.test.js +282 -0
- package/client/controleur/controleur.html +51 -0
- package/client/controleur/controleurbundle.js +565 -0
- package/client/controleur/stylecontroleur.css +236 -0
- package/client/controleurHH/controleurHH.html +71 -0
- package/client/controleurHH/controleurHH.js +252 -0
- package/client/controleurHH/styles/index.css +320 -0
- package/client/controleurHH/styles/material.css +11552 -0
- package/client/parametrage/paramReact.js +473 -0
- package/client/parametrage/paramReactbundle.js +500 -0
- package/client/parametrage/parametrage.css +111 -0
- package/client/parametrage/parametrage.html +163 -0
- package/client/parametrage/src/paramReact.js +459 -0
- package/client/score/hash.js +83 -0
- package/client/score/p5.min.js +3 -0
- package/client/score/parto1.js +1171 -0
- package/client/score/parto1bundle.js +1181 -0
- package/client/score/processing.min.js +431 -0
- package/client/score/score.html +15 -0
- package/client/score/score.js +34 -0
- package/client/simulateurListe/simulateurFork.js +750 -0
- package/client/simulateurListe/simulateurFork.mjs +681 -0
- package/client/simulateurListe/simulateurForkSansReorg.js +569 -0
- package/client/simulateurListe/simulateurListe.js +628 -0
- package/myReact/archive/Nodeemitvaluedlocal1.hh.js +52 -0
- package/myReact/archive/abort-parNode.js +79 -0
- package/myReact/archive/abroNode.js +169 -0
- package/myReact/archive/abroNode2.js +80 -0
- package/myReact/archive/atom.compile.hh.js +51 -0
- package/myReact/archive/await-countNode.js +67 -0
- package/myReact/archive/await-nowvalNode.js +44 -0
- package/myReact/archive/callHH.js +96 -0
- package/myReact/archive/emit-if2.hh.compiled.js +113 -0
- package/myReact/archive/every1Node.js +35 -0
- package/myReact/archive/if-runNode.js +74 -0
- package/myReact/archive/if1Node.js +43 -0
- package/myReact/archive/makeawait.js +0 -0
- package/myReact/archive/myReact.old.js +684 -0
- package/myReact/archive/orchestration.js +281 -0
- package/myReact/archive/orchestration1.js +132 -0
- package/myReact/archive/orchestration1.xml +465 -0
- package/myReact/archive/orchestration2.js +161 -0
- package/myReact/archive/orchestrationHH.mano.js +280 -0
- package/myReact/archive/orchestrationHHTest.js +428 -0
- package/myReact/archive/orchestrationHHTest.xml +234 -0
- package/myReact/archive/orchestrationHHTestRun.js +104 -0
- package/myReact/archive/orchestrationHHTestRun.xml +34 -0
- package/myReact/archive/orchestrationTest0.js +178 -0
- package/myReact/archive/orchestrationTest1.js +181 -0
- package/myReact/archive/orchestrationTest2.js +281 -0
- package/myReact/archive/run3pointsNode.js +59 -0
- package/myReact/archive/runNode.js +123 -0
- package/myReact/archive/runNode2.js +91 -0
- package/myReact/archive/testAwait1.js +141 -0
- package/myReact/archive/testAwait1.xml +86 -0
- package/myReact/archive/testEvery1.js +122 -0
- package/myReact/archive/testEvery1.xml +79 -0
- package/myReact/archive/testHH1.js +135 -0
- package/myReact/archive/testHH1.xml +86 -0
- package/myReact/archive/testHH1revu.js +104 -0
- package/myReact/archive/testHH2.js +122 -0
- package/myReact/archive/testHH2.xml +79 -0
- package/myReact/archive/testHH3.js +130 -0
- package/myReact/archive/testHH3.xml +86 -0
- package/myReact/archive/testHHabort.js +121 -0
- package/myReact/archive/testHHabort.xml +83 -0
- package/myReact/archive/testMakeawait.js +202 -0
- package/myReact/archive/testRun1.js +168 -0
- package/myReact/archive/testRun1.xml +142 -0
- package/myReact/archive/titi.js +28 -0
- package/myReact/archive/titi.xml +110 -0
- package/myReact/archive/toto.js +73 -0
- package/myReact/archive/toto.xml +198 -0
- package/myReact/archive/trap-await-parallelNode.js +123 -0
- package/myReact/inutiles/hiver2022.xml +804 -0
- package/myReact/inutiles/hopeNode.xml +459 -0
- package/myReact/inutiles/mars2022.xml +871 -0
- package/myReact/inutiles/mystique1.xml +318 -0
- package/myReact/inutiles/mystiqueOSC.xml +277 -0
- package/myReact/inutiles/opus5Node.xml +1271 -0
- package/myReact/inutiles/opus5NodeLinux.xml +1241 -0
- package/myReact/inutiles/orchestrationHH.xml +541 -0
- package/myReact/inutiles/orchestrationHH2.xml +547 -0
- package/myReact/inutiles/testHH.xml +95 -0
- package/myReact/inutiles/trouveLaPercuTenor.xml +349 -0
- package/myReact/myReact.js +744 -0
- package/myReact/myReact.min.js +1 -0
- package/myReact/orchestrationHH.js +311 -0
- package/myReact/orchestrationHH.mjs +436 -0
- package/myReact/orchestrationHH.mjs.map +1 -0
- package/package.json +46 -0
- package/serveur/OSCandMidi.mjs +361 -0
- package/serveur/computeScore.mjs +415 -0
- package/serveur/controleDAW.mjs +1149 -0
- package/serveur/defaultSession.csv +2 -0
- package/serveur/defaultSkiniParametres.js +119 -0
- package/serveur/gameOSC.mjs +96 -0
- package/serveur/groupeClientsSons.mjs +1014 -0
- package/serveur/ipConfig.json +24 -0
- package/serveur/ipConfig127.json +19 -0
- package/serveur/ipConfig75.json +17 -0
- package/serveur/ipConfigBH.json +19 -0
- package/serveur/ipConfigLocal.json +19 -0
- package/serveur/midiConfig.json +26 -0
- package/serveur/midiConfigBH.json +26 -0
- package/serveur/midiConfigVoid.json +3 -0
- package/serveur/midimix.mjs +570 -0
- package/serveur/saveParam.mjs +159 -0
- package/serveur/skiniParametres.good.js +132 -0
- package/serveur/skiniParametres.js +106 -0
- package/serveur/utilsHHSkini.hh.js +64 -0
- package/serveur/utilsSkini.mjs +137 -0
- package/serveur/websocketServer.mjs +2052 -0
- package/serveur/workerInterfaceZ.mjs +327 -0
- package/serveur/workerSynchro.mjs +49 -0
- package/skini.mjs +141 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// Programme en myReact
|
|
2
|
+
|
|
3
|
+
var violon1, violon2, violon3, tick, stopTankViolon, groupePercuON, stopTankPiano, groupeTrompetteON, groupeTrompetteOFF, groupePercuOFF, tankViolon, tankPiano, piano1, piano2, piano3;
|
|
4
|
+
|
|
5
|
+
var mr = require("./myReact.js");
|
|
6
|
+
var gcs = require("../serveur/autocontroleur/groupeClientsSons.js");
|
|
7
|
+
|
|
8
|
+
var debug1 = true;
|
|
9
|
+
var debug = false;
|
|
10
|
+
|
|
11
|
+
// A mettre dans Blockly
|
|
12
|
+
var skini;
|
|
13
|
+
function setSkini(skiniMaster){
|
|
14
|
+
skini = skiniMaster;
|
|
15
|
+
//console.log("******* orchestration: setSkini:", skini);
|
|
16
|
+
}
|
|
17
|
+
exports.setSkini = setSkini;
|
|
18
|
+
|
|
19
|
+
mr.createSignal("stopTankViolon", 0);
|
|
20
|
+
mr.createSignal("stopTankPiano", 0);
|
|
21
|
+
|
|
22
|
+
// A mettre dans Blockly
|
|
23
|
+
mr.createSignal("tick", 0);
|
|
24
|
+
mr.createSignal("DAWON", 0);
|
|
25
|
+
|
|
26
|
+
// Debut de module
|
|
27
|
+
tankViolon = [
|
|
28
|
+
// Debut de abort
|
|
29
|
+
mr._abort("stopTankViolon",1,
|
|
30
|
+
[
|
|
31
|
+
mr._atom( ()=> {console.log('Attend Percu1');} ),
|
|
32
|
+
mr._await("Percu1", 1),
|
|
33
|
+
|
|
34
|
+
mr._atom( ()=> {console.log('Attend Percu2');} ),
|
|
35
|
+
mr._await("Percu2", 1),
|
|
36
|
+
|
|
37
|
+
mr._atom( ()=> {console.log('Attend Percu3');} ),
|
|
38
|
+
mr._await("Percu3", 1),
|
|
39
|
+
]
|
|
40
|
+
),
|
|
41
|
+
mr._atom( ()=> {console.log('Tank Violon tué !');} ),
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
// Debut de module
|
|
45
|
+
tankPiano = [
|
|
46
|
+
// Debut de abort
|
|
47
|
+
mr._abort("stopTankPiano",1,
|
|
48
|
+
[
|
|
49
|
+
mr._atom( ()=> {console.log('Attend Percu4');} ),
|
|
50
|
+
mr._await("Percu4", 1),
|
|
51
|
+
|
|
52
|
+
mr._atom( ()=> {console.log('Attend Percu5');} ),
|
|
53
|
+
mr._await("Percu5", 1),
|
|
54
|
+
|
|
55
|
+
mr._atom( ()=> {console.log('Attend Percu6');} ),
|
|
56
|
+
mr._await("Percu6", 1),
|
|
57
|
+
]
|
|
58
|
+
),
|
|
59
|
+
mr._atom( ()=> {console.log('Tank Piano tué !');} ),
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
var instructions = [
|
|
64
|
+
mr._atom( ()=> { gcs.setComputeScorePolicy(2); } ),
|
|
65
|
+
mr._atom( ()=> { gcs.setComputeScoreClass(1); } ),
|
|
66
|
+
|
|
67
|
+
mr._abort("stop",1,
|
|
68
|
+
[
|
|
69
|
+
mr._await("start", 1),
|
|
70
|
+
mr._par(
|
|
71
|
+
[
|
|
72
|
+
mr._every("tick",1,
|
|
73
|
+
[
|
|
74
|
+
mr._atom( ()=> {console.log('orchestration: tick 1');} ),
|
|
75
|
+
]
|
|
76
|
+
),
|
|
77
|
+
mr._seq(
|
|
78
|
+
[
|
|
79
|
+
mr._atom( ()=> {console.log('Début orchestration 1');} ),
|
|
80
|
+
mr._emit("groupe1OUT", [true, 255]),
|
|
81
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(255,"groupe1",true);}),
|
|
82
|
+
mr._await("tick", 5),
|
|
83
|
+
mr._atom( ()=> {console.log('Après 5 ticks');} ),
|
|
84
|
+
|
|
85
|
+
// Debut de par
|
|
86
|
+
mr._par(
|
|
87
|
+
[
|
|
88
|
+
// Debut de par
|
|
89
|
+
mr._par(
|
|
90
|
+
[
|
|
91
|
+
// Debut de run module
|
|
92
|
+
mr._run(tankViolon),
|
|
93
|
+
|
|
94
|
+
// Debut de seq
|
|
95
|
+
mr._seq(
|
|
96
|
+
[
|
|
97
|
+
mr._await("tick", 5),
|
|
98
|
+
mr._atom( ()=> {console.log('Après 5 ticks violon');} ),
|
|
99
|
+
mr._emit("stopTankViolon",0),
|
|
100
|
+
]
|
|
101
|
+
),
|
|
102
|
+
]
|
|
103
|
+
),
|
|
104
|
+
|
|
105
|
+
// Debut de par
|
|
106
|
+
mr._par(
|
|
107
|
+
[
|
|
108
|
+
// Debut de run module
|
|
109
|
+
mr._run(tankPiano),
|
|
110
|
+
// Debut de seq
|
|
111
|
+
mr._seq(
|
|
112
|
+
[
|
|
113
|
+
mr._await("tick", 5),
|
|
114
|
+
mr._atom( ()=> {console.log('Après 5 ticks piano');} ),
|
|
115
|
+
mr._emit("stopTankPiano",0),
|
|
116
|
+
]
|
|
117
|
+
),
|
|
118
|
+
]
|
|
119
|
+
),
|
|
120
|
+
]
|
|
121
|
+
),
|
|
122
|
+
|
|
123
|
+
mr._emit("groupe1OUT",[false, 255]),
|
|
124
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(255,"groupe1",false);}),
|
|
125
|
+
|
|
126
|
+
mr._emit("groupe2OUT",[true, 255]),
|
|
127
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(255,"groupe2",true);}),
|
|
128
|
+
|
|
129
|
+
mr._await("tick", 5),
|
|
130
|
+
|
|
131
|
+
mr._emit("groupe2OUT",[false, 255]),
|
|
132
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(255,"groupe2",false);}),
|
|
133
|
+
|
|
134
|
+
mr._atom( ()=> {console.log('Fin orchestration');} ),
|
|
135
|
+
mr._atom( ()=> { gcs.cleanChoiceList(255); } ),
|
|
136
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('Fin orchestration'); } ),
|
|
137
|
+
]
|
|
138
|
+
),
|
|
139
|
+
mr._every("tick",1,
|
|
140
|
+
[
|
|
141
|
+
mr._atom( ()=> {console.log('orchestration: tick 2');} ),
|
|
142
|
+
]
|
|
143
|
+
),
|
|
144
|
+
mr._every("groupe1OUT",1,
|
|
145
|
+
[
|
|
146
|
+
mr._atom( ()=> {console.log('orchestration: groupe1OUT 2');} ),
|
|
147
|
+
]
|
|
148
|
+
),
|
|
149
|
+
]
|
|
150
|
+
),
|
|
151
|
+
]
|
|
152
|
+
),
|
|
153
|
+
mr._atom( ()=> {console.log('Orchestration Stop');} ),
|
|
154
|
+
mr._atom( ()=> { gcs.cleanChoiceList(255); } ),
|
|
155
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('Orchestration Stop'); } ),
|
|
156
|
+
];
|
|
157
|
+
|
|
158
|
+
// A mettre dans Blockly
|
|
159
|
+
var prog = mr.createModule(instructions);
|
|
160
|
+
|
|
161
|
+
// A mettre dans Blockly
|
|
162
|
+
function runProg(){
|
|
163
|
+
// mr.printProgram(prog, false);
|
|
164
|
+
mr.runProg(prog);
|
|
165
|
+
//skini.test1("**** depuis orchestration");
|
|
166
|
+
}
|
|
167
|
+
exports.runProg = runProg;
|
|
168
|
+
|
|
169
|
+
// A mettre dans Blockly
|
|
170
|
+
function createListener(signal, action){
|
|
171
|
+
if(debug) console.log("orchestration: createListener: ", signal);
|
|
172
|
+
mr.createSignal(signal, 0);
|
|
173
|
+
mr.addEventListener(signal, action);
|
|
174
|
+
}
|
|
175
|
+
exports.createListener = createListener;
|
|
176
|
+
|
|
177
|
+
// A mettre dans Blockly
|
|
178
|
+
function activateSignal(signal, val){
|
|
179
|
+
mr.activateSignal(signal, val);
|
|
180
|
+
}
|
|
181
|
+
exports.activateSignal = activateSignal;
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
// Programme en myReact
|
|
3
|
+
|
|
4
|
+
var violon1, violon2, violon3, tick, stopTankViolon, groupePercuON, stopTankPiano, groupeTrompetteON, groupeTrompetteOFF, groupePercuOFF, tankViolon, tankPiano, piano1, piano2, piano3;
|
|
5
|
+
|
|
6
|
+
var mr = require("./myReact.js");
|
|
7
|
+
var gcs = require("../serveur/autocontroleur/groupeClientsSons.js");
|
|
8
|
+
|
|
9
|
+
var debug1 = true;
|
|
10
|
+
var debug = false;
|
|
11
|
+
|
|
12
|
+
// A mettre dans Blockly pour des retours de l'orchestration
|
|
13
|
+
// mais il est mieux de passer par gcs ou atom
|
|
14
|
+
var skini;
|
|
15
|
+
function setSkini(skiniMaster){
|
|
16
|
+
skini = skiniMaster;
|
|
17
|
+
}
|
|
18
|
+
exports.setSkini = setSkini;
|
|
19
|
+
|
|
20
|
+
// A mettre dans Blockly pour les signaux locaux
|
|
21
|
+
mr.createSignal("tick", 0);
|
|
22
|
+
mr.createSignal("startTimer", 0);
|
|
23
|
+
mr.createSignal("stopTimer", 0);
|
|
24
|
+
|
|
25
|
+
// On utilise un loop pour que timer reste actif
|
|
26
|
+
// le run au sens HH n'existe pas, quand on appelle
|
|
27
|
+
// un module c'est toujours le même et pas un nouvel objet
|
|
28
|
+
// Le module ici n'est qu'une facilité de présentation du code.
|
|
29
|
+
var timer = [
|
|
30
|
+
mr._loop([
|
|
31
|
+
mr._seq([
|
|
32
|
+
mr._await("startTimer", 1),
|
|
33
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('Il reste 10s pour jouer'); } ),
|
|
34
|
+
mr._atom( ()=> {console.log('Début timer');} ),
|
|
35
|
+
mr._await("tick", 2),
|
|
36
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('8s pour jouer'); } ),
|
|
37
|
+
mr._await("tick", 2),
|
|
38
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('6s pour jouer'); } ),
|
|
39
|
+
mr._await("tick", 2),
|
|
40
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('4s pour jouer'); } ),
|
|
41
|
+
mr._await("tick", 2),
|
|
42
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('2s pour jouer'); } ),
|
|
43
|
+
mr._await("tick", 2),
|
|
44
|
+
mr._atom( ()=> { gcs.alertInfoScoreOFF(); } ),
|
|
45
|
+
mr._emit("stopTimer", 0),
|
|
46
|
+
]),
|
|
47
|
+
]),
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
var timeCounter = 0;
|
|
51
|
+
|
|
52
|
+
var instructions = [
|
|
53
|
+
mr._abort("stop",1,
|
|
54
|
+
[
|
|
55
|
+
mr._par(
|
|
56
|
+
[
|
|
57
|
+
mr._every("tick", 1,
|
|
58
|
+
[
|
|
59
|
+
mr._atom( ()=> {
|
|
60
|
+
timeCounter++;
|
|
61
|
+
gcs.setTickOnControler(timeCounter);
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
]
|
|
65
|
+
),
|
|
66
|
+
mr._run(timer),
|
|
67
|
+
mr._seq(
|
|
68
|
+
[
|
|
69
|
+
mr._await("start", 1),
|
|
70
|
+
|
|
71
|
+
mr._atom( ()=> { gcs.setTimerDivision(2); } ),
|
|
72
|
+
mr._atom( ()=> { gcs.setpatternListLength([5, 255]); } ),
|
|
73
|
+
|
|
74
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('Duel trouve la percu'); } ),
|
|
75
|
+
mr._await("tick", 4),
|
|
76
|
+
|
|
77
|
+
mr._atom( ()=> { gcs.alertInfoScoreOFF(); } ),
|
|
78
|
+
mr._atom( ()=> { gcs.setComputeScorePolicy(2); } ),
|
|
79
|
+
|
|
80
|
+
// djembé ---------------------------------------
|
|
81
|
+
mr._atom( ()=> { gcs.setComputeScoreClass(5); } ),
|
|
82
|
+
|
|
83
|
+
mr._emit("djembeOUT", [true, 2]),
|
|
84
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(2,"djembeOUT",true);}),
|
|
85
|
+
|
|
86
|
+
// Séquence djembé pour groupe 0
|
|
87
|
+
mr._atom( ()=> { gcs.alertInfoScoreON(' Djembe pour groupe Skini 0 '); } ),
|
|
88
|
+
|
|
89
|
+
mr._emit("groupe5OUT", [true, 0]),
|
|
90
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(0,"groupe5OUT",true);}),
|
|
91
|
+
|
|
92
|
+
mr._await("groupe5IN", 1),
|
|
93
|
+
mr._atom( ()=> { console.log("groupe5IN djembé"); } ),
|
|
94
|
+
|
|
95
|
+
/* mr._emit("startTimer", 0),
|
|
96
|
+
mr._abort("stopTimer", 1 ,
|
|
97
|
+
[
|
|
98
|
+
mr._loop(
|
|
99
|
+
[
|
|
100
|
+
mr._await("groupe5IN", 1),
|
|
101
|
+
mr._atom( ()=> { console.log("groupe5IN"); } ),
|
|
102
|
+
]
|
|
103
|
+
),
|
|
104
|
+
]
|
|
105
|
+
),*/
|
|
106
|
+
|
|
107
|
+
mr._emit("startTimer", 0),
|
|
108
|
+
mr._await("stopTimer", 1),
|
|
109
|
+
|
|
110
|
+
mr._emit("groupe5OUT", [false, 0]),
|
|
111
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(0,"groupe5OUT",false);}),
|
|
112
|
+
|
|
113
|
+
mr._atom( ()=> { gcs.cleanChoiceList(0); } ),
|
|
114
|
+
|
|
115
|
+
// Séquence djembé pour groupe 1
|
|
116
|
+
mr._atom( ()=> { gcs.alertInfoScoreON(' Djembe pour groupe Skini 1 '); } ),
|
|
117
|
+
|
|
118
|
+
mr._emit("groupe6OUT", [true, 1]),
|
|
119
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(1,"groupe6OUT",true);}),
|
|
120
|
+
|
|
121
|
+
mr._await("groupe6IN", 1),
|
|
122
|
+
mr._atom( ()=> { console.log("groupe6IN djembé"); } ),
|
|
123
|
+
|
|
124
|
+
/* mr._emit("startTimer", 0),
|
|
125
|
+
mr._abort("stopTimer", 1 ,
|
|
126
|
+
[
|
|
127
|
+
mr._loop(
|
|
128
|
+
[
|
|
129
|
+
mr._await("groupe5IN", 1),
|
|
130
|
+
mr._atom( ()=> { console.log("groupe5IN"); } ),
|
|
131
|
+
]
|
|
132
|
+
),
|
|
133
|
+
]
|
|
134
|
+
),
|
|
135
|
+
*/
|
|
136
|
+
mr._emit("startTimer", 0),
|
|
137
|
+
mr._await("stopTimer", 1),
|
|
138
|
+
|
|
139
|
+
mr._emit("groupe6OUT", [false, 1]),
|
|
140
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(1,"groupe6OUT",false);}),
|
|
141
|
+
|
|
142
|
+
mr._atom( ()=> { gcs.cleanChoiceList(1); } ),
|
|
143
|
+
|
|
144
|
+
// Fin djembé
|
|
145
|
+
mr._emit("djembeOUT", [false, 2]),
|
|
146
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(2,"djembeOUT",false);}),
|
|
147
|
+
mr._atom( ()=> { gcs.cleanQueues(); } ),
|
|
148
|
+
|
|
149
|
+
// derwish -------------------------------------------
|
|
150
|
+
mr._atom( ()=> { gcs.setComputeScoreClass(1); } ),
|
|
151
|
+
|
|
152
|
+
mr._emit("derwishOUT", [true, 2]),
|
|
153
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(2,"derwishOUT",true);}),
|
|
154
|
+
|
|
155
|
+
// Séquence derwish pour groupe 0
|
|
156
|
+
mr._atom( ()=> { gcs.alertInfoScoreON(' derwish pour groupe Skini 0 '); } ),
|
|
157
|
+
|
|
158
|
+
mr._emit("groupe1OUT", [true, 0]),
|
|
159
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(0,"groupe1OUT",true);}),
|
|
160
|
+
|
|
161
|
+
mr._await("groupe1IN", 1),
|
|
162
|
+
mr._atom( ()=> { console.log("groupe1IN derwish"); } ),
|
|
163
|
+
|
|
164
|
+
mr._emit("startTimer", 0),
|
|
165
|
+
mr._await("stopTimer", 1),
|
|
166
|
+
|
|
167
|
+
mr._emit("groupe1OUT", [false, 0]),
|
|
168
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(0,"groupe1OUT",false);}),
|
|
169
|
+
|
|
170
|
+
mr._atom( ()=> { gcs.cleanChoiceList(0); } ),
|
|
171
|
+
|
|
172
|
+
// Séquence derwish pour groupe 1
|
|
173
|
+
mr._atom( ()=> { gcs.alertInfoScoreON(' derwish pour groupe Skini 1 '); } ),
|
|
174
|
+
|
|
175
|
+
mr._emit("groupe2OUT", [true, 1]),
|
|
176
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(1,"groupe1OUT",true);}),
|
|
177
|
+
|
|
178
|
+
mr._await("groupe2IN", 1),
|
|
179
|
+
mr._atom( ()=> { console.log("groupe1IN derwish 2"); } ),
|
|
180
|
+
|
|
181
|
+
mr._emit("startTimer", 0),
|
|
182
|
+
mr._await("stopTimer", 1),
|
|
183
|
+
|
|
184
|
+
mr._emit("groupe2OUT", [false, 1]),
|
|
185
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(1,"groupe1OUT",false);}),
|
|
186
|
+
|
|
187
|
+
mr._atom( ()=> { gcs.cleanChoiceList(1); } ),
|
|
188
|
+
|
|
189
|
+
// Fin derwish
|
|
190
|
+
mr._emit("derwishOUT", [false, 2]),
|
|
191
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(2,"derwishOUT",false);}),
|
|
192
|
+
mr._atom( ()=> { gcs.cleanQueues(); } ),
|
|
193
|
+
|
|
194
|
+
// Latino -------------------------------------------
|
|
195
|
+
mr._atom( ()=> { gcs.setComputeScoreClass(7); } ),
|
|
196
|
+
|
|
197
|
+
mr._emit("pianoOUT", [true, 2]),
|
|
198
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(2,"pianoOUT",true);}),
|
|
199
|
+
|
|
200
|
+
// Séquence derwish pour groupe 0
|
|
201
|
+
mr._atom( ()=> { gcs.alertInfoScoreON(' Latino pour groupe Skini 0 '); } ),
|
|
202
|
+
|
|
203
|
+
mr._emit("groupe7OUT", [true, 0]),
|
|
204
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(0,"groupe7OUT",true);}),
|
|
205
|
+
|
|
206
|
+
mr._await("groupe7IN", 1),
|
|
207
|
+
mr._atom( ()=> { console.log("groupe7IN latino"); } ),
|
|
208
|
+
|
|
209
|
+
mr._emit("startTimer", 0),
|
|
210
|
+
mr._await("stopTimer", 1),
|
|
211
|
+
|
|
212
|
+
mr._emit("groupe7OUT", [false, 0]),
|
|
213
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(0,"groupe7OUT",false);}),
|
|
214
|
+
|
|
215
|
+
mr._atom( ()=> { gcs.cleanChoiceList(0); } ),
|
|
216
|
+
|
|
217
|
+
// Séquence Latino pour groupe 1
|
|
218
|
+
mr._atom( ()=> { gcs.alertInfoScoreON(' Latino pour groupe Skini 1 '); } ),
|
|
219
|
+
|
|
220
|
+
mr._emit("groupe3OUT", [true, 1]),
|
|
221
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(1,"groupe7OUT",true);}),
|
|
222
|
+
|
|
223
|
+
mr._await("groupe3IN", 1),
|
|
224
|
+
mr._atom( ()=> { console.log("groupe7IN latino 2"); } ),
|
|
225
|
+
|
|
226
|
+
mr._emit("startTimer", 0),
|
|
227
|
+
mr._await("stopTimer", 1),
|
|
228
|
+
|
|
229
|
+
mr._emit("groupe3OUT", [false, 1]),
|
|
230
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(1,"groupe7OUT",false);}),
|
|
231
|
+
|
|
232
|
+
mr._atom( ()=> { gcs.cleanChoiceList(1); } ),
|
|
233
|
+
|
|
234
|
+
// Fin Latino
|
|
235
|
+
mr._emit("pianoOUT", [false, 2]),
|
|
236
|
+
mr._atom( ()=> { gcs.informSelecteurOnMenuChange(2,"pianoOUT",false);}),
|
|
237
|
+
mr._atom( ()=> { gcs.cleanQueues(); } ),
|
|
238
|
+
|
|
239
|
+
// Pour finir ----------------------------------------------------------
|
|
240
|
+
mr._await("tick", 20),
|
|
241
|
+
mr._atom( ()=> { gcs.alertInfoScoreON('Jeu terminé'); } ),
|
|
242
|
+
]
|
|
243
|
+
),
|
|
244
|
+
],
|
|
245
|
+
),
|
|
246
|
+
]
|
|
247
|
+
),
|
|
248
|
+
mr._atom( ()=> {console.log('Orchestration Stop');} ),
|
|
249
|
+
mr._atom( ()=> { gcs.resetMatrice(); } ),
|
|
250
|
+
mr._atom( ()=> { gcs.cleanQueues(); } ),
|
|
251
|
+
|
|
252
|
+
];
|
|
253
|
+
|
|
254
|
+
//mr.addEventListener("startTimer", function(val) {console.log("*** emit startTimer")});
|
|
255
|
+
|
|
256
|
+
// A mettre dans Blockly
|
|
257
|
+
var prog = mr.createModule(instructions);
|
|
258
|
+
|
|
259
|
+
//mr.printProgram(prog, false);
|
|
260
|
+
|
|
261
|
+
// A mettre dans Blockly
|
|
262
|
+
function runProg(){
|
|
263
|
+
// mr.printProgram(prog, false);
|
|
264
|
+
mr.runProg(prog);
|
|
265
|
+
//skini.test1("**** depuis orchestration");
|
|
266
|
+
}
|
|
267
|
+
exports.runProg = runProg;
|
|
268
|
+
|
|
269
|
+
// A mettre dans Blockly
|
|
270
|
+
function createListener(signal, action){
|
|
271
|
+
if(debug) console.log("orchestration: createListener: ", signal);
|
|
272
|
+
mr.createSignal(signal, 0);
|
|
273
|
+
mr.addEventListener(signal, action);
|
|
274
|
+
}
|
|
275
|
+
exports.createListener = createListener;
|
|
276
|
+
|
|
277
|
+
// A mettre dans Blockly
|
|
278
|
+
function activateSignal(signal, val){
|
|
279
|
+
mr.activateSignal(signal, val);
|
|
280
|
+
}
|
|
281
|
+
exports.activateSignal = activateSignal;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*"use hiphop";
|
|
2
|
+
"use hopscript";
|
|
3
|
+
|
|
4
|
+
var hh = require( "hiphop" );
|
|
5
|
+
|
|
6
|
+
hiphop module sub( S, U, A, B ) {
|
|
7
|
+
fork {
|
|
8
|
+
if( S.now ) emit A();
|
|
9
|
+
} par {
|
|
10
|
+
if( U.now ) emit B();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
hiphop module main( in S, in U, A, B ) {
|
|
15
|
+
run sub( ... );
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
exports.prg = new hh.ReactiveMachine( main, "run2" );
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
var hh;
|
|
24
|
+
var __hh_module;
|
|
25
|
+
let sub;
|
|
26
|
+
let main;
|
|
27
|
+
hh=require("hiphop");
|
|
28
|
+
__hh_module=require("hiphop");
|
|
29
|
+
|
|
30
|
+
sub=__hh_module.MODULE({"id":"sub","%location":{"filename":"run.3points.hh.js","pos":70},"%tag":"module"},
|
|
31
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":82},"direction":"INOUT","name":"S"}),
|
|
32
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":85},"direction":"INOUT","name":"U"}),
|
|
33
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":88},"direction":"INOUT","name":"A"}),
|
|
34
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":91},"direction":"INOUT","name":"B"}),
|
|
35
|
+
__hh_module.FORK({"%location":{"filename":"run.3points.hh.js","pos":100},"%tag":"fork"},
|
|
36
|
+
__hh_module.SEQUENCE({"%location":{"filename":"run.3points.hh.js","pos":100},"%tag":"fork"},
|
|
37
|
+
__hh_module.IF({"%location":{"filename":"run.3points.hh.js","pos":113},"%tag":"if",
|
|
38
|
+
"apply":function (){return ((() => {const S=this["S"];return S.now;})());}
|
|
39
|
+
},
|
|
40
|
+
__hh_module.SIGACCESS({"signame":"S","pre":false,"val":false,"cnt":false}),
|
|
41
|
+
__hh_module.EMIT({"%location":{"filename":"run.3points.hh.js","pos":130},"%tag":"emit","A":"A"}))),__hh_module.SEQUENCE({"%location":{"filename":"run.3points.hh.js","pos":140},"%tag":"par"},__hh_module.IF({"%location":{"filename":"run.3points.hh.js","pos":152},"%tag":"if","apply":function (){return ((() => {const U=this["U"];return U.now;})());}
|
|
42
|
+
},
|
|
43
|
+
__hh_module.SIGACCESS({"signame":"U","pre":false,"val":false,"cnt":false}),
|
|
44
|
+
__hh_module.EMIT({"%location":{"filename":"run.3points.hh.js","pos":169},"%tag":"emit","B":"B"})))));
|
|
45
|
+
|
|
46
|
+
__hh_module=require("hiphop");
|
|
47
|
+
|
|
48
|
+
main=__hh_module.MODULE({"id":"main","%location":{"filename":"run.3points.hh.js","pos":189},"%tag":"module"},
|
|
49
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":202},"direction":"IN","name":"S"}),
|
|
50
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":208},"direction":"IN","name":"U"}),
|
|
51
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":214},"direction":"INOUT","name":"A"}),
|
|
52
|
+
__hh_module.SIGNAL({"%location":{"filename":"run.3points.hh.js","pos":217},"direction":"INOUT","name":"B"}),
|
|
53
|
+
|
|
54
|
+
__hh_module.RUN({"%location":{"filename":"run.3points.hh.js","pos":226},"%tag":"run","module":
|
|
55
|
+
__hh_module.getModule("sub",{"filename":"run.3points.hh.js","pos":230}),"autocomplete":true}
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
exports.prg=new hh.ReactiveMachine(main,"run2");
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*"use hiphop";
|
|
2
|
+
"use hopscript";
|
|
3
|
+
|
|
4
|
+
var hh = require( "hiphop" );
|
|
5
|
+
|
|
6
|
+
hiphop module sub( S, U, W, Z ) {
|
|
7
|
+
fork {
|
|
8
|
+
if( S.now ) emit W();
|
|
9
|
+
} par {
|
|
10
|
+
if( U.now ) emit Z();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
hiphop module main( in S, in U, A, B ) {
|
|
15
|
+
run sub( S, U, W as A, Z as B );
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
exports.prg = new hh.ReactiveMachine( main, "run2" );*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
"use strict";
|
|
22
|
+
|
|
23
|
+
var hh = require("../hiphop/hiphop.js");
|
|
24
|
+
const decache = require('decache');
|
|
25
|
+
|
|
26
|
+
var sub = hh.MODULE(
|
|
27
|
+
{
|
|
28
|
+
"id":"sub",
|
|
29
|
+
"%location":{},
|
|
30
|
+
"%tag":"module"
|
|
31
|
+
},
|
|
32
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":82},"direction":"INOUT","name":"S"}),
|
|
33
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":85},"direction":"INOUT","name":"U"}),
|
|
34
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":88},"direction":"INOUT","name":"W"}),
|
|
35
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":91},"direction":"INOUT","name":"Z"}),
|
|
36
|
+
|
|
37
|
+
hh.FORK(
|
|
38
|
+
{"%location":{"filename":"run.hh.js","pos":100},"%tag":"fork"},
|
|
39
|
+
hh.SEQUENCE(
|
|
40
|
+
{"%location":{"filename":"run.hh.js","pos":100},"%tag":"fork"},
|
|
41
|
+
hh.ATOM(
|
|
42
|
+
{
|
|
43
|
+
"%location":{},
|
|
44
|
+
"%tag":"node",
|
|
45
|
+
"apply":function () {console.log('message serveur 1');}
|
|
46
|
+
}),
|
|
47
|
+
hh.IF(
|
|
48
|
+
{"%location":{"filename":"run.hh.js","pos":113},"%tag":"if","apply":function (){return ((() => {const S=this["S"];return S.now;})());}
|
|
49
|
+
},
|
|
50
|
+
hh.SIGACCESS({"signame":"S","pre":false,"val":false,"cnt":false}),
|
|
51
|
+
|
|
52
|
+
hh.EMIT({"%location":{"filename":"run.hh.js","pos":130},"%tag":"emit","W":"W"}))
|
|
53
|
+
),
|
|
54
|
+
hh.SEQUENCE(
|
|
55
|
+
{"%location":{"filename":"run.hh.js","pos":140},"%tag":"par"},
|
|
56
|
+
hh.ATOM(
|
|
57
|
+
{
|
|
58
|
+
"%location":{},
|
|
59
|
+
"%tag":"node",
|
|
60
|
+
"apply":function () {console.log('message serveur 2');}
|
|
61
|
+
}),
|
|
62
|
+
hh.IF({"%location":{"filename":"run.hh.js","pos":152},"%tag":"if","apply":function (){return ((() => {const U=this["U"];return U.now;})());}
|
|
63
|
+
},
|
|
64
|
+
hh.SIGACCESS({"signame":"U","pre":false,"val":false,"cnt":false}),
|
|
65
|
+
|
|
66
|
+
hh.EMIT({"%location":{"filename":"run.hh.js","pos":169},"%tag":"emit","Z":"Z"}))
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
var main = hh.MODULE({"id":"main","%location":{"filename":"run.hh.js","pos":189},"%tag":"module"},
|
|
72
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":202},"direction":"IN","name":"S"}),
|
|
73
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":208},"direction":"IN","name":"U"}),
|
|
74
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":214},"direction":"INOUT","name":"A"}),
|
|
75
|
+
hh.SIGNAL({"%location":{"filename":"run.hh.js","pos":217},"direction":"INOUT","name":"B"}),
|
|
76
|
+
|
|
77
|
+
hh.RUN({
|
|
78
|
+
"%location":{"filename":"run.hh.js","pos":226},
|
|
79
|
+
"%tag":"run",
|
|
80
|
+
"module": hh.getModule("sub", {"filename":"run.hh.js","pos":230}),
|
|
81
|
+
"S":"",
|
|
82
|
+
"U":"",
|
|
83
|
+
"W":"A",
|
|
84
|
+
"Z":"B"
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
var prg = new hh.ReactiveMachine(main,"run2");
|
|
89
|
+
exports.prg = prg;
|
|
90
|
+
|
|
91
|
+
function callReact(sig){
|
|
92
|
+
if(sig !== undefined){
|
|
93
|
+
prg.react(sig);
|
|
94
|
+
}else{
|
|
95
|
+
prg.react();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.callReact = callReact;
|
|
99
|
+
|
|
100
|
+
function setListener(sig, func){
|
|
101
|
+
prg.addEventListener(sig, func );
|
|
102
|
+
}
|
|
103
|
+
exports.setListener = setListener;
|
|
104
|
+
|
|
105
|
+
prg.addEventListener("A", ()=> console.log("A") );
|
|
106
|
+
prg.addEventListener("B", ()=> console.log("B") );
|
|
107
|
+
|
|
108
|
+
prg.react();
|
|
109
|
+
prg.input("S");
|
|
110
|
+
prg.react();
|
|
111
|
+
prg.react("A");
|
|
112
|
+
prg.react("B");
|
|
113
|
+
console.log("--");
|
|
114
|
+
prg.react();
|
|
115
|
+
console.log("--");
|
|
116
|
+
prg.react();
|
|
117
|
+
console.log("--");
|
|
118
|
+
prg.react();
|
|
119
|
+
console.log("--");
|
|
120
|
+
prg.react();
|
|
121
|
+
console.log("--");
|
|
122
|
+
prg.react();
|
|
123
|
+
console.log("--");
|