Examples of SumoLink


Examples of de.tudresden.ws.container.SumoLink

            resp.content().readInt(); //length
           
            String from = resp.content().readStringASCII();
            String to = resp.content().readStringASCII();
            String over = resp.content().readStringASCII();
            sll.add(new SumoLink(from, to, over));
           
          }
         
        }
       
        output = sll;
     
      }else if(sc.input2 == Constants.TL_COMPLETE_DEFINITION_RYG){
       
        resp.content().readUnsignedByte();
        resp.content().readInt();
       
        int length = resp.content().readInt();
        for(int i=0; i<length; i++){
         
          resp.content().readUnsignedByte();
          String subID = resp.content().readStringASCII();
         
          resp.content().readUnsignedByte();
          int type = resp.content().readInt();
         
          resp.content().readUnsignedByte();
          int subParameter = resp.content().readInt();
         
          resp.content().readUnsignedByte();
          int currentPhaseIndex = resp.content().readInt();
         
          SumoTLSLogic stl = new SumoTLSLogic(subID, type, subParameter, currentPhaseIndex);
         
          resp.content().readUnsignedByte();
          int nbPhases = resp.content().readInt();
         
          for(int i1=0; i1<nbPhases; i1++){
           
            resp.content().readUnsignedByte();
            int duration = resp.content().readInt();
           
            resp.content().readUnsignedByte();
            int duration1 = resp.content().readInt();
           
            resp.content().readUnsignedByte();
            int duration2 = resp.content().readInt();
           
            resp.content().readUnsignedByte();
            String phaseDef = resp.content().readStringASCII();
           
            stl.add(new  SumoTLSPhase(duration, duration1, duration2, phaseDef));
           
          }

          output = stl;
         
        }

       
      }else if(sc.input2 == Constants.LANE_LINKS)
      {
     
        resp.content().readUnsignedByte();
        resp.content().readInt();
       
        //number of links
        int length = resp.content().readInt();
        SumoLinkList links = new SumoLinkList();
        for(int i=0; i<length; i++){
         
          resp.content().readUnsignedByte();
          String notInternalLane = resp.content().readStringASCII();
         
          resp.content().readUnsignedByte();
          String internalLane = resp.content().readStringASCII();
         
          resp.content().readUnsignedByte();
          byte hasPriority = (byte)resp.content().readUnsignedByte();
         
          resp.content().readUnsignedByte();
          byte isOpened = (byte)resp.content().readUnsignedByte();
         
          resp.content().readUnsignedByte();
          byte hasFoes = (byte)resp.content().readUnsignedByte();
         
          //not implemented
          resp.content().readUnsignedByte();
          String state = resp.content().readStringASCII();
         
          resp.content().readUnsignedByte();
          String direction = resp.content().readStringASCII();
         
          resp.content().readUnsignedByte();
          double laneLength = resp.content().readDouble();
         
         
          links.add(new SumoLink(notInternalLane,internalLane,hasPriority,isOpened,hasFoes,laneLength, state, direction));
        }
        output = links;
      }
      else{
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.