Rev | Line | |
---|
[31] | 1 | package vnsim.applications.ezcab; |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * Mazilu Sinziana |
---|
| 5 | * |
---|
| 6 | * Class for EZCab Request Message |
---|
| 7 | * ____________________________________________________________________ |
---|
| 8 | * | | | | | | |
---|
| 9 | * | EZCab PROT | Type Message | ID Client | NO HOPS | TIME OF SENDING | |
---|
| 10 | * |____________|______________|___________|_________|_________________| |
---|
| 11 | * |
---|
| 12 | **/ |
---|
| 13 | |
---|
| 14 | public class EzcabRequest extends EzcabMessage { |
---|
| 15 | |
---|
| 16 | private int idClient; |
---|
| 17 | private int noHops; |
---|
| 18 | private int timeOfSending; |
---|
| 19 | |
---|
| 20 | public EzcabRequest(byte protType, int messageType, int idClient, int noHops, int ts) { |
---|
| 21 | super(protType, messageType); |
---|
| 22 | this.idClient = idClient; |
---|
| 23 | this.noHops = noHops; |
---|
| 24 | this.timeOfSending = ts; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | public int getIdClient() { |
---|
| 28 | return idClient; |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | public void setIdClient(int idClient) { |
---|
| 32 | this.idClient = idClient; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | public int getNoHops() { |
---|
| 36 | return noHops; |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | public void setNoHops(int noHops) { |
---|
| 40 | this.noHops = noHops; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | public int getTimeOfSending() { |
---|
| 44 | return timeOfSending; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | public void setTimeOfSending(int timeOfSending) { |
---|
| 48 | this.timeOfSending = timeOfSending; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | public String toString(){ |
---|
| 52 | return "Request: " + this.getProtType() + " - " + this.getMessageType() + " - " + this.getIdClient() + " - " + this.getNoHops(); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.