package vnsim.applications.ezcab; /** * Mazilu Sinziana * * Class for EZCab Response Message * _________________________________________________________________ * | | | | | | * | EZCab PROT | Type Message | ID Free Cab | ID Client | NO HOPS | * |____________|______________|_____________|___________|_________| * **/ public class EzcabResponse extends EzcabMessage{ private int idFreeCab; private int idClient; private int noHops; public EzcabResponse(byte protType, int messageType, int idFreeCab, int idClient, int noHops) { super(protType, messageType); this.idFreeCab = idFreeCab; this.idClient = idClient; this.noHops = noHops; } public int getIdFreeCab() { return idFreeCab; } public void setIdFreeCab(int idFreeCab) { this.idFreeCab = idFreeCab; } public int getIdClient() { return idClient; } public void setIdClient(int idClient) { this.idClient = idClient; } public int getNoHops() { return noHops; } public void setNoHops(int noHops) { this.noHops = noHops; } public String toString(){ return "Response:" + this.getProtType() + " - " + this.getMessageType() + " - " + this.getIdFreeCab() + " - " + this.getIdClient() + " - " + this.getNoHops(); } }