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
264 * @param date When to change the bandwidth
268 %javamethodmodifiers NetworkLink::getLatency() "
270 * @return The latency of the link
274 %javamethodmodifiers NetworkLink::updateLatency(double value, double date=surf_get_clock()) "
276 * @param value The new latency
277 * @param date When to change the latency
282 %typemap(javaimports) Action "
284 * An action created by a Resource (e.g., a communication, an execution)
289 %javamethodmodifiers Action::Action(Model *model, double cost, bool failed) "
292 * @param model The model associated
293 * @param cost The cost of the action (e.g., flops, bytes)
294 * @param failed If the action has failed
298 %javamethodmodifiers Action::getModel() "
300 * @return The model associated
304 %javamethodmodifiers Action::getVariable() "
306 * @return The variable associatied (if using LMM)
310 %javamethodmodifiers Action::getState() "
312 * @return The state of the action
316 %javamethodmodifiers Action::isSuspended() "
318 * @return True if suspended
322 %javamethodmodifiers Action::getBound() "
328 %javamethodmodifiers Action::setBound(double bound) "
334 %javamethodmodifiers Action::updateRemains(double delta) "
336 * Update remaining amount of cost to do
337 * @param delta Difference of time since last call to this function
341 %javamethodmodifiers Action::getRemains() "
343 * @return The remaining amount of cost to do
347 %javamethodmodifiers Action::setPriority(double priority) "
349 * @param priority The new priority of the action
353 %javamethodmodifiers Action::setState(e_surf_action_state_t state) "
355 * @param state The new state
360 %typemap(javaimports) CpuAction "
362 * An cpu action created by a Cpu
367 %javamethodmodifiers CpuAction::CpuAction(Model *model, double cost, bool failed) "
369 * CpuAction constructor
370 * @param model The model associated
371 * @param cost The cost of the action (e.g., flops, bytes)
372 * @param failed If the action has failed
376 %javamethodmodifiers CpuAction::getCpu() "
378 * @return The associated cpu
383 %typemap(javaimports) NetworkAction "
385 * An network action created by network model
389 %javamethodmodifiers NetworkAction::getLatency() "
391 * @return The latency of the action
396 %typemap(javaimports) LmmConstraint "
398 * An linear maxmin generic constraint
401 %javamethodmodifiers LmmConstraint::getUsage() "
407 %typemap(javaimports) LmmVariable "
409 * An linear maxmin generic variable
412 %javamethodmodifiers LmmVariable::getValue() "
418 %typemap(javaimports) XbtDict "
420 * A c structure handling key:values
423 %javamethodmodifiers XbtDict::getValue(char *key) "
430 %typemap(javaimports) ActionState "
432 * The possible states of an Action
436 %typemap(javaimports) ResourceState "
438 * The possible states of a Resource