Rev | Line | |
---|
[31] | 1 | /************************************************************************************ |
---|
| 2 | * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University |
---|
| 3 | * All rights reserved. |
---|
| 4 | * Refer to LICENSE for terms and conditions of use. |
---|
| 5 | ***********************************************************************************/ |
---|
| 6 | package vnsim.core.events; |
---|
| 7 | |
---|
| 8 | import vnsim.core.*; |
---|
| 9 | |
---|
| 10 | public class UnicastSendEvent extends SendEvent{ |
---|
| 11 | |
---|
| 12 | int receiverId; |
---|
| 13 | |
---|
| 14 | public UnicastSendEvent(int t, Communicator sender, int messageType, int receiverId){ |
---|
| 15 | super(t, sender, messageType); |
---|
| 16 | this.receiverId = receiverId; |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | public int getReceiverId() { |
---|
| 20 | return receiverId; |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | public void setReceiverId(int receiverId) { |
---|
| 24 | this.receiverId = receiverId; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | public String toString() { |
---|
| 28 | return "["+time+": Unicast "+sender+" for car"+receiverId+"]"; |
---|
| 29 | } |
---|
| 30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.