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
67 public void updateBandwidth(double value, double date) {
68 SurfJNI.NetworkLink_updateBandwidth__SWIG_0(swigCPtr, this, value, date);
73 * @param value The new bandwidth
75 public void updateBandwidth(double value) {
76 SurfJNI.NetworkLink_updateBandwidth__SWIG_1(swigCPtr, this, value);
81 * @return The latency of the link
83 public double getLatency() {
84 return SurfJNI.NetworkLink_getLatency(swigCPtr, this);
89 * @param value The new latency
91 public void updateLatency(double value, double date) {
92 SurfJNI.NetworkLink_updateLatency__SWIG_0(swigCPtr, this, value, date);
97 * @param value The new latency
99 public void updateLatency(double value) {
100 SurfJNI.NetworkLink_updateLatency__SWIG_1(swigCPtr, this, value);