Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
lua layer that reimplements SPLAY methodsfor rpc, job and events modules, with a...
[simgrid.git] / examples / lua / SimSplay / splay_school.lua
diff --git a/examples/lua/SimSplay/splay_school.lua b/examples/lua/SimSplay/splay_school.lua
new file mode 100644 (file)
index 0000000..abaf7c9
--- /dev/null
@@ -0,0 +1,19 @@
+dofile 'sim_splay.lua'
+
+function SPLAYschool()
+    log:print("My ip is :" ..job.me.ip())
+    event.sleep(5)
+    rpc.call(job.nodes[3],{"call_me","Helloooooow"})
+    event.sleep(5)
+    os.exit()
+end
+
+function call_me(position)
+    log:print("I received an RPC from node "..position);
+end
+
+event.thread("SPLAYschool")
+start.loop()
+
+
+