return MSG_get_host_speed(ht);
}
-// Host Set Data
-void rb_host_set_data(VALUE class,VALUE host,VALUE data) {
- THROW_UNIMPLEMENTED;
-}
-
-// Host Get Data
-VALUE rb_host_get_data(VALUE class,VALUE host) {
- THROW_UNIMPLEMENTED;
- return Qnil;
-}
-
// Host is Avail
VALUE rb_host_is_avail(VALUE class,VALUE host) {
m_host_t ht;
class MSG::Task < MSG::RbTask
def initialize(*args)
- super()
+ super()
end
def setData(value)
end
def name
- super(self)
+ super(self)
end
def compSize
# Host Extend from the native Class RbHost
####################################################
class MSG::Host < MSG::RbHost
+
+ attr_reader :data
+ def initialize(*ars)
+ @data = 1
+ p "Host Initializer"
+ end
+
+ def data()
+ return @data
+ end
+
+ def setData(value)
+ @data = value
+ end
+
def getByName(name)
super(name)
end
super(self)
end
- def setData(data)
- super(self,data)
- end
def isAvail
super(self)
}
-
extern const char*xbt_ctx_factory_to_use; /*Hack: let msg load directly the right factory */
typedef VALUE(*rb_meth)(ANYARGS);
rb_define_module_function(rb_host,"name",(rb_meth)rb_host_name,1);
rb_define_module_function(rb_host,"speed",(rb_meth)rb_host_speed,1);
rb_define_module_function(rb_host,"number",(rb_meth)rb_host_number,0);
- rb_define_module_function(rb_host,"setData",(rb_meth)rb_host_set_data,2);
- rb_define_module_function(rb_host,"getData",(rb_meth)rb_host_get_data,1);
rb_define_module_function(rb_host,"isAvail",(rb_meth)rb_host_is_avail,1);
rb_define_module_function(rb_host,"getHostProcess",(rb_meth)rb_host_process,1);
}
\ No newline at end of file