aim4.msg.i2v

## Class I2VMessage

- java.lang.Object
- - aim4.msg.i2v.I2VMessage

- Direct Known Subclasses:
    Confirm, Reject

      public abstract class I2VMessage
      extends Object

  A message sent from an Intersection Manager to a Vehicle.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `I2VMessage.Type` The different types of Intersection Manager to Vehicle messages.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected I2VMessage.Type` | `messageType` The type of this message.
    `protected int` | `size` The size, in bits, of this message.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `I2VMessage(I2VMessage msg)` Create a new copy of the message.
    `I2VMessage(int imId, int vin)` Class constructor to be called by subclasses to set the source and destination ID numbers.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getImId()` Get the ID number of the Intersection Manager sending this message.
    `I2VMessage.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 to which this message is being sent.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### messageType

          protected I2VMessage.Type messageType

      The type of this message.

    - #### size

          protected int size

      The size, in bits, of this message.

  - ### Constructor Detail

    - #### I2VMessage

          public I2VMessage(int imId,
                    int vin)

      Class constructor to be called by subclasses to set the source and destination ID numbers.
      Parameters:
        `imId` - the ID number of the IntersectionManager sending this message
        `vin` - the ID number of the Vehicle to which this message is being sent

    - #### I2VMessage

          public I2VMessage(I2VMessage msg)

      Create a new copy of the message.
      Parameters:
        `msg` - the message

  - ### Method Detail

    - #### getVin

          public int getVin()

      Get the ID number of the Vehicle to which this message is being sent.
      Returns:
        the ID number of the Vehicle to which this message is being sent

    - #### getImId

          public int getImId()

      Get the ID number of the Intersection Manager sending this message.
      Returns:
        the ID number of the IntersectionManager sending this message

    - #### getMessageType

          public I2VMessage.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 © 2013. All rights reserved.