aim4.msg.v2i
Class Request

java.lang.Object
  extended by aim4.msg.v2i.V2IMessage
      extended by aim4.msg.v2i.Request

public class Request
extends V2IMessage

Message sent from a Vehicle to an Intersection Manager to request a reservation.


Nested Class Summary
static class Request.Proposal
          A proposal
static class Request.VehicleSpecForRequestMsg
          The specification of the vehicle.
 
Nested classes/interfaces inherited from class aim4.msg.v2i.V2IMessage
V2IMessage.Type
 
Field Summary
 
Fields inherited from class aim4.msg.v2i.V2IMessage
messageType, size
 
Constructor Summary
Request(int sourceID, int destinationID, int requestId, Request.VehicleSpecForRequestMsg spec, List<Request.Proposal> proposals)
          Basic class constructor with all required fields.
Request(Request r)
          The copy constructor of this request message
 
Method Summary
 List<Request.Proposal> getProposals()
          Get the List of Proposals in this request.
 int getRequestId()
          Get the request ID.
 Request.VehicleSpecForRequestMsg getSpec()
          Get the specification of the vehicle
 String toString()
          
 
Methods inherited from class aim4.msg.v2i.V2IMessage
getImId, getMessageType, getSize, getVin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Request

public Request(int sourceID,
               int destinationID,
               int requestId,
               Request.VehicleSpecForRequestMsg spec,
               List<Request.Proposal> proposals)
Basic class constructor with all required fields.

Parameters:
sourceID - the ID number of the Vehicle sending this message
destinationID - the ID number of the IntersectionManager to which this message is being sent
requestId - the request id
spec - the specification of the vehicle
proposals - the proposals

Request

public Request(Request r)
The copy constructor of this request message

Parameters:
r - the request
Method Detail

getRequestId

public int getRequestId()
Get the request ID.


getSpec

public Request.VehicleSpecForRequestMsg getSpec()
Get the specification of the vehicle

Returns:
the specification of the vehicle.

getProposals

public List<Request.Proposal> getProposals()
Get the List of Proposals in this request.

Returns:
the List of Proposals in this Request

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.