Skip to content

Remove Vehicles #319

Closed Answered by fabio-r-goncalves
fabio-r-goncalves asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, so I think I did solve it myself. So, if anyone is interested:

 private void removeVehicle(String vehicleID){

        byte TRACI_COMMAND = (byte) 0xc4;
        byte TRACI_VARIABLE = (byte) 0x81;
        byte TRACI_TYPE = (byte) 0x08;
        byte TRACI_REASON = (byte) 0x03;
        System.out.println("removign vehicle: " + vehicleID);
        ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream(10);
        DataOutputStream dataOutputStream = new DataOutputStream(arrayOutputStream);
      
  try {
      dataOutputStream.writeByte(TRACI_COMMAND);
      dataOutputStream.writeByte(TRACI_VARIABLE);
      dataOutputStream.writeInt(vehicleID.length());
      dataOutputStream…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fabio-r-goncalves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant