Ejemplo n.º 1
0
    public Position getPosition() {
      if (positionProvider == null) {
        return null;
      }

      return positionProvider.getPosition();
    }
Ejemplo n.º 2
0
    public LoopDevice(DEECoContainer container) {
      this.container = container;
      address = new MANETBroadcastAddress(getId());
      positionProvider = container.getPluginInstance(PositionPlugin.class);
      scheduler = container.getRuntimeFramework().getScheduler();

      if (positionProvider != null) {
        Log.i(
            container.getId()
                + ": "
                + LoopDevice.class.getSimpleName()
                + " using node position information provided by "
                + positionProvider.getClass().getSimpleName());
      } else {
        Log.i(
            container.getId()
                + ": "
                + LoopDevice.class.getSimpleName()
                + " not using node position information");
      }
    }