aim4.msg.v2i
Class V2IMessage

java.lang.Object
  extended by aim4.msg.v2i.V2IMessage
Direct Known Subclasses:
Away, Cancel, Done, Request

public abstract class V2IMessage
extends Object

A message sent from a Vehicle to an Intersection Manager.


Nested Class Summary
static class V2IMessage.Type
          The different types of Vehicle to Intersection Manager messages.
 
Field Summary
protected  V2IMessage.Type messageType
          The type of this message.
protected  int size
          The size, in bits, of this message.
 
Constructor Summary
V2IMessage(int vin, int imID)
          Class constructor to be called by subclasses to set the source and destination ID numbers.
V2IMessage(V2IMessage msg)
           
 
Method Summary
 int getImId()
          Get the ID number of the Intersection Manager to which this message is being sent.
 V2IMessage.Type getMessageType()
          Get the type of this message.
 int getSize()
          Get the size of this message in bits.
 int getVin()
          Get the ID number of the Vehicle sending this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageType

protected V2IMessage.Type messageType
The type of this message.


size

protected int size
The size, in bits, of this message.

Constructor Detail

V2IMessage

public V2IMessage(int vin,
                  int imID)
Class constructor to be called by subclasses to set the source and destination ID numbers.

Parameters:
vin - the ID number of the Vehicle sending this message
imID - the ID number of the IntersectionManager to which this message is being sent

V2IMessage

public V2IMessage(V2IMessage msg)
Method Detail

getImId

public int getImId()
Get the ID number of the Intersection Manager to which this message is being sent.

Returns:
the ID number of the IntersectionManager to which this message is being sent

getVin

public int getVin()
Get the ID number of the Vehicle sending this message.

Returns:
the ID number of the Vehicle sending this message

getMessageType

public V2IMessage.Type getMessageType()
Get the type of this message.

Returns:
the type of this message

getSize

public int getSize()
Get the size of this message in bits.

Returns:
the size of this message in bits


Copyright © 2011. All Rights Reserved.