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
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.
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.
25 package org.ocera.orte.types;
27 import java.net.Inet4Address;
32 * TODO To change the template for this generated type comment go to
33 * Window - Preferences - Java - Code Style - Code Templates
36 /* TODO - naucit se delat s poli JAVA/JNI */
44 IPAddress * unicastIPAddressList;
45 unsigned char unicastIPAddressCount;
47 IPAddress * metatrafficMulticastIPAddressList;
48 unsigned char metatrafficMulticastIPAddressCount;
50 Port metatrafficUnicastPort;
51 Port userdataUnicastPort;
54 ProtocolVersion protocolVersion;
60 /* TODO make an array of InetAddress[] instances */
61 // temporaly 1 address not list
62 private long unicastIPAddressTemp;
63 private byte unicastIPcount;
64 /* TODO make an array of InetAddress[] instances */
65 // temporaly 1 address not list
66 private long mettaTrafficMulticastIPAddressTemp;
67 private byte multicastIPcount;
68 private long metatrafficUniPort;
69 private long userdataUniPort;
70 private VendorId vendorId;
71 private ProtocolVersion protocolVersion;
73 private Inet4Address ip;
80 // ONLY FOR TESTING PURPOSES
81 public void setHostId(long hostId)
86 // ONLY FOR TESTING PURPOSES
87 public void setAppId(long appId)
92 // ONLY FOR TESTING PURPOSES
94 public long getHostId()
99 public long getAppId()
104 public long getIpAddressTemp()
106 return this.unicastIPAddressTemp;
109 public byte getUnicastIPcount()
111 return this.unicastIPcount;
114 public byte getMulticastIPcount()
116 return this.multicastIPcount;
119 public long getMettaTrafficMulticastIPAddressTemp()
121 return this.mettaTrafficMulticastIPAddressTemp;
126 public long getMetatrafficUniPort()
128 return this.metatrafficUniPort;
131 public long getUserdataUniPort()
133 return this.userdataUniPort;
136 public VendorId getVendorId()
138 return this.vendorId;
141 public ProtocolVersion getProtocolVersion()
143 return this.protocolVersion;
147 // only for testing purposes
148 public void printWithLegend()
150 System.out.format(":j: * AppInfo.hostId = %#x\n", getHostId());
151 System.out.format(":j: * AppInfo.appId = %#x\n", getAppId());
153 System.out.println(":j: * AppInfo.ipAddressTemp = " + getIpAddressTemp());
154 System.out.println(":j: * AppInfo.unicastIPcount = " + getUnicastIPcount());
156 System.out.println(":j: * AppInfo.mettaTrafficMulticastIPAddressTemp = " + getMettaTrafficMulticastIPAddressTemp());
157 System.out.println(":j: * AppInfo.multicastIPcount = " + getMulticastIPcount());
158 System.out.println(":j: * AppInfo.metatrafficUniPort = " + getMetatrafficUniPort());
159 System.out.println(":j: * AppInfo.userdataUniPort = " + getUserdataUniPort());
160 System.out.println(":j: * AppInfo.vendorId = " + getVendorId());
161 System.out.println(":j: * AppInfo.protocolVersion = " + getProtocolVersion());