SimGrid  3.11
Versatile Simulation of Distributed Systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
SURF C bindings

Describes the c bindings of SURF. More...

Typedefs

typedef Modelsurf_model_t
 Model datatype. More...
 
typedef Actionsurf_action_t
 Action structure. More...
 
const char * surf_model_name (surf_model_t model)
 Get the name of a surf model. More...
 
surf_action_t surf_model_extract_done_action_set (surf_model_t model)
 Pop an action from the done actions set. More...
 
surf_action_t surf_model_extract_failed_action_set (surf_model_t model)
 Pop an action from the failed actions set. More...
 
surf_action_t surf_model_extract_ready_action_set (surf_model_t model)
 Pop an action from the ready actions set. More...
 
surf_action_t surf_model_extract_running_action_set (surf_model_t model)
 Pop an action from the running actions set. More...
 
int surf_model_running_action_set_size (surf_model_t model)
 Get the size of the running action set of a model. More...
 
surf_action_t surf_workstation_model_execute_parallel_task (surf_workstation_model_t model, int workstation_nb, void **workstation_list, double *computation_amount, double *communication_amount, double rate)
 Execute a parallel task. More...
 
surf_action_t surf_workstation_model_communicate (surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst, double size, double rate)
 Create a communication between two hosts. More...
 
xbt_dynar_t surf_workstation_model_get_route (surf_workstation_model_t model, surf_resource_t src, surf_resource_t dst)
 Get the route between two hosts. More...
 
void surf_vm_workstation_model_create (const char *name, surf_resource_t ind_phys_host)
 Create a new VM on the specified host. More...
 
surf_action_t surf_network_model_communicate (surf_network_model_t model, sg_routing_edge_t src, sg_routing_edge_t dst, double size, double rate)
 Create a communication between two routing edges [TODO]. More...
 
const char * surf_resource_name (surf_cpp_resource_t resource)
 Get the name of a surf resource (cpu, workstation, network, …) More...
 
xbt_dict_t surf_resource_get_properties (surf_cpp_resource_t resource)
 Get the properties of a surf resource (cpu, workstation, network, …) More...
 
e_surf_resource_state_t surf_resource_get_state (surf_cpp_resource_t resource)
 Get the state of a surf resource (cpu, workstation, network, …) More...
 
void surf_resource_set_state (surf_cpp_resource_t resource, e_surf_resource_state_t state)
 Set the state of a surf resource (cpu, workstation, network, …) More...
 
double surf_workstation_get_speed (surf_resource_t resource, double load)
 Get the speed of the cpu associtated to a workstation. More...
 
double surf_workstation_get_available_speed (surf_resource_t resource)
 Get the available speed of cpu associtated to a workstation. More...
 
int surf_workstation_get_core (surf_resource_t resource)
 Get the number of cores of the cpu associated to a workstation. More...
 
surf_action_t surf_workstation_execute (surf_resource_t resource, double size)
 Execute some quantity of computation. More...
 
surf_action_t surf_workstation_sleep (surf_resource_t resource, double duration)
 Make the workstation sleep. More...
 
surf_action_t surf_workstation_open (surf_resource_t workstation, const char *fullpath)
 Open a file on a workstation. More...
 
surf_action_t surf_workstation_close (surf_resource_t workstation, surf_file_t fd)
 Close a file descriptor on a workstation. More...
 
surf_action_t surf_workstation_read (surf_resource_t resource, surf_file_t fd, sg_size_t size)
 Read a file. More...
 
surf_action_t surf_workstation_write (surf_resource_t resource, surf_file_t fd, sg_size_t size)
 Write a file. More...
 
xbt_dynar_t surf_workstation_get_info (surf_resource_t resource, surf_file_t fd)
 Get the informations of a file descriptor. More...
 
sg_size_t surf_workstation_get_free_size (surf_resource_t resource, const char *name)
 Get the available space of the storage at the mount point. More...
 
sg_size_t surf_workstation_get_used_size (surf_resource_t resource, const char *name)
 Get the used space of the storage at the mount point. More...
 
xbt_dynar_t surf_workstation_get_vms (surf_resource_t resource)
 Get the VMs hosted on the workstation. More...
 
void surf_workstation_get_params (surf_resource_t resource, ws_params_t params)
 [brief description] More...
 
void surf_workstation_set_params (surf_resource_t resource, ws_params_t params)
 [brief description] More...
 
void surf_vm_workstation_destroy (surf_resource_t resource)
 Destroy a Workstation VM. More...
 
void surf_vm_workstation_suspend (surf_resource_t resource)
 Suspend a Workstation VM. More...
 
void surf_vm_workstation_resume (surf_resource_t resource)
 Resume a Workstation VM. More...
 
void surf_vm_workstation_save (surf_resource_t resource)
 Save the Workstation VM (Not yet implemented) More...
 
void surf_vm_workstation_restore (surf_resource_t resource)
 Restore the Workstation VM (Not yet implemented) More...
 
void surf_vm_workstation_migrate (surf_resource_t resource, surf_resource_t ind_vm_ws_dest)
 Migrate the VM to the destination host. More...
 
surf_resource_t surf_vm_workstation_get_pm (surf_resource_t resource)
 Get the physical machine hosting the VM. More...
 
void surf_vm_workstation_set_bound (surf_resource_t resource, double bound)
 [brief description] More...
 
void surf_vm_workstation_set_affinity (surf_resource_t resource, surf_resource_t cpu, unsigned long mask)
 [brief description] More...
 
surf_action_t surf_cpu_execute (surf_resource_t cpu, double size)
 Execute some quantity of computation. More...
 
surf_action_t surf_cpu_sleep (surf_resource_t cpu, double duration)
 Make the cpu sleep for duration (in seconds) More...
 
double surf_workstation_get_current_power_peak (surf_resource_t host)
 Get the workstation power peak. More...
 
double surf_workstation_get_power_peak_at (surf_resource_t host, int pstate_index)
 [brief description] More...
 
int surf_workstation_get_nb_pstates (surf_resource_t host)
 [brief description] More...
 
void surf_workstation_set_power_peak_at (surf_resource_t host, int pstate_index)
 [brief description] More...
 
double surf_workstation_get_consumed_energy (surf_resource_t host)
 Get the consumed energy (in joules) of a workstation. More...
 
xbt_dict_t surf_workstation_get_mounted_storage_list (surf_resource_t workstation)
 Get the list of storages mounted on a workstation. More...
 
xbt_dynar_t surf_workstation_get_attached_storage_list (surf_resource_t workstation)
 Get the list of storages attached to a workstation. More...
 
int surf_workstation_unlink (surf_resource_t workstation, surf_file_t fd)
 Unlink a file descriptor. More...
 
size_t surf_workstation_get_size (surf_resource_t workstation, surf_file_t fd)
 Get the size of a file on a workstation. More...
 
size_t surf_workstation_file_tell (surf_resource_t workstation, surf_file_t fd)
 Get the current position of the file descriptor. More...
 
int surf_workstation_file_move (surf_resource_t workstation, surf_file_t fd, const char *fullpath)
 Move a file to another location on the same mount point. More...
 
int surf_workstation_file_seek (surf_resource_t workstation, surf_file_t fd, sg_offset_t offset, int origin)
 Set the position indictator assiociated with the file descriptor to a new position. More...
 
int surf_network_link_is_shared (surf_cpp_resource_t link)
 [brief description] More...
 
double surf_network_link_get_bandwidth (surf_cpp_resource_t link)
 Get the bandwidth of a link in bytes per second. More...
 
double surf_network_link_get_latency (surf_cpp_resource_t link)
 Get the latency of a link in seconds. More...
 
xbt_dict_t surf_storage_get_content (surf_resource_t resource)
 Get the content of a storage. More...
 
sg_size_t surf_storage_get_size (surf_resource_t resource)
 Get the size in bytes of a storage. More...
 
sg_size_t surf_storage_get_free_size (surf_resource_t resource)
 Get the available size in bytes of a storage. More...
 
sg_size_t surf_storage_get_used_size (surf_resource_t resource)
 Get the size in bytes of a storage. More...
 
void * surf_action_get_data (surf_action_t action)
 Get the data associated to the action. More...
 
void surf_action_set_data (surf_action_t action, void *data)
 Set the data associated to the action. More...
 
void surf_action_unref (surf_action_t action)
 Unreference an action. More...
 
double surf_action_get_start_time (surf_action_t action)
 Get the start time of an action. More...
 
double surf_action_get_finish_time (surf_action_t action)
 Get the finish time of an action. More...
 
double surf_action_get_remains (surf_action_t action)
 Get the remains amount of work to do of an action. More...
 
void surf_action_suspend (surf_action_t action)
 Suspend an action. More...
 
void surf_action_resume (surf_action_t action)
 Resume an action. More...
 
void surf_action_cancel (surf_action_t action)
 Cancel an action. More...
 
void surf_action_set_priority (surf_action_t action, double priority)
 Set the priority of an action. More...
 
void surf_action_set_category (surf_action_t action, const char *category)
 Set the category of an action. More...
 
e_surf_action_state_t surf_action_get_state (surf_action_t action)
 Get the state of an action. More...
 
double surf_action_get_cost (surf_action_t action)
 Get the cost of an action. More...
 
void surf_cpu_action_set_affinity (surf_action_t action, surf_resource_t cpu, unsigned long mask)
 [brief desrciption] More...
 
void surf_cpu_action_set_bound (surf_action_t action, double bound)
 [brief description] More...
 
double surf_network_action_get_latency_limited (surf_action_t action)
 [brief description] More...
 
surf_file_t surf_storage_action_get_file (surf_action_t action)
 Get the file associated to a storage action. More...
 
xbt_dict_t surf_storage_action_get_ls_dict (surf_action_t action)
 Get the result dictionary of an ls action. More...
 
const char * surf_storage_get_host (surf_resource_t resource)
 Get the host the storage is attached to. More...
 

Detailed Description

Describes the c bindings of SURF.

Typedef Documentation

typedef Model* surf_model_t

Model datatype.

Generic data structure for a model. The workstations, the CPUs and the network links are examples of models.

Action structure.

Never create s_surf_action_t by yourself ! The actions are created on the fly when you call execute or communicate on a model.

See also
e_surf_action_state_t

Function Documentation

const char* surf_model_name ( surf_model_t  model)

Get the name of a surf model.

Parameters
modelA model
Returns
The name of the model
surf_action_t surf_model_extract_done_action_set ( surf_model_t  model)

Pop an action from the done actions set.

Parameters
modelThe model from which the action is extracted
Returns
An action in done state
surf_action_t surf_model_extract_failed_action_set ( surf_model_t  model)

Pop an action from the failed actions set.

Parameters
modelThe model from which the action is extracted
Returns
An action in failed state
surf_action_t surf_model_extract_ready_action_set ( surf_model_t  model)

Pop an action from the ready actions set.

Parameters
modelThe model from which the action is extracted
Returns
An action in ready state
surf_action_t surf_model_extract_running_action_set ( surf_model_t  model)

Pop an action from the running actions set.

Parameters
modelThe model from which the action is extracted
Returns
An action in running state
int surf_model_running_action_set_size ( surf_model_t  model)

Get the size of the running action set of a model.

Parameters
modelThe model
Returns
The size of the running action set
surf_action_t surf_workstation_model_execute_parallel_task ( surf_workstation_model_t  model,
int  workstation_nb,
void **  workstation_list,
double *  computation_amount,
double *  communication_amount,
double  rate 
)

Execute a parallel task.

[long description]

Parameters
modelThe model which handle the parallelisation
workstation_nbThe number of workstations
workstation_listThe list of workstations on which the task is executed
computation_amountThe processing amount (in flop) needed to process
communication_amountThe amount of data (in bytes) needed to transfer
rate[description]
Returns
The action corresponding to the parallele execution task
surf_action_t surf_workstation_model_communicate ( surf_workstation_model_t  model,
surf_resource_t  src,
surf_resource_t  dst,
double  size,
double  rate 
)

Create a communication between two hosts.

Parameters
modelThe model which handle the communication
srcThe source host
dstThe destination host
sizeThe amount of data (in bytes) needed to transfer
rate[description]
Returns
The action corresponding to the communication
xbt_dynar_t surf_workstation_model_get_route ( surf_workstation_model_t  model,
surf_resource_t  src,
surf_resource_t  dst 
)

Get the route between two hosts.

[long description]

Parameters
modelThe model which handle the routes
srcThe source host
dstThe destination host
Returns
The list of [TODO] from the source to the host
void surf_vm_workstation_model_create ( const char *  name,
surf_resource_t  ind_phys_host 
)

Create a new VM on the specified host.

Parameters
nameThe name of the workstation
ind_phys_hostThe host on which the VM is created
surf_action_t surf_network_model_communicate ( surf_network_model_t  model,
sg_routing_edge_t  src,
sg_routing_edge_t  dst,
double  size,
double  rate 
)

Create a communication between two routing edges [TODO].

[long description]

Parameters
modelThe model which handle the communication
srcThe source host
dstThe destination host
sizeThe amount of data (in bytes) needed to transfer
rate[description]
Returns
The action corresponding to the communication
const char* surf_resource_name ( surf_cpp_resource_t  resource)

Get the name of a surf resource (cpu, workstation, network, …)

Parameters
resourceThe surf resource
Returns
The name of the surf resource
xbt_dict_t surf_resource_get_properties ( surf_cpp_resource_t  resource)

Get the properties of a surf resource (cpu, workstation, network, …)

Parameters
resourceThe surf resource
Returns
The properties of the surf resource
e_surf_resource_state_t surf_resource_get_state ( surf_cpp_resource_t  resource)

Get the state of a surf resource (cpu, workstation, network, …)

Parameters
resourceThe surf resource
Returns
The state of the surf resource
void surf_resource_set_state ( surf_cpp_resource_t  resource,
e_surf_resource_state_t  state 
)

Set the state of a surf resource (cpu, workstation, network, …)

Parameters
resourceThe surf resource
stateThe new state of the surf resource
double surf_workstation_get_speed ( surf_resource_t  resource,
double  load 
)

Get the speed of the cpu associtated to a workstation.

Parameters
resourceThe surf workstation
load[description]
Returns
[description]
double surf_workstation_get_available_speed ( surf_resource_t  resource)

Get the available speed of cpu associtated to a workstation.

Parameters
resourceThe surf workstation
Returns
[description]
int surf_workstation_get_core ( surf_resource_t  resource)

Get the number of cores of the cpu associated to a workstation.

Parameters
resourceThe surf workstation
Returns
The number of cores
surf_action_t surf_workstation_execute ( surf_resource_t  resource,
double  size 
)

Execute some quantity of computation.

Parameters
resourceThe surf workstation
sizeThe value of the processing amount (in flop) needed to process
Returns
The surf action corresponding to the processing
surf_action_t surf_workstation_sleep ( surf_resource_t  resource,
double  duration 
)

Make the workstation sleep.

Parameters
resourceThe surf workstation
durationThe number of seconds to sleep
Returns
The surf action corresponding to the sleep
surf_action_t surf_workstation_open ( surf_resource_t  workstation,
const char *  fullpath 
)

Open a file on a workstation.

Parameters
workstationThe surf workstation
fullpathThe path to the file
Returns
The surf action corresponding to the openning
surf_action_t surf_workstation_close ( surf_resource_t  workstation,
surf_file_t  fd 
)

Close a file descriptor on a workstation.

Parameters
workstationThe surf workstation
fdThe file descriptor
Returns
The surf action corresponding to the closing
surf_action_t surf_workstation_read ( surf_resource_t  resource,
surf_file_t  fd,
sg_size_t  size 
)

Read a file.

Parameters
resourceThe surf workstation
fdThe file descriptor to read
sizeThe size in bytes to read
Returns
The surf action corresponding to the reading
surf_action_t surf_workstation_write ( surf_resource_t  resource,
surf_file_t  fd,
sg_size_t  size 
)

Write a file.

Parameters
resourceThe surf workstation
fdThe file descriptor to write
sizeThe size in bytes to write
Returns
The surf action corresponding to the writing
xbt_dynar_t surf_workstation_get_info ( surf_resource_t  resource,
surf_file_t  fd 
)

Get the informations of a file descriptor.

The returned xbt_dynar_t contains:

  • the size of the file,
  • the mount point,
  • the storage name,
  • the storage typeId,
  • the storage content type
Parameters
resourceThe surf workstation
fdThe file descriptor
Returns
An xbt_dynar_t with the file informations
sg_size_t surf_workstation_get_free_size ( surf_resource_t  resource,
const char *  name 
)

Get the available space of the storage at the mount point.

Parameters
resourceThe surf workstation
nameThe mount point
Returns
The amount of availble space in bytes
sg_size_t surf_workstation_get_used_size ( surf_resource_t  resource,
const char *  name 
)

Get the used space of the storage at the mount point.

Parameters
resourceThe surf workstation
nameThe mount point
Returns
The amount of used space in bytes
xbt_dynar_t surf_workstation_get_vms ( surf_resource_t  resource)

Get the VMs hosted on the workstation.

Parameters
resourceThe surf workstation
Returns
The list of VMs on the workstation
void surf_workstation_get_params ( surf_resource_t  resource,
ws_params_t  params 
)

[brief description]

[long description]

Parameters
resource[description]
params[description]
void surf_workstation_set_params ( surf_resource_t  resource,
ws_params_t  params 
)

[brief description]

[long description]

Parameters
resource[description]
params[description]
void surf_vm_workstation_destroy ( surf_resource_t  resource)

Destroy a Workstation VM.

Parameters
resourceThe surf workstation vm
void surf_vm_workstation_suspend ( surf_resource_t  resource)

Suspend a Workstation VM.

Parameters
resourceThe surf workstation vm
void surf_vm_workstation_resume ( surf_resource_t  resource)

Resume a Workstation VM.

Parameters
resourceThe surf workstation vm
void surf_vm_workstation_save ( surf_resource_t  resource)

Save the Workstation VM (Not yet implemented)

Parameters
resourceThe surf workstation vm
void surf_vm_workstation_restore ( surf_resource_t  resource)

Restore the Workstation VM (Not yet implemented)

Parameters
resourceThe surf workstation vm
void surf_vm_workstation_migrate ( surf_resource_t  resource,
surf_resource_t  ind_vm_ws_dest 
)

Migrate the VM to the destination host.

Parameters
resourceThe surf workstation vm
ind_vm_ws_destThe destination host
surf_resource_t surf_vm_workstation_get_pm ( surf_resource_t  resource)

Get the physical machine hosting the VM.

Parameters
resourceThe surf workstation vm
Returns
The physical machine hosting the VM
void surf_vm_workstation_set_bound ( surf_resource_t  resource,
double  bound 
)

[brief description]

[long description]

Parameters
resource[description]
bound[description]
void surf_vm_workstation_set_affinity ( surf_resource_t  resource,
surf_resource_t  cpu,
unsigned long  mask 
)

[brief description]

[long description]

Parameters
resource[description]
cpu[description]
mask[description]
surf_action_t surf_cpu_execute ( surf_resource_t  cpu,
double  size 
)

Execute some quantity of computation.

Parameters
cpuThe surf cpu
sizeThe value of the processing amount (in flop) needed to process
Returns
The surf action corresponding to the processing
surf_action_t surf_cpu_sleep ( surf_resource_t  cpu,
double  duration 
)

Make the cpu sleep for duration (in seconds)

[long description]

Parameters
cpuThe surf cpu
durationThe number of seconds to sleep
Returns
The surf action corresponding to the sleeping
double surf_workstation_get_current_power_peak ( surf_resource_t  host)

Get the workstation power peak.

[long description]

Parameters
hostThe surf workstation
Returns
The power peak
double surf_workstation_get_power_peak_at ( surf_resource_t  host,
int  pstate_index 
)

[brief description]

[long description]

Parameters
host[description]
pstate_index[description]
Returns
[description]
int surf_workstation_get_nb_pstates ( surf_resource_t  host)

[brief description]

[long description]

Parameters
host[description]
Returns
[description]
void surf_workstation_set_power_peak_at ( surf_resource_t  host,
int  pstate_index 
)

[brief description]

[long description]

Parameters
host[description]
pstate_index[description]
double surf_workstation_get_consumed_energy ( surf_resource_t  host)

Get the consumed energy (in joules) of a workstation.

Parameters
hostThe surf workstation
Returns
The consumed energy
xbt_dict_t surf_workstation_get_mounted_storage_list ( surf_resource_t  workstation)

Get the list of storages mounted on a workstation.

Parameters
workstationThe surf workstation
Returns
Dictionary of mount point, Storage
xbt_dynar_t surf_workstation_get_attached_storage_list ( surf_resource_t  workstation)

Get the list of storages attached to a workstation.

Parameters
workstationThe surf workstation
Returns
Dictionary of storage
int surf_workstation_unlink ( surf_resource_t  workstation,
surf_file_t  fd 
)

Unlink a file descriptor.

Parameters
workstationThe surf workstation
fdThe file descriptor
Returns
0 if failed to unlink, 1 otherwise
size_t surf_workstation_get_size ( surf_resource_t  workstation,
surf_file_t  fd 
)

Get the size of a file on a workstation.

Parameters
workstationThe surf workstation
fdThe file descriptor
Returns
The size in bytes of the file
size_t surf_workstation_file_tell ( surf_resource_t  workstation,
surf_file_t  fd 
)

Get the current position of the file descriptor.

Parameters
workstationThe surf workstation
fdThe file descriptor
Returns
The current position of the file descriptor
int surf_workstation_file_move ( surf_resource_t  workstation,
surf_file_t  fd,
const char *  fullpath 
)

Move a file to another location on the same mount point.

[long description]

Parameters
workstationThe surf workstation
fdThe file descriptor
fullpathThe new full path
Returns
MSG_OK if successful, otherwise MSG_TASK_CANCELED
int surf_workstation_file_seek ( surf_resource_t  workstation,
surf_file_t  fd,
sg_offset_t  offset,
int  origin 
)

Set the position indictator assiociated with the file descriptor to a new position.

[long description]

Parameters
workstationThe surf workstation
fdThe file descriptor
offsetThe offset from the origin
originPosition used as a reference for the offset
  • SEEK_SET: beginning of the file
  • SEEK_CUR: current position indicator
  • SEEK_END: end of the file
Returns
MSG_OK if successful, otherwise MSG_TASK_CANCELED
int surf_network_link_is_shared ( surf_cpp_resource_t  link)

[brief description]

[long description]

Parameters
link[description]
Returns
[description]
double surf_network_link_get_bandwidth ( surf_cpp_resource_t  link)

Get the bandwidth of a link in bytes per second.

Parameters
linkThe surf link
Returns
The bandwidth in bytes per second
double surf_network_link_get_latency ( surf_cpp_resource_t  link)

Get the latency of a link in seconds.

Parameters
linkThe surf link
Returns
The latency in seconds
xbt_dict_t surf_storage_get_content ( surf_resource_t  resource)

Get the content of a storage.

Parameters
resourceThe surf storage
Returns
A xbt_dict_t with path as keys and size in bytes as values
sg_size_t surf_storage_get_size ( surf_resource_t  resource)

Get the size in bytes of a storage.

Parameters
resourceThe surf storage
Returns
The size in bytes of the storage
sg_size_t surf_storage_get_free_size ( surf_resource_t  resource)

Get the available size in bytes of a storage.

Parameters
resourceThe surf storage
Returns
The available size in bytes of the storage
sg_size_t surf_storage_get_used_size ( surf_resource_t  resource)

Get the size in bytes of a storage.

Parameters
resourceThe surf storage
Returns
The used size in bytes of the storage
void* surf_action_get_data ( surf_action_t  action)

Get the data associated to the action.

Parameters
actionThe surf action
Returns
The data associated to the action
void surf_action_set_data ( surf_action_t  action,
void *  data 
)

Set the data associated to the action.

[long description]

Parameters
actionThe surf action
dataThe new data associated to the action
void surf_action_unref ( surf_action_t  action)

Unreference an action.

Parameters
actionThe surf action
double surf_action_get_start_time ( surf_action_t  action)

Get the start time of an action.

Parameters
actionThe surf action
Returns
The start time in seconds from the beginning of the simulation
double surf_action_get_finish_time ( surf_action_t  action)

Get the finish time of an action.

Parameters
actionThe surf action
Returns
The finish time in seconds from the beginning of the simulation
double surf_action_get_remains ( surf_action_t  action)

Get the remains amount of work to do of an action.

Parameters
actionThe surf action
Returns
The remains amount of work to do
void surf_action_suspend ( surf_action_t  action)

Suspend an action.

Parameters
actionThe surf action
void surf_action_resume ( surf_action_t  action)

Resume an action.

Parameters
actionThe surf action
void surf_action_cancel ( surf_action_t  action)

Cancel an action.

Parameters
actionThe surf action
void surf_action_set_priority ( surf_action_t  action,
double  priority 
)

Set the priority of an action.

[long description]

Parameters
actionThe surf action
priorityThe new priority [TODO]
void surf_action_set_category ( surf_action_t  action,
const char *  category 
)

Set the category of an action.

[long description]

Parameters
actionThe surf action
categoryThe new category of the action
e_surf_action_state_t surf_action_get_state ( surf_action_t  action)

Get the state of an action.

Parameters
actionThe surf action
Returns
The state of the action
double surf_action_get_cost ( surf_action_t  action)

Get the cost of an action.

Parameters
actionThe surf action
Returns
The cost of the action
void surf_cpu_action_set_affinity ( surf_action_t  action,
surf_resource_t  cpu,
unsigned long  mask 
)

[brief desrciption]

[long description]

Parameters
actionThe surf cpu action
cpu[description]
mask[description]
void surf_cpu_action_set_bound ( surf_action_t  action,
double  bound 
)

[brief description]

[long description]

Parameters
actionThe surf cpu action
bound[description]
double surf_network_action_get_latency_limited ( surf_action_t  action)

[brief description]

[long description]

Parameters
actionThe surf network action
surf_file_t surf_storage_action_get_file ( surf_action_t  action)

Get the file associated to a storage action.

Parameters
actionThe surf storage action
Returns
The file associated to a storage action
xbt_dict_t surf_storage_action_get_ls_dict ( surf_action_t  action)

Get the result dictionary of an ls action.

Parameters
actionThe surf storage action
Returns
The dictionry listing a path
const char* surf_storage_get_host ( surf_resource_t  resource)

Get the host the storage is attached to.

Parameters
resourceThe surf storage
Returns
The host name