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