Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update workstation handling in SimDag. Change the prefix of SimDag functions with...
[simgrid.git] / src / surf / workstation_KCCFLN05_private.h
index e7f1c75..458808a 100644 (file)
 
 #include "surf_private.h"
 
 
 #include "surf_private.h"
 
+typedef enum {
+  SURF_WORKSTATION_RESOURCE_CPU,
+  SURF_WORKSTATION_RESOURCE_LINK,
+} e_surf_workstation_resource_type_t;
+
 /**************************************/
 /**************************************/
-/********* workstation object *********/
+/********* cpu object *****************/
 /**************************************/
 /**************************************/
-typedef struct workstation_KCCFLN05 {
-  surf_resource_t resource;    /* Any such object, added in a trace
-                                  should start by this field!!! */
-  char *name;
+typedef struct cpu_KCCFLN05 {
+  surf_resource_t resource;
+  e_surf_workstation_resource_type_t type;     /* Do not move this field */
+  char *name;                                  /* Do not move this field */
+  lmm_constraint_t constraint;
+  lmm_constraint_t bus;
   double power_scale;
   double power_current;
   double interference_send;
   double power_scale;
   double power_current;
   double interference_send;
@@ -25,33 +32,33 @@ typedef struct workstation_KCCFLN05 {
   tmgr_trace_event_t power_event;
   e_surf_cpu_state_t state_current;
   tmgr_trace_event_t state_event;
   tmgr_trace_event_t power_event;
   e_surf_cpu_state_t state_current;
   tmgr_trace_event_t state_event;
-  lmm_constraint_t constraint;
-  int id; /* cpu and network card are a single object... */
+  int id;                      /* cpu and network card are a single object... */
   xbt_dynar_t incomming_communications;
   xbt_dynar_t outgoing_communications;
   xbt_dynar_t incomming_communications;
   xbt_dynar_t outgoing_communications;
-  lmm_constraint_t bus;
-} s_workstation_KCCFLN05_t, *workstation_KCCFLN05_t;
+} s_cpu_KCCFLN05_t, *cpu_KCCFLN05_t;
 
 /**************************************/
 /*********** network object ***********/
 /**************************************/
 
 typedef struct network_link_KCCFLN05 {
 
 /**************************************/
 /*********** network object ***********/
 /**************************************/
 
 typedef struct network_link_KCCFLN05 {
-  surf_resource_t resource;    /* Any such object, added in a trace
-                                  should start by this field!!! */
-  char *name;
+  surf_resource_t resource;
+  e_surf_workstation_resource_type_t type;     /* Do not move this field */
+  char *name;                                  /* Do not move this field */
+  lmm_constraint_t constraint;
+  double lat_current;
+  tmgr_trace_event_t lat_event;
   double bw_current;
   tmgr_trace_event_t bw_event;
   e_surf_network_link_state_t state_current;
   tmgr_trace_event_t state_event;
   double bw_current;
   tmgr_trace_event_t bw_event;
   e_surf_network_link_state_t state_current;
   tmgr_trace_event_t state_event;
-  lmm_constraint_t constraint;
 } s_network_link_KCCFLN05_t, *network_link_KCCFLN05_t;
 
 
 typedef struct s_route_KCCFLN05 {
   double impact_on_src;
   double impact_on_dst;
 } s_network_link_KCCFLN05_t, *network_link_KCCFLN05_t;
 
 
 typedef struct s_route_KCCFLN05 {
   double impact_on_src;
   double impact_on_dst;
-  double impact_on_src_with_other_recv; 
+  double impact_on_src_with_other_recv;
   double impact_on_dst_with_other_send;
   network_link_KCCFLN05_t *links;
   int size;
   double impact_on_dst_with_other_send;
   network_link_KCCFLN05_t *links;
   int size;
@@ -60,18 +67,16 @@ typedef struct s_route_KCCFLN05 {
 /**************************************/
 /*************** actions **************/
 /**************************************/
 /**************************************/
 /*************** actions **************/
 /**************************************/
-
-typedef struct surf_action_cpu_KCCFLN05 {
-  s_surf_action_t generic_action;
-  lmm_variable_t variable;
-} s_surf_action_cpu_KCCFLN05_t, *surf_action_cpu_KCCFLN05_t;
-
-typedef struct surf_action_network_KCCFLN05 {
+typedef struct surf_action_workstation_KCCFLN05 {
   s_surf_action_t generic_action;
   s_surf_action_t generic_action;
+  double latency;
+  double lat_current;
   lmm_variable_t variable;
   lmm_variable_t variable;
-  workstation_KCCFLN05_t src;
-  workstation_KCCFLN05_t dst;
-} s_surf_action_network_KCCFLN05_t, *surf_action_network_KCCFLN05_t;
-
+  double rate;
+  int suspended;
+  cpu_KCCFLN05_t src;          /* could be avoided */
+  cpu_KCCFLN05_t dst;          /* could be avoided */
+} s_surf_action_workstation_KCCFLN05_t,
+  *surf_action_workstation_KCCFLN05_t;
 
 #endif                         /* _SURF_WORKSTATION_KCCFLN05_PRIVATE_H */
 
 #endif                         /* _SURF_WORKSTATION_KCCFLN05_PRIVATE_H */