View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.tag.protocol.messages;
2   
3   import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
4   import cz.cuni.amis.pogamut.ut2004.communication.messages.custom.ControlMessageField;
5   import cz.cuni.amis.pogamut.ut2004.communication.messages.custom.ControlMessageType;
6   
7   @ControlMessageType(type="TAG_PASSED")
8   public class TagPassed extends TagMessage {
9   	
10  	@ControlMessageField(index=1)
11  	private UnrealId fromBotId;
12  	
13  	@ControlMessageField(index=2)
14  	private UnrealId toBotId;
15  	
16  	public TagPassed() {		
17  	}
18  
19  	/**
20  	 * WHO has passed the tagged (this bot has a tag, but touched another bot)
21  	 * <p><p>
22  	 * 
23  	 * May be null, in that case it is the SERVER who is assigning the tag.
24  	 * 
25  	 * @return
26  	 */
27  	public UnrealId getFromBotId() {
28  		return fromBotId;
29  	}
30  
31  	public void setFromBotId(UnrealId fromBotId) {
32  		this.fromBotId = fromBotId;
33  	}
34  
35  	/**
36  	 * WHO has been (received) the tag (this bot now switchis to IS-TAGGED state)
37  	 * <p><p>
38  	 * 
39  	 * May be null, in that case no new bot gets tagged (SERVER removed tag from {@link #getFromBotId()} bot).
40  	 * 
41  	 * @return
42  	 */
43  	public UnrealId getToBotId() {
44  		return toBotId;
45  	}
46  
47  	public void setToBotId(UnrealId toBotId) {
48  		this.toBotId = toBotId;
49  	}
50  	
51  }