Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot//simgrid/simgrid
[simgrid.git] / src / bindings / java / surfdoc.i
1
2 %javamethodmodifiers getClock() "
3   /**
4     * @return The current simulated time
5     */
6   public";
7
8 %typemap(javaimports) Model "
9 /**
10   * A component (e.g., Cpu, Network, Storage, ...) is composed of three classes:
11   * <ul>
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>
15   * </ul>
16   * @see Resource
17   * @see Action
18   */"
19
20 %javamethodmodifiers Model::Model(const char *name) "
21   /**
22     * Model constructor
23     * @param name The name of the model
24     */
25   public";
26
27 %javamethodmodifiers Model::getName() "
28   /**
29     * @return The name of the model
30     */
31   public";
32
33 %javamethodmodifiers Model::shareResources(double now) "
34   /**
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
38     */
39   public";
40
41 %javamethodmodifiers Model::updateActionsState(double now, double delta) "
42   /**
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
46     */
47   public";
48
49   %javamethodmodifiers Model::getRunningActionSet() "
50   /**
51     * Get the List of running Actions
52     */
53   public";
54
55
56 %typemap(javaimports) CpuModel "
57 /**
58   * The generic model for the Cpu component
59   * @see Cpu
60   * @see CpuAction
61   */"
62
63 %javamethodmodifiers CpuModel::CpuModel(const char *name) "
64   /**
65     * CpuModel constructon
66     * @param name The name of the cpumodel
67     */
68   public";
69
70
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) "
77   /**
78     * Create a new Cpu
79     *
80     * @param name
81     * @param power_peak
82     * @param pstate
83     * @param power_scale
84     * @param power_trace
85     * @param core
86     * @param state_initial
87     * @param state_trace
88     * @param cpu_properties
89     * @return The new Cpu
90     * @see Cpu
91     */
92   public";
93
94
95 %typemap(javaimports) Resource "
96 /**
97   * A resource used by a model (e.g., a cpu, a network link)
98   * @see Model
99   * @see Action
100   */"
101
102 %javamethodmodifiers Resource::getName() "
103   /**
104     * @return The name of the resource
105     */
106   public";
107
108 %javamethodmodifiers Resource::isUsed() "
109   /**
110     * @return True if the Resource is used
111     */
112   public";
113
114 %javamethodmodifiers Resource::getModel() "
115   /**
116     * @return The model associated to this Resource
117     */
118   public";
119
120 %javamethodmodifiers Resource::getState() "
121   /**
122     * @return The state of the resource
123     * @see ResourceState
124     */
125   public";
126
127 %javamethodmodifiers Resource::getConstraint() "
128   /**
129     * @return The constraint associatied (if using LMM)
130     */
131   public";
132
133 %javamethodmodifiers Resource::getProperties() "
134   /**
135     * @return The XbtDict of properties associated to this Resource
136     */
137   public";
138
139 %javamethodmodifiers Resource::updateState(tmgr_trace_event *event_type, double value, double date) "
140   /**
141     * Update the state of the Resource
142     * @param event_type
143     * @param value
144     * @param date
145     */
146   public";
147
148
149 %typemap(javaimports) Cpu "
150 /**
151   * A generic resource for the cpu component
152   * @see CpuModel
153   * @see CpuAction
154   */"
155
156 %javamethodmodifiers Cpu::Cpu(Model *model, const char *name, s_xbt_dict *props,
157     lmm_constraint *constraint, int core, double powerPeak, double powerScale) "
158   /**
159     * A cpu constructor (using LMM)
160     * @param model
161     * @param name
162     * @param props
163     * @param constraint
164     * @param core
165     * @param powerPeak
166     * @param powerScale
167     */
168   public";
169
170 %javamethodmodifiers Cpu::Cpu(Model *model, const char *name, s_xbt_dict *props,
171     int core, double powerPeak, double powerScale) "
172   /**
173     * A cpu constructor
174     * @param model
175     * @param name
176     * @param props
177     * @param core
178     * @param powerPeak
179     * @param powerScale
180     */
181   public";
182
183 %javamethodmodifiers Cpu::getCurrentPowerPeak() "
184   /**
185     * @return The current power peak
186     */
187   public";
188
189 %javamethodmodifiers Cpu::execute(double size) "
190   /**
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
194     */
195   public";
196
197 %javamethodmodifiers Cpu::sleep(double duration) "
198   /**
199     * Make a process sleep for duration
200     * @param duration The number of seconds to sleep
201     * @return A cpu action representing sleeping
202     */
203   public";
204
205 %javamethodmodifiers Cpu::getCore() "
206   /**
207     * @return The number of cores on the cpu
208     */
209   public";
210
211 %javamethodmodifiers Cpu::getSpeed(double load) "
212   /**
213     * TODO
214     * @param load
215     */
216   public";
217
218 %javamethodmodifiers Cpu::getAvailableSpeed() "
219   /**
220     * TODO
221     */
222   public";
223
224 %javamethodmodifiers Cpu::getPowerPeakAt(int pstate_index) "
225   /**
226     * @param pstate_index index of power peak to get
227     * @return Power peak at index
228     */
229   public";
230
231   %javamethodmodifiers Cpu::getNbPstates() "
232   /**
233     * @return Number of power peak
234     */
235   public";
236
237 %javamethodmodifiers Cpu::setPowerPeakAt(int pstate_index) "
238   /**
239     * @param pstate_index index of power peak to set
240     */
241   public";
242
243 %javamethodmodifiers Cpu::setState(e_surf_resource_state_t state) "
244   /**
245     * @param state The new state of the cpu
246     */
247   public";
248
249
250 %typemap(javaimports) NetworkLink "
251 /**
252  * A generic resource for the network component
253  */"
254
255   %javamethodmodifiers NetworkLink::getBandwidth() "
256   /**
257     * @return The bandwidth of the link
258     */
259   public";
260
261 %javamethodmodifiers NetworkLink::updateBandwidth(double value, double date=surf_get_clock()) "
262   /**
263     * @param value The new bandwidth
264     */
265   public";
266
267   %javamethodmodifiers NetworkLink::getLatency() "
268   /**
269     * @return The latency of the link
270     */
271   public";
272
273 %javamethodmodifiers NetworkLink::updateLatency(double value, double date=surf_get_clock()) "
274   /**
275     * @param value The new latency
276     */
277   public";
278
279
280 %typemap(javaimports) Action "
281 /**
282   * An action created by a Resource (e.g., a communication, an execution)
283   * @see Model
284   * @see Resource
285   */"
286
287 %javamethodmodifiers Action::Action(Model *model, double cost, bool failed) "
288   /**
289     * Action constructor
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
293     */
294   public";
295
296 %javamethodmodifiers Action::getModel() "
297   /**
298     * @return The model associated
299     */
300   public";
301
302 %javamethodmodifiers Action::getVariable() "
303   /**
304     * @return The variable associatied (if using LMM)
305     */
306   public";
307
308 %javamethodmodifiers Action::getState() "
309   /**
310     * @return The state of the action
311     */
312   public";
313
314 %javamethodmodifiers Action::isSuspended() "
315   /**
316     * @return True if suspended
317     */
318   public";
319
320 %javamethodmodifiers Action::getBound() "
321   /**
322     * @return TODO
323     */
324   public";
325
326 %javamethodmodifiers Action::setBound(double bound) "
327   /**
328     * @param bound TODO
329     */
330   public";
331
332 %javamethodmodifiers Action::updateRemains(double delta) "
333   /**
334     * Update remaining amount of cost to do
335     * @param delta Difference of time since last call to this function
336     */
337   public";
338
339 %javamethodmodifiers Action::getRemains() "
340   /**
341     * @return The remaining amount of cost to do
342     */
343   public";
344
345 %javamethodmodifiers Action::setPriority(double priority) "
346   /**
347     * @param priority The new priority of the action
348     */
349   public";
350
351 %javamethodmodifiers Action::setState(e_surf_action_state_t state) "
352   /**
353     * @param state The new state
354     */
355   public";
356
357
358 %typemap(javaimports) CpuAction "
359 /**
360   * An cpu action created by a Cpu
361   * @see CpuModel
362   * @see Cpu
363   */"
364
365 %javamethodmodifiers CpuAction::CpuAction(Model *model, double cost, bool failed) "
366   /**
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
371     */
372   public";
373
374 %javamethodmodifiers CpuAction::getCpu() "
375   /**
376     * @return The associated cpu
377     */
378   public";
379
380
381 %typemap(javaimports) NetworkAction "
382 /**
383   * An network action created by network model
384   * @see NetworkLink
385   */"
386
387 %javamethodmodifiers NetworkAction::getLatency() "
388   /**
389     * @return The latency of the action
390     */
391   public";
392
393
394 %typemap(javaimports) LmmConstraint "
395 /**
396   * An linear maxmin generic constraint
397   */"
398
399 %javamethodmodifiers LmmConstraint::getUsage() "
400   /**
401     *
402     */
403   public";
404
405 %typemap(javaimports) LmmVariable "
406 /**
407   * An linear maxmin generic variable
408   */"
409
410 %javamethodmodifiers LmmVariable::getValue() "
411   /**
412     *
413     */
414   public";
415
416 %typemap(javaimports) XbtDict "
417 /**
418   * A c structure handling key:values
419   */"
420
421 %javamethodmodifiers XbtDict::getValue(char *key) "
422   /**
423     *
424     */
425   public";
426
427
428 %typemap(javaimports) ActionState "
429 /**
430   * The possible states of an Action
431   */"
432
433
434 %typemap(javaimports) ResourceState "
435 /**
436   * The possible states of a Resource
437   */"