]> rtime.felk.cvut.cz Git - orte.git/blob - orte/java/src/org/ocera/orte/types/SubsProp.java
improved JAVA interface from Lukas, update makefiles from msvc from Jan
[orte.git] / orte / java / src / org / ocera / orte / types / SubsProp.java
1 /* SubProp.java */
2
3 /**
4  * Class SubProp.
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  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  */
24
25 package org.ocera.orte.types;
26
27
28 public class SubsProp {
29     private String     topic;     
30     private String     typeName;  
31     private int        typeChecksum;       
32     private NtpTime    minSeparation; 
33     private long       recvQueueSize;
34     private long       reliabilityRequested;    
35         // additional parameters
36     private NtpTime    deadline; 
37     private int        mode; // 0x01 = PULLED, 0x02 = IMMEDIATE    
38     private int        type; // 0x01 = BEST_EFFORT, 0x02 = SRICT_RELIABLE
39     private long       multicastIPAddr; 
40         
41         /** 
42          * Default constructor.
43          */
44         public SubsProp() {
45                 //System.out.println(":j: instance SubsProp created..");           
46         }
47
48         /**
49          *  User constructor. WARNING: This constructor is used for creating 
50          *  a new Subscriber - NOT ALL instance fields are initialize here.  
51          */
52         public SubsProp(String  topic,     
53                     String  typeName,  
54                     NtpTime minSeparation, 
55                     NtpTime deadline, 
56                     int     mode,    
57                     int     type,
58                     long    multicastIPAddr) 
59     {
60                 this.topic = topic;     
61         this.typeName = typeName;  
62         this.minSeparation = minSeparation; 
63         this.deadline = deadline; 
64         this.mode = mode;    
65         this.type = type;
66         this.multicastIPAddr = multicastIPAddr; 
67         
68                 //System.out.println(":j: instance SubsProp created..");           
69         }
70
71
72         /**
73          *  User-full constructor. ALL instance fields are initialize here.
74          */
75         public SubsProp(String  topic,     
76                     String  typeName,  
77                     int     typeChecksum,       
78                     NtpTime minSeparation, 
79                     long    recvQueueSize,
80                     long    reliabilityRequested,    
81                         NtpTime deadline, 
82                     int     mode,    
83                     int     type,
84                     long    multicastIPAddr) 
85     {
86                 this.topic = topic;     
87         this.typeName = typeName;  
88         this.typeChecksum = typeChecksum;
89         this.minSeparation = minSeparation; 
90         this.recvQueueSize = recvQueueSize;
91         this.reliabilityRequested = reliabilityRequested;     
92         this.deadline = deadline; 
93         this.mode = mode;    
94         this.type = type;
95         this.multicastIPAddr = multicastIPAddr; 
96         
97                 //System.out.println(":j: instance SubsProp created..");           
98         }
99
100         
101
102         /**
103          * Print actual fields state. Usable for example for check field.
104          */
105         public String toString()
106         {
107           return("SubsProp - actual state: topic = " + topic + " | typeName = " + 
108                           typeName + " | typeChecksum = " + typeChecksum + " | minSeparation: " + minSeparation
109                           + " | recvQueueSize = " + recvQueueSize + 
110                           " | reliabilityRequested = " + reliabilityRequested + " | deadline: " + 
111                       deadline + " | mode = " + mode + " | multicastIPAddr = " + multicastIPAddr);                      
112         }
113   
114         
115 //      *** topic       
116         public String getTopic() 
117         {
118            return this.topic;   
119     }
120         
121         public void setTopic(String newTopic) 
122         {
123            this.topic = newTopic;
124            return;      
125     }
126
127
128 //      *** typeName    
129         public String getTypeName() 
130         {
131            return this.typeName;        
132     }
133         
134         public void setTypeName(String newTypeName) 
135         {
136            this.typeName = newTypeName;
137            return;      
138     }
139
140         
141 //      *** typeChecksum        
142         public int getTypeChecksum() 
143         {
144            return this.typeChecksum;    
145     }
146         
147         public void setTypeChecksum(int newTypeChecksum) 
148         {
149            this.typeChecksum = newTypeChecksum;
150            return;      
151     }
152
153         /**
154          * Return a property minSeparation.
155          * @return minSeparation
156          **/ 
157         public NtpTime getMinSeparation() 
158         {
159            return this.minSeparation;   
160     }
161
162                 
163         public void setMinSeparation(NtpTime newMinSeparation) 
164         {
165            this.minSeparation = newMinSeparation;
166            return;      
167     }
168         
169                         
170 //      *** recvQueueSize
171         public long getRecvQueueSize() 
172         {
173            return this.recvQueueSize;   
174     }
175
176                 
177         public void setRecvQueueSize(long newRecvQueueSize) 
178         {
179            this.recvQueueSize = newRecvQueueSize;
180            return;      
181     }
182
183         
184 //      *** reliabilityRequested
185         public long getReliabilityRequested() 
186         {
187            return this.reliabilityRequested;    
188     }
189
190                 
191         public void setReliabilityRequested(long newReliabilityRequested) 
192         {
193            this.reliabilityRequested = newReliabilityRequested;
194            return;      
195     }
196
197         
198 //      *** deadline
199         public NtpTime getDeadline() 
200         {
201            return this.deadline;        
202     }
203
204                 
205         public void setDeadline(NtpTime newDeadline) 
206         {
207            this.deadline = newDeadline;
208            return;      
209     }
210
211         
212 //      *** mode
213         public int getMode() 
214         {
215            return this.mode;    
216     }
217         
218         
219         public void setMode(int newMode) 
220         {
221            this.mode = newMode;
222            return;      
223     }
224         
225         
226 // *** type
227         public int getType() 
228         {
229            return this.type;    
230     }
231
232         
233         public void setType(int newType) 
234         {
235            this.type = newType;
236            return;      
237     }
238
239
240 //      *** multicast
241         public long getMulticastIPAddr() 
242         {
243            return this.multicastIPAddr; 
244     }
245
246                 
247         public void setMulticastIPAddr(long newMulticastIPAddr) 
248         {
249            this.multicastIPAddr = newMulticastIPAddr;
250            return;      
251     }
252
253 }