1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
9 package org.simgrid.surf;
12 * A generic resource for the network component
14 public class NetworkLink extends Resource {
15 private long swigCPtr;
17 protected NetworkLink(long cPtr, boolean cMemoryOwn) {
18 super(SurfJNI.NetworkLink_SWIGUpcast(cPtr), cMemoryOwn);
22 protected static long getCPtr(NetworkLink obj) {
23 return (obj == null) ? 0 : obj.swigCPtr;
26 protected void finalize() {
30 public synchronized void delete() {
34 SurfJNI.delete_NetworkLink(swigCPtr);
41 protected static long[] cArrayUnwrap(NetworkLink[] arrayWrapper) {
42 long[] cArray = new long[arrayWrapper.length];
43 for (int i=0; i<arrayWrapper.length; i++)
44 cArray[i] = NetworkLink.getCPtr(arrayWrapper[i]);
48 protected static NetworkLink[] cArrayWrap(long[] cArray, boolean cMemoryOwn) {
49 NetworkLink[] arrayWrapper = new NetworkLink[cArray.length];
50 for (int i=0; i<cArray.length; i++)
51 arrayWrapper[i] = new NetworkLink(cArray[i], cMemoryOwn);
57 * @return The bandwidth of the link
59 public double getBandwidth() {
60 return SurfJNI.NetworkLink_getBandwidth(swigCPtr, this);
65 * @param value The new bandwidth
66 * @param date When to change the bandwidth
68 public void updateBandwidth(double value, double date) {
69 SurfJNI.NetworkLink_updateBandwidth__SWIG_0(swigCPtr, this, value, date);
74 * @param value The new bandwidth
75 * @param date When to change the bandwidth
77 public void updateBandwidth(double value) {
78 SurfJNI.NetworkLink_updateBandwidth__SWIG_1(swigCPtr, this, value);
83 * @return The latency of the link
85 public double getLatency() {
86 return SurfJNI.NetworkLink_getLatency(swigCPtr, this);
91 * @param value The new latency
92 * @param date When to change the latency
94 public void updateLatency(double value, double date) {
95 SurfJNI.NetworkLink_updateLatency__SWIG_0(swigCPtr, this, value, date);
100 * @param value The new latency
101 * @param date When to change the latency
103 public void updateLatency(double value) {
104 SurfJNI.NetworkLink_updateLatency__SWIG_1(swigCPtr, this, value);