jadex.micro.testcases.nfproperties.FakeCpuLoadProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-micro Show documentation
Show all versions of jadex-applications-micro Show documentation
The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.
package jadex.micro.testcases.nfproperties;
import jadex.bridge.IInternalAccess;
import jadex.bridge.nonfunctional.NFPropertyMetaInfo;
import jadex.bridge.nonfunctional.SimpleValueNFProperty;
/**
* Property simulating a random amount of CPU load.
*/
public class FakeCpuLoadProperty extends SimpleValueNFProperty
{
/**
* Creates the property.
*/
public FakeCpuLoadProperty(IInternalAccess comp)
{
super(comp, new NFPropertyMetaInfo("fakecpuload", Double.class, Void.class, true, 10000, true, null));
}
/**
* Measure the value.
*/
public Double measureValue()
{
return Math.random() * 100.0;
}
}