XBT_PUBLIC(int) sg_host_get_pstate(sg_host_t host);
XBT_PUBLIC(void) sg_host_set_pstate(sg_host_t host,int pstate);
XBT_PUBLIC(xbt_dict_t) sg_host_get_properties(sg_host_t host);
-
+XBT_PUBLIC(const char *) sg_host_get_property_value(sg_host_t host,
+ const char *name);
SG_END_DECL()
#endif /* SIMGRID_HOST_H_ */
return host->properties();
}
+
+/** \ingroup m_host_management
+ * \brief Returns the value of a given host property
+ *
+ * \param host a host
+ * \param name a property name
+ * \return value of a property (or NULL if property not set)
+*/
+const char *sg_host_get_property_value(sg_host_t host, const char *name)
+{
+ return (const char*) xbt_dict_get_or_null(sg_host_get_properties(host), name);
+}
+