]> rtime.felk.cvut.cz Git - orte.git/blob - orte/java/src/org/ocera/orte/types/RecvInfo.java
b7117305ed0a3b387d6e3d98af9187695eecfee0
[orte.git] / orte / java / src / org / ocera / orte / types / RecvInfo.java
1 /* RecvInfo.java */
2
3 /**
4  * Class RecvInfo.
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 RecvInfo
28 {
29   private byte            status;
30   private String          topic;
31   private String          typeName;
32   private GUID_RTPS       senderGUID;
33   private NtpTime         localTimeRecv;
34   private NtpTime         remoteTimePub;
35   private SequenceNumber  sn;
36
37   public RecvInfo()
38   {
39         //System.out.println(":j: instance of RecvInfo created..");
40   }
41
42
43   public byte getRecvStatus()
44   {
45     return this.status;
46   }
47
48   public String getTopic()
49   {
50     return this.topic;
51   }
52
53   public String getTypeName()
54   {
55     return this.typeName;
56   }
57
58   public GUID_RTPS getSenderGuid()
59   {
60     return this.senderGUID.get();
61   }
62
63   public NtpTime getLocalTimeRecv()
64   {
65     return this.localTimeRecv.get();
66   }
67
68   public NtpTime getRemoteTimePub()
69   {
70     return this.remoteTimePub.get();
71   }
72
73   public SequenceNumber getSeqNumber()
74   {
75     return this.sn.get();
76   }
77
78   /** only for test purposes */
79   public void print()
80   {
81           System.out.println(":j: RecvInfo:");
82           System.out.println(":j:    recvStatus: " + this.getRecvStatus());
83           System.out.println(":j:         topic: " + this.getTopic()); 
84           System.out.println(":j:          type: " + this.getTypeName()); 
85       System.out.println(":j:    senderGuid: " + this.getSenderGuid()); 
86       System.out.println(":j: localTimerecv: " + this.getLocalTimeRecv()); 
87       System.out.println(":j: remoteTimePub: " + this.getRemoteTimePub()); 
88       sn = this.getSeqNumber();
89       System.out.println(":j:         seqNr: " + sn.getDecimal());      
90   }
91   
92 }