Commit b054079d authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Added new SiSTypes

Added convenience method for one-ID sets in INodeID
parent 20101530
......@@ -21,7 +21,9 @@
package de.tudarmstadt.maki.simonstrator.api.common.graph;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import de.tudarmstadt.maki.simonstrator.api.common.UniqueID;
......@@ -62,6 +64,18 @@ public class INodeID implements UniqueID {
return id;
}
/**
* Convenience method returns a set containing only one id
*
* @param id
* @return
*/
public static Set<INodeID> getSingleIDSet(INodeID id) {
Set<INodeID> set = new LinkedHashSet<>();
set.add(id);
return set;
}
/**
* Private constructor
*
......
......@@ -25,6 +25,7 @@ import java.util.Map;
import de.tudarmstadt.maki.simonstrator.api.Monitor;
import de.tudarmstadt.maki.simonstrator.api.Monitor.Level;
import de.tudarmstadt.maki.simonstrator.api.common.graph.Graph;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
import de.tudarmstadt.maki.simonstrator.api.component.sis.type.aggregation.AbstractAggregation.AggregationDouble;
......@@ -55,6 +56,19 @@ public final class SiSTypes {
public static final SiSType<Location> PHY_LOCATION = create("PHY_LOCATION",
Location.class, null);
/**
* Graph containing the physical neighborhood of a node according to a
* topologyProvider
*/
public static final SiSType<Graph> PHY_TOPOLOGY = create("PHY_TOPOLOGY",
Graph.class, null);
/**
* Energy (percentage) as double from 0 to 100
*/
public static final SiSType<Double> ENERGY_BATTERY_LEVEL = create(
"ENERGY_BATTERY_LEVEL", Double.class, new AggregationDouble());
/**
* [none] Just a dummy Test attribute of type double. Do not use in
* production code.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment