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
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.
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.
25 package org.ocera.orte.types;
28 public class SubsProp {
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;
42 * Default constructor.
45 //System.out.println(":j: instance SubsProp created..");
49 * User constructor. WARNING: This constructor is used for creating
50 * a new Subscriber - NOT ALL instance fields are initialize here.
52 public SubsProp(String topic,
54 NtpTime minSeparation,
61 this.typeName = typeName;
62 this.minSeparation = minSeparation;
63 this.deadline = deadline;
66 this.multicastIPAddr = multicastIPAddr;
68 //System.out.println(":j: instance SubsProp created..");
73 * User-full constructor. ALL instance fields are initialize here.
75 public SubsProp(String topic,
78 NtpTime minSeparation,
80 long reliabilityRequested,
87 this.typeName = typeName;
88 this.typeChecksum = typeChecksum;
89 this.minSeparation = minSeparation;
90 this.recvQueueSize = recvQueueSize;
91 this.reliabilityRequested = reliabilityRequested;
92 this.deadline = deadline;
95 this.multicastIPAddr = multicastIPAddr;
97 //System.out.println(":j: instance SubsProp created..");
103 * Print actual fields state. Usable for example for check field.
105 public String toString()
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);
116 public String getTopic()
121 public void setTopic(String newTopic)
123 this.topic = newTopic;
129 public String getTypeName()
131 return this.typeName;
134 public void setTypeName(String newTypeName)
136 this.typeName = newTypeName;
142 public int getTypeChecksum()
144 return this.typeChecksum;
147 public void setTypeChecksum(int newTypeChecksum)
149 this.typeChecksum = newTypeChecksum;
154 * Return a property minSeparation.
155 * @return minSeparation
157 public NtpTime getMinSeparation()
159 return this.minSeparation;
163 public void setMinSeparation(NtpTime newMinSeparation)
165 this.minSeparation = newMinSeparation;
171 public long getRecvQueueSize()
173 return this.recvQueueSize;
177 public void setRecvQueueSize(long newRecvQueueSize)
179 this.recvQueueSize = newRecvQueueSize;
184 // *** reliabilityRequested
185 public long getReliabilityRequested()
187 return this.reliabilityRequested;
191 public void setReliabilityRequested(long newReliabilityRequested)
193 this.reliabilityRequested = newReliabilityRequested;
199 public NtpTime getDeadline()
201 return this.deadline;
205 public void setDeadline(NtpTime newDeadline)
207 this.deadline = newDeadline;
219 public void setMode(int newMode)
233 public void setType(int newType)
241 public long getMulticastIPAddr()
243 return this.multicastIPAddr;
247 public void setMulticastIPAddr(long newMulticastIPAddr)
249 this.multicastIPAddr = newMulticastIPAddr;