View Javadoc

1   package net.staniscia.sbs1.msg;
2   
3   import net.staniscia.sbs1.InvalidStatusFlagsException;
4   
5   /**
6    * Created by staniscia on 23/01/14.
7    */
8   public interface STA extends SBS1Message {
9   
10      enum StatusFlagsType {
11          /**
12           * Position Lost
13           */
14          PL,
15  
16          /**
17           * Signal Lost
18           */
19          SL,
20  
21          /**
22           * Remove
23           */
24          RM,
25  
26          /**
27           * Delete
28           */
29          AD,
30  
31          /**
32           * used to reset time-outs if aircraft returns into cover
33           */
34          OK;
35  
36          public static StatusFlagsType from(String o) throws InvalidStatusFlagsException {
37              if ("PL".equalsIgnoreCase(o)) return PL;
38              if ("SL".equalsIgnoreCase(o)) return SL;
39              if ("RM".equalsIgnoreCase(o)) return RM;
40              if ("AD".equalsIgnoreCase(o)) return AD;
41              if ("OK".equalsIgnoreCase(o)) return OK;
42              throw new InvalidStatusFlagsException();
43          }
44      }
45  
46      String getSessionID();
47  
48      void setSessionID(String sessionID);
49  
50      String getAircraftId();
51  
52      void setAircraftId(String aircraftId);
53  
54      String getHexIdent();
55  
56      void setHexIdent(String hexIdent);
57  
58      String getFlightId();
59  
60      void setFlightId(String flightId);
61  
62      String getDateMessageGenerated();
63  
64      void setDateMessageGenerated(String dateMessageGenerated);
65  
66      String getTimeMessageGenerated();
67  
68      void setTimeMessageGenerated(String timeMessageGenerated);
69  
70      String getDataMessageLogged();
71  
72      void setDataMessageLogged(String dataMessageLogged);
73  
74      String getTimeMessageLogged();
75  
76      void setTimeMessageLogged(String timeMessageLogged);
77  
78      StatusFlagsType getStatusFlags();
79  
80      void setStatusFlags(StatusFlagsType sft);
81  }