Changing ResourceManager naming for platform::ResourceName
[nepi.git] / examples / omf / iminds_omf6_vlc.py
index 2c4b474..74c53fb 100644 (file)
@@ -84,14 +84,14 @@ ec = ExperimentController(exp_id="iminds_omf6_ping")
 
 # Create and Configure the Nodes
 
-node1 = ec.register_resource("OMFNode")
+node1 = ec.register_resource("omf::Node")
 ec.set(node1, "hostname", nodex)
 ec.set(node1, "xmppUser", slicename)
 ec.set(node1, "xmppServer", "xmpp.ilabt.iminds.be")
 ec.set(node1, "xmppPort", "5222")
 ec.set(node1, "xmppPassword", "1234")
 
-iface1 = ec.register_resource("OMFWifiInterface")
+iface1 = ec.register_resource("omf::WifiInterface")
 ec.set(iface1, "name", "wlan0")
 ec.set(iface1, "mode", "adhoc")
 ec.set(iface1, "hw_mode", "g")
@@ -99,14 +99,14 @@ ec.set(iface1, "essid", "vlc")
 ec.set(iface1, "ip", "192.168.0.1/24")
 ec.register_connection(iface1, node1)
 
-node2 = ec.register_resource("OMFNode")
+node2 = ec.register_resource("omf::Node")
 ec.set(node2, "hostname", nodez)
 ec.set(node2, "xmppUser", slicename)
 ec.set(node2, "xmppServer", "xmpp.ilabt.iminds.be")
 ec.set(node2, "xmppPort", "5222")
 ec.set(node2, "xmppPassword", "1234")
 
-iface2 = ec.register_resource("OMFWifiInterface")
+iface2 = ec.register_resource("omf::WifiInterface")
 ec.set(iface2, "name", "wlan0")
 ec.set(iface2, "mode", "adhoc")
 ec.set(iface2, "hw_mode", "g")
@@ -114,7 +114,7 @@ ec.set(iface2, "essid", "vlc")
 ec.set(iface2, "ip", "192.168.0.2/24")
 ec.register_connection(iface2, node2)
 
-channel = ec.register_resource("OMFChannel")
+channel = ec.register_resource("omf::Channel")
 ec.set(channel, "channel", "6")
 ec.register_connection(iface1, channel)
 ec.register_connection(iface2, channel)
@@ -122,28 +122,28 @@ ec.register_connection(iface2, channel)
 client_ip = "192.168.0.2" 
 
 # Create and Configure the Application
-app1 = ec.register_resource("OMFApplication")
+app1 = ec.register_resource("omf::Application")
 ec.set(app1, "command", 
     "/root/vlc/vlc-1.1.13/cvlc /root/10-by-p0d.avi --sout '#rtp{dst=%s,port=5004,mux=ts}'" % client_ip) 
 ec.register_connection(app1, node1)
 
 ## Add a OMFApplication to run the client VLC
-app2 = ec.register_resource("OMFApplication")
+app2 = ec.register_resource("omf::Application")
 ## Send the transmitted video to a file.
 ec.set(app2, "command", "/root/vlc/vlc-1.1.13/cvlc rtp://%s:5004 --sout '#standard{access=file,mux=ts,dst=/root/video.ts}'" % client_ip)
 ec.register_connection(app2, node2)
 
 ## Add a OMFApplication to count the number of bytes in the transmitted video
-app3 = ec.register_resource("OMFApplication")
+app3 = ec.register_resource("omf::Application")
 ## Send the transmitted video to a file.
 ec.set(app3, "command", "ls -lah /root/video.ts")
 ec.register_connection(app3, node2)
 
-app4 = ec.register_resource("OMFApplication")
+app4 = ec.register_resource("omf::Application")
 ec.set(app4, "command", "/usr/bin/killall vlc_app")
 ec.register_connection(app4, node1)
 
-app5 = ec.register_resource("OMFApplication")
+app5 = ec.register_resource("omf::Application")
 ec.set(app5, "command", "/usr/bin/killall vlc_app")
 ec.register_connection(app5, node2)