]> rtime.felk.cvut.cz Git - orte.git/blob - orte/java/src/org/ocera/orte/types/RecvStatus.java
improved JAVA interface from Lukas, update makefiles from msvc from Jan
[orte.git] / orte / java / src / org / ocera / orte / types / RecvStatus.java
1 /* RecvStatus.java */
2
3 /**
4   * Class RecvStatus.
5   *
6   * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
7   * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
8   * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
9   * @author dedication to Kj
10   * @version 0.1
11   *
12   * This program is free software; you can redistribute it and/or modify
13   * it under the terms of the GNU General Public License as published by
14   * the Free Software Foundation; either version 2 of the License, or
15   * (at your option) any later version.
16   *
17   * This program is distributed in the hope that it will be useful,
18   * but WITHOUT ANY WARRANTY; without even the implied warranty of
19   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20   * GNU General Public License for more details.
21   *
22   */
23
24 package org.ocera.orte.types;
25
26
27 public class RecvStatus
28 {
29   // nemam to pridat k ostat konstantam????????
30   public static final int NEED_DATA = 0x01;
31   public static final int DEADLINE  = 0x02;
32
33   private int value;
34
35   /* constructor */
36   public RecvStatus(int a)
37   {
38     value = a;
39     System.out.println(":j: instance of RecvStatus created..");
40   }
41
42   /* toString */
43   public String toString()
44   {
45     return(value + " ");
46   }
47
48   /* get status */
49   public RecvStatus get()
50   {
51     return this;
52   }
53
54   /* set status */
55   public void set(int v)
56   {
57     value = v;
58     return;
59   }
60
61
62   public boolean needData()
63   {
64     if (this.value == NEED_DATA) return true;
65     return false;
66   }
67
68   public boolean deadline()
69   {
70     if (this.value == DEADLINE) return true;
71     return false;
72   }
73
74 }