Package it.polito.temp

Examples of it.polito.temp.TempType


       
        );
   
    @SuppressWarnings("unchecked")
    JAXBElement<TempType> tmpRootJAXB = (JAXBElement<TempType>) u.unmarshal(file);
      TempType root=tmpRootJAXB.getValue();
     
      for(SendIntervalType elem: root.getSendInterval()){
        this.getSendInterval().put(elem.getVehicleId(), elem.getInterval());
      }
      StatisticType stat=root.getStatistic();
      Integer[] statResult = this.getTempStat();
      statResult[0]=stat.getNumberOfVehicle();
      statResult[1]=stat.getNumberOfTime();
      statResult[2]=stat.getNumberReceivedPackets();
      statResult[3]=stat.getNumberLoggedPackets();
View Full Code Here


public class WriteTemp {
  private ObjectFactory of;
 
  public WriteTemp(String XmlTempPath, Map<String,TreeMap<Float,Vehicle>> allvehicle,Integer[] statTemp,Object last) throws Exception   {
    TempType temp=this.getOf().createTempType();
    // riempio intervallini
    for (Entry<String, TreeMap<Float, Vehicle>> vehicleL:allvehicle.entrySet()){
     
      for(Entry<Float, Vehicle>e : vehicleL.getValue().entrySet() ){
        SendIntervalType sendinterval = this.getOf().createSendIntervalType();
        sendinterval.setInterval(e.getValue().getInterval());
        sendinterval.setVehicleId(vehicleL.getKey());
        temp.getSendInterval().add(sendinterval);
        break;
      }
     
    }
   
    // riempio totali statistiche
    StatisticType stattemp = this.getOf().createStatisticType();
    stattemp.setNumberOfVehicle(statTemp[0]);
    stattemp.setNumberOfTime(statTemp[1]);
    stattemp.setNumberReceivedPackets(statTemp[2]);
    stattemp.setNumberLoggedPackets(statTemp[3]);
    stattemp.setNumberDiscardedPackets(statTemp[4]);
    stattemp.setNumberConsecutiveDiscarded(statTemp[5]);
    stattemp.setNumberVehicleThatReceive(statTemp[6]);
   
   
    temp.setStatistic(stattemp);
 
    // manca ultima parte per concecutivo
   
   
    //scrivo
View Full Code Here

TOP

Related Classes of it.polito.temp.TempType

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.