Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Finalize properties on AS.
[simgrid.git] / src / simdag / sd_workstation.c
index 7a163ef..1be8d28 100644 (file)
@@ -7,6 +7,7 @@
 #include "private.h"
 #include "simdag/simdag.h"
 #include "xbt/dict.h"
 #include "private.h"
 #include "simdag/simdag.h"
 #include "xbt/dict.h"
+#include "xbt/lib.h"
 #include "xbt/sysdep.h"
 #include "surf/surf.h"
 #include "surf/surf_resource.h"
 #include "xbt/sysdep.h"
 #include "surf/surf.h"
 #include "surf/surf_resource.h"
@@ -157,6 +158,7 @@ xbt_dict_t SD_workstation_get_properties(SD_workstation_t workstation)
 
 }
 
 
 }
 
+
 /** @brief Displays debugging informations about a workstation */
 void SD_workstation_dump(SD_workstation_t ws)
 {
 /** @brief Displays debugging informations about a workstation */
 void SD_workstation_dump(SD_workstation_t ws)
 {
@@ -512,3 +514,29 @@ SD_task_t SD_workstation_get_current_task(SD_workstation_t workstation)
 
   return (workstation->current_task);
 }
 
   return (workstation->current_task);
 }
+
+/**
+ * \brief Returns a #xbt_dict_t consisting of the list of properties assigned to the AS
+ * or router
+ *
+ * \param AS, router name
+ * \return the xbt_dict_t properties of the AS
+ */
+xbt_dict_t SD_as_router_get_properties(const char *asr)
+{
+  return get_as_router_properties(asr);
+}
+/**
+ * \brief Returns a #xbt_dict_t consisting of the list of properties assigned to the AS
+ * or router
+ *
+ * \param AS, router name
+ * \param The name of a properties
+ * \return value of the properties
+ */
+const char* SD_as_router_get_property_value(const char *asr, const char *name)
+{
+  xbt_dict_t dict = get_as_router_properties(asr);
+  if(!dict) return NULL;
+  return xbt_dict_get_or_null(dict,name);
+}