Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d88734c3c901d0d8c790f69eea2644d7cbfba985
[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::createResource(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     * @param date When to change the bandwidth
265     */
266   public";
267
268   %javamethodmodifiers NetworkLink::getLatency() "
269   /**
270     * @return The latency of the link
271     */
272   public";
273
274 %javamethodmodifiers NetworkLink::updateLatency(double value, double date=surf_get_clock()) "
275   /**
276     * @param value The new latency
277     * @param date When to change the latency
278     */
279   public";
280
281
282 %typemap(javaimports) Action "
283 /**
284   * An action created by a Resource (e.g., a communication, an execution)
285   * @see Model
286   * @see Resource
287   */"
288
289 %javamethodmodifiers Action::Action(Model *model, double cost, bool failed) "
290   /**
291     * Action constructor
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
295     */
296   public";
297
298 %javamethodmodifiers Action::getModel() "
299   /**
300     * @return The model associated
301     */
302   public";
303
304 %javamethodmodifiers Action::getVariable() "
305   /**
306     * @return The variable associatied (if using LMM)
307     */
308   public";
309
310 %javamethodmodifiers Action::getState() "
311   /**
312     * @return The state of the action
313     */
314   public";
315
316 %javamethodmodifiers Action::isSuspended() "
317   /**
318     * @return True if suspended
319     */
320   public";
321
322 %javamethodmodifiers Action::getBound() "
323   /**
324     * @return TODO
325     */
326   public";
327
328 %javamethodmodifiers Action::setBound(double bound) "
329   /**
330     * @param bound TODO
331     */
332   public";
333
334 %javamethodmodifiers Action::updateRemains(double delta) "
335   /**
336     * Update remaining amount of cost to do
337     * @param delta Difference of time since last call to this function
338     */
339   public";
340
341 %javamethodmodifiers Action::getRemains() "
342   /**
343     * @return The remaining amount of cost to do
344     */
345   public";
346
347 %javamethodmodifiers Action::setPriority(double priority) "
348   /**
349     * @param priority The new priority of the action
350     */
351   public";
352
353 %javamethodmodifiers Action::setState(e_surf_action_state_t state) "
354   /**
355     * @param state The new state
356     */
357   public";
358
359
360 %typemap(javaimports) CpuAction "
361 /**
362   * An cpu action created by a Cpu
363   * @see CpuModel
364   * @see Cpu
365   */"
366
367 %javamethodmodifiers CpuAction::CpuAction(Model *model, double cost, bool failed) "
368   /**
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
373     */
374   public";
375
376 %javamethodmodifiers CpuAction::getCpu() "
377   /**
378     * @return The associated cpu
379     */
380   public";
381
382
383 %typemap(javaimports) NetworkAction "
384 /**
385   * An network action created by network model
386   * @see NetworkLink
387   */"
388
389 %javamethodmodifiers NetworkAction::getLatency() "
390   /**
391     * @return The latency of the action
392     */
393   public";
394
395
396 %typemap(javaimports) LmmConstraint "
397 /**
398   * An linear maxmin generic constraint
399   */"
400
401 %javamethodmodifiers LmmConstraint::getUsage() "
402   /**
403     *
404     */
405   public";
406
407 %typemap(javaimports) LmmVariable "
408 /**
409   * An linear maxmin generic variable
410   */"
411
412 %javamethodmodifiers LmmVariable::getValue() "
413   /**
414     *
415     */
416   public";
417
418 %typemap(javaimports) XbtDict "
419 /**
420   * A c structure handling key:values
421   */"
422
423 %javamethodmodifiers XbtDict::getValue(char *key) "
424   /**
425     *
426     */
427   public";
428
429
430 %typemap(javaimports) ActionState "
431 /**
432   * The possible states of an Action
433   */"
434
435
436 %typemap(javaimports) ResourceState "
437 /**
438   * The possible states of a Resource
439   */"