View Javadoc

1   package cz.cuni.amis.pogamut.usar2004.agent.module.nfo;
2   
3   import cz.cuni.amis.pogamut.usar2004.agent.USAR2004Bot;
4   import cz.cuni.amis.pogamut.usar2004.communication.messages.datatypes.StartPose;
5   import java.util.List;
6   
7   /**
8    * Nfo message representative for Start Poses.
9    *
10   * @author vejmanm
11   */
12  public class NfoStartPoses extends SuperNfo
13  {
14      /**
15       * Ctor. Nfo type describes particular subject about which we want to know
16       * about. It is used to distinguish incoming message from the server.
17       *
18       * @param bot USAR2004Bot variable for filling base class.
19       */
20      public NfoStartPoses(USAR2004Bot bot)
21      {
22          super(bot, "StartPoses");
23      }
24  
25      /**
26       * StartPoseCount is the number of starting positions available. For every
27       * starting position you'll be able to receive it's tag, location and
28       * orientation:
29       *
30       * @return Returns number of availible start positions.
31       */
32      public int getStartPosesSize()
33      {
34          return lastMessage.getStartPoseCount();
35      }
36  
37      /**
38       * GETSTARTPOSES will cause receipt of the NFO message with potencial
39       * Locations for spawning a robot.
40       *
41       * @return Returns list of possible starting positions.
42       */
43      public List<StartPose> getStartPoses()
44      {
45          return lastMessage.getStartPoses();
46      }
47  }