@Override public void configureNode(Node node) { PhysicalLayer physical = (PhysicalLayer) node.getLayer(LayerType.PHYSICAL); PhysicalLayerState state = (PhysicalLayerState) physical.getState(); state.setRadioState(RadioState.LISTENING); physical.setState(state); }
public static String convertNodeNameToType(Node node) { String nodeName = node.getNodeName(); String result = ""; if (nodeName.equals("UAV")) { result = "1"; } if (nodeName.equals("REGULAR")) { result = "2"; } if (nodeName.equals("INTRUDER")) { result = "30"; } return result; }