1 /* Subscription.java */
2 package org.ocera.orte;
3 import org.ocera.orte.types.NtpTime;
6 * Class JORTEPublisher provides methods for creating and working
7 * with the ORTE publisher.
9 * @author Lukas Pokorny (lukas_pokorny@centrum.cz)
10 * @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
11 * @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
12 * @author dedication to Kj
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
28 public class Subscription {
31 private int callbackContextHandle = 0;
35 * getHandle - returns handler of the subscription
36 *tCommon: root updated, wakeup
37 1103482260.672 | WakeUpSendin
38 * @return handler of the subscription
40 public int getHandle()
48 * PROC protected??? - aby sel volat jen z tridy Domain
50 protected Subscription(Domain d,
57 NtpTime minSeparation,
58 SubscriptionCallback cb,
60 long multicastIPAddress)
62 this.handle = jORTESubscriptionCreate(d.handle,
80 protected void finalize()
87 * destroy - removes a publication
88 * @return boolean: False if bad publication handle, True if succesful
93 System.out.println(":j!: ORTEPublicationDestroy() called..");
94 if(jORTESubscriptionDestroy(this.handle)) return true;
95 System.out.println(":j!: ORTEPublicationDestroy() fault..");
100 /* ****************************************************************** *
104 * ****************************************************************** */
107 int jORTESubscriptionCreate(int dhandle,
108 int subsmode, /*! union */
109 int substype, /*! union */
114 NtpTime minSeparation,
115 SubscriptionCallback cb,
116 /* recvCallBackParam */
117 long multicastIPAddress);
120 boolean jORTESubscriptionDestroy(int dhandle);
123 /* native 'get' methods */
124 public static native String getTopic();
125 public static native String getTypeName();
126 public static native NtpTime getDeadline();
127 public static native NtpTime getMinSeparation();