Package com.dcaiti.eworld.visualizer.simulation.models

Examples of com.dcaiti.eworld.visualizer.simulation.models.Vehicle


   */
  private void addVehicle(final Vehicle addedVehicle) throws IOException {
    Runnable worker = new Runnable() {
      @Override
      public synchronized void run() {
        Vehicle addedVehicleClone = new Vehicle(addedVehicle.getID(), addedVehicle.getType(),
            addedVehicle.getPosition());
        modelController.addVehicle(addedVehicleClone);
      }
    };
    try {
View Full Code Here


  private void sendMessage(final VolatileModelElement model) throws IOException {
    Runnable worker = new Runnable() {
      @Override
      public synchronized void run() {
        if (model instanceof Vehicle) {
          Vehicle sendingVehicle = (Vehicle) model;
          modelController.sendNetworkMessage(sendingVehicle.getID(), sendingVehicle.getSentMessageID(),
              sendingVehicle.getIPSegments(), sendingVehicle.getDestinationLatitude(),
              sendingVehicle.getDestinationLongitude(), sendingVehicle.getDestinationRadius());
        }
        else if (model instanceof RoadsideUnit) {
          RoadsideUnit sendingRoadsideUnit = (RoadsideUnit) model;
          modelController.sendNetworkMessage(sendingRoadsideUnit.getID(),
              sendingRoadsideUnit.getSentMessageID(), sendingRoadsideUnit.getIPSegments(),
View Full Code Here

  private void receiveMessage(final VolatileModelElement model) throws IOException {
    Runnable worker = new Runnable() {
      @Override
      public synchronized void run() {
        if (model instanceof Vehicle) {
          Vehicle receivingVehicle = (Vehicle) model;
          modelController.receiveNetworkMessage(receivingVehicle.getID(),
              receivingVehicle.getReceivedMessageID());
        }
        else if (model instanceof RoadsideUnit) {
          RoadsideUnit receivingRoadsideUnit = (RoadsideUnit) model;
          modelController.receiveNetworkMessage(receivingRoadsideUnit.getID(),
              receivingRoadsideUnit.getReceivedMessageID());
View Full Code Here

TOP

Related Classes of com.dcaiti.eworld.visualizer.simulation.models.Vehicle

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.