Package se.sics.cooja

Examples of se.sics.cooja.Positioner


                positionDistributionBox.getSelectedItem())) {
              positionerClass = positioner;
            }
          }

          Positioner positioner = Positioner.generateInterface(positionerClass,
              motesToAdd,
              ((Number) startX.getValue()).doubleValue(), ((Number) endX
                  .getValue()).doubleValue(), ((Number) startY.getValue())
                  .doubleValue(), ((Number) endY.getValue()).doubleValue(),
                  ((Number) startZ.getValue()).doubleValue(), ((Number) endZ
                      .getValue()).doubleValue());

          if (positioner == null) {
            logger.fatal("Could not create positioner");
            return;
          }

          for (int i = 0; i < newMotes.size(); i++) {
            Position newPosition = newMotes.get(i).getInterfaces().getPosition();
            if (newPosition != null) {
              double[] newPositionArray = positioner.getNextPosition();
              if (newPositionArray.length >= 3) {
                newPosition.setCoordinates(newPositionArray[0],
                    newPositionArray[1], newPositionArray[2]);
              } else if (newPositionArray.length >= 2) {
                newPosition.setCoordinates(newPositionArray[0],
View Full Code Here

TOP

Related Classes of se.sics.cooja.Positioner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.