2 %javamethodmodifiers getClock() "
4 * @return The current simulated time
8 %typemap(javaimports) Model "
10 * A component (e.g., Cpu, Network, Storage, ...) is composed of three classes:
12 * <li> Model: It handle the interactions between resoucses and actions</li>
13 * <li> Resource: A resource used by the model (e.g., a cpu, a network link)</li>
14 * <li> Action: An action generated by the resources (e.g., execution, communication)</li>
20 %javamethodmodifiers Model::Model(const char *name) "
23 * @param name The name of the model
27 %javamethodmodifiers Model::getName() "
29 * @return The name of the model
33 %javamethodmodifiers Model::shareResources(double now) "
35 * Share the resources between the actions
36 * @param now the current time
37 * @return the date of the next action of the model will finish
41 %javamethodmodifiers Model::updateActionsState(double now, double delta) "
43 * Update time of actions and eventually their states
44 * @param now the new current time
45 * @param delta the delta between previous and new current time
49 %javamethodmodifiers Model::getRunningActionSet() "
51 * Get the List of running Actions
56 %typemap(javaimports) CpuModel "
58 * The generic model for the Cpu component
63 %javamethodmodifiers CpuModel::CpuModel(const char *name) "
65 * CpuModel constructon
66 * @param name The name of the cpumodel
71 %javamethodmodifiers CpuModel::createCpu(const char *name, DoubleDynar power_peak,
72 int pstate, double power_scale,
73 tmgr_trace *power_trace, int core,
74 e_surf_resource_state_t state_initial,
75 tmgr_trace *state_trace,
76 s_xbt_dict *cpu_properties) "
86 * @param state_initial
88 * @param cpu_properties
95 %typemap(javaimports) Resource "
97 * A resource used by a model (e.g., a cpu, a network link)
102 %javamethodmodifiers Resource::getName() "
104 * @return The name of the resource
108 %javamethodmodifiers Resource::isUsed() "
110 * @return True if the Resource is used
114 %javamethodmodifiers Resource::getModel() "
116 * @return The model associated to this Resource
120 %javamethodmodifiers Resource::getState() "
122 * @return The state of the resource
127 %javamethodmodifiers Resource::getConstraint() "
129 * @return The constraint associatied (if using LMM)
133 %javamethodmodifiers Resource::getProperties() "
135 * @return The XbtDict of properties associated to this Resource
139 %javamethodmodifiers Resource::updateState(tmgr_trace_event *event_type, double value, double date) "
141 * Update the state of the Resource
149 %typemap(javaimports) Cpu "
151 * A generic resource for the cpu component
156 %javamethodmodifiers Cpu::Cpu(Model *model, const char *name, s_xbt_dict *props,
157 lmm_constraint *constraint, int core, double powerPeak, double powerScale) "
159 * A cpu constructor (using LMM)
170 %javamethodmodifiers Cpu::Cpu(Model *model, const char *name, s_xbt_dict *props,
171 int core, double powerPeak, double powerScale) "
183 %javamethodmodifiers Cpu::getCurrentPowerPeak() "
185 * @return The current power peak
189 %javamethodmodifiers Cpu::execute(double size) "
191 * Execute some quantity of computation
192 * @param size The processing amount (in flop) needed to process
193 * @return A cpu action representing code execution
197 %javamethodmodifiers Cpu::sleep(double duration) "
199 * Make a process sleep for duration
200 * @param duration The number of seconds to sleep
201 * @return A cpu action representing sleeping
205 %javamethodmodifiers Cpu::getCore() "
207 * @return The number of cores on the cpu
211 %javamethodmodifiers Cpu::getSpeed(double load) "
218 %javamethodmodifiers Cpu::getAvailableSpeed() "
224 %javamethodmodifiers Cpu::getPowerPeakAt(int pstate_index) "
226 * @param pstate_index index of power peak to get
227 * @return Power peak at index
231 %javamethodmodifiers Cpu::getNbPstates() "
233 * @return Number of power peak
237 %javamethodmodifiers Cpu::setPowerPeakAt(int pstate_index) "
239 * @param pstate_index index of power peak to set
243 %javamethodmodifiers Cpu::setState(e_surf_resource_state_t state) "
245 * @param state The new state of the cpu
250 %typemap(javaimports) NetworkLink "
252 * A generic resource for the network component
255 %javamethodmodifiers NetworkLink::getBandwidth() "
257 * @return The bandwidth of the link
261 %javamethodmodifiers NetworkLink::updateBandwidth(double value, double date=surf_get_clock()) "
263 * @param value The new bandwidth
267 %javamethodmodifiers NetworkLink::getLatency() "
269 * @return The latency of the link
273 %javamethodmodifiers NetworkLink::updateLatency(double value, double date=surf_get_clock()) "
275 * @param value The new latency
280 %typemap(javaimports) Action "
282 * An action created by a Resource (e.g., a communication, an execution)
287 %javamethodmodifiers Action::Action(Model *model, double cost, bool failed) "
290 * @param model The model associated
291 * @param cost The cost of the action (e.g., flops, bytes)
292 * @param failed If the action has failed
296 %javamethodmodifiers Action::getModel() "
298 * @return The model associated
302 %javamethodmodifiers Action::getVariable() "
304 * @return The variable associatied (if using LMM)
308 %javamethodmodifiers Action::getState() "
310 * @return The state of the action
314 %javamethodmodifiers Action::isSuspended() "
316 * @return True if suspended
320 %javamethodmodifiers Action::getBound() "
326 %javamethodmodifiers Action::setBound(double bound) "
332 %javamethodmodifiers Action::updateRemains(double delta) "
334 * Update remaining amount of cost to do
335 * @param delta Difference of time since last call to this function
339 %javamethodmodifiers Action::getRemains() "
341 * @return The remaining amount of cost to do
345 %javamethodmodifiers Action::setPriority(double priority) "
347 * @param priority The new priority of the action
351 %javamethodmodifiers Action::setState(e_surf_action_state_t state) "
353 * @param state The new state
358 %typemap(javaimports) CpuAction "
360 * An cpu action created by a Cpu
365 %javamethodmodifiers CpuAction::CpuAction(Model *model, double cost, bool failed) "
367 * CpuAction constructor
368 * @param model The model associated
369 * @param cost The cost of the action (e.g., flops, bytes)
370 * @param failed If the action has failed
374 %javamethodmodifiers CpuAction::getCpu() "
376 * @return The associated cpu
381 %typemap(javaimports) NetworkAction "
383 * An network action created by network model
387 %javamethodmodifiers NetworkAction::getLatency() "
389 * @return The latency of the action
394 %typemap(javaimports) LmmConstraint "
396 * An linear maxmin generic constraint
399 %javamethodmodifiers LmmConstraint::getUsage() "
405 %typemap(javaimports) LmmVariable "
407 * An linear maxmin generic variable
410 %javamethodmodifiers LmmVariable::getValue() "
416 %typemap(javaimports) XbtDict "
418 * A c structure handling key:values
421 %javamethodmodifiers XbtDict::getValue(char *key) "
428 %typemap(javaimports) ActionState "
430 * The possible states of an Action
434 %typemap(javaimports) ResourceState "
436 * The possible states of a Resource