]> rtime.felk.cvut.cz Git - orte.git/commitdiff
JORTE: add 64-bit support
authorMartin Vajnar <martin.vajnar@gmail.com>
Sun, 7 Jul 2013 15:12:27 +0000 (17:12 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Mon, 23 Sep 2013 09:06:25 +0000 (11:06 +0200)
Store pointers to C objects in jlong (always 64-bit)
rather than in jint (always 32-bit).

39 files changed:
orte/include/jorte/org_ocera_orte_Domain.h
orte/include/jorte/org_ocera_orte_DomainApp.h
orte/include/jorte/org_ocera_orte_DomainMgr.h
orte/include/jorte/org_ocera_orte_JOrte.h
orte/include/jorte/org_ocera_orte_Publication.h
orte/include/jorte/org_ocera_orte_Subscription.h
orte/include/jorte/org_ocera_orte_types_DomainEvents.h
orte/include/jorte/org_ocera_orte_types_DomainProp.h
orte/java/src/org/ocera/orte/Domain.java
orte/java/src/org/ocera/orte/DomainApp.java
orte/java/src/org/ocera/orte/DomainMgr.java
orte/java/src/org/ocera/orte/JOrte.java
orte/java/src/org/ocera/orte/Publication.java
orte/java/src/org/ocera/orte/Subscription.java
orte/java/src/org/ocera/orte/types/DomainEvents.java
orte/java/src/org/ocera/orte/types/DomainProp.java
orte/libjorte/JORTEDomainAppCreate.c
orte/libjorte/JORTEDomainAppDestroy.c
orte/libjorte/JORTEDomainInitEvents.c
orte/libjorte/JORTEDomainMgrCreate.c
orte/libjorte/JORTEDomainMgrDestroy.c
orte/libjorte/JORTEDomainPropDefaultGet.c
orte/libjorte/JORTEDomainStart.c
orte/libjorte/JORTEPublicationCreate.c
orte/libjorte/JORTEPublicationDestroy.c
orte/libjorte/JORTEPublicationGetStatus.c
orte/libjorte/JORTEPublicationPropertiesGet.c
orte/libjorte/JORTEPublicationPropertiesSet.c
orte/libjorte/JORTEPublicationSend.c
orte/libjorte/JORTEPublicationWaitForSubscriptions.c
orte/libjorte/JORTESubscriptionCreate.c
orte/libjorte/JORTESubscriptionDestroy.c
orte/libjorte/JORTESubscriptionGetStatus.c
orte/libjorte/JORTESubscriptionPropertiesGet.c
orte/libjorte/JORTESubscriptionPropertiesSet.c
orte/libjorte/JORTESubscriptionWaitForPublications.c
orte/libjorte/JORTETypeRegisterAdd.c
orte/libjorte/JORTETypeRegisterDestroyAll.c
orte/libjorte/getNtpTime.c

index 9fd8c353f8da8e3421e327889f9f2c394d2bc668..1ea97d496901577b6cb6c4ffe34f592ee8cf0b7a 100644 (file)
@@ -10,10 +10,10 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_Domain
  * Method:    jORTEDomainStart
- * Signature: (IZZZ)V
+ * Signature: (JZZZ)V
  */
 JNIEXPORT void JNICALL Java_org_ocera_orte_Domain_jORTEDomainStart
-  (JNIEnv *, jclass, jint, jboolean, jboolean, jboolean);
+  (JNIEnv *, jclass, jlong, jboolean, jboolean, jboolean);
 
 #ifdef __cplusplus
 }
index 2584590ac6f001a998d420a434dc9a8a16535e7d..8e8c12485dffeb35e27d09aa76a8de6db603238f 100644 (file)
@@ -10,42 +10,42 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_DomainApp
  * Method:    jORTEDomainDefaultAppCreate
- * Signature: (IZ)I
+ * Signature: (IZ)J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_DomainApp_jORTEDomainDefaultAppCreate
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_DomainApp_jORTEDomainDefaultAppCreate
   (JNIEnv *, jclass, jint, jboolean);
 
 /*
  * Class:     org_ocera_orte_DomainApp
  * Method:    jORTEDomainAppCreate
- * Signature: (IIILorg/ocera/orte/types/DomainEvents;Z)I
+ * Signature: (IJJLorg/ocera/orte/types/DomainEvents;Z)J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_DomainApp_jORTEDomainAppCreate
-  (JNIEnv *, jclass, jint, jint, jint, jobject, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_DomainApp_jORTEDomainAppCreate
+  (JNIEnv *, jclass, jint, jlong, jlong, jobject, jboolean);
 
 /*
  * Class:     org_ocera_orte_DomainApp
  * Method:    jORTEDomainAppDestroy
- * Signature: (I)Z
+ * Signature: (J)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_DomainApp_jORTEDomainAppDestroy
-  (JNIEnv *, jclass, jint);
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ocera_orte_DomainApp
  * Method:    jORTETypeRegisterAdd
- * Signature: (ILjava/lang/String;J)I
+ * Signature: (JLjava/lang/String;J)I
  */
 JNIEXPORT jint JNICALL Java_org_ocera_orte_DomainApp_jORTETypeRegisterAdd
-  (JNIEnv *, jclass, jint, jstring, jlong);
+  (JNIEnv *, jclass, jlong, jstring, jlong);
 
 /*
  * Class:     org_ocera_orte_DomainApp
  * Method:    jORTETypeRegisterDestroyAll
- * Signature: (I)Z
+ * Signature: (J)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_DomainApp_jORTETypeRegisterDestroyAll
-  (JNIEnv *, jclass, jint);
+  (JNIEnv *, jclass, jlong);
 
 #ifdef __cplusplus
 }
index 0aeb091cf20f8163bc86bf5e539e0b11735bc1c1..38ec5be7ccbeebef5609b74733efcdf82010461e 100644 (file)
@@ -10,26 +10,26 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_DomainMgr
  * Method:    jORTEDomainDefaultMgrCreate
- * Signature: (IZ)I
+ * Signature: (IZ)J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_DomainMgr_jORTEDomainDefaultMgrCreate
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_DomainMgr_jORTEDomainDefaultMgrCreate
   (JNIEnv *, jclass, jint, jboolean);
 
 /*
  * Class:     org_ocera_orte_DomainMgr
  * Method:    jORTEDomainMgrCreate
- * Signature: (IIIZ)I
+ * Signature: (IJJZ)J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_DomainMgr_jORTEDomainMgrCreate
-  (JNIEnv *, jclass, jint, jint, jint, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_DomainMgr_jORTEDomainMgrCreate
+  (JNIEnv *, jclass, jint, jlong, jlong, jboolean);
 
 /*
  * Class:     org_ocera_orte_DomainMgr
  * Method:    jORTEDomainMgrDestroy
- * Signature: (I)Z
+ * Signature: (J)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_DomainMgr_jORTEDomainMgrDestroy
-  (JNIEnv *, jclass, jint);
+  (JNIEnv *, jclass, jlong);
 
 #ifdef __cplusplus
 }
index 1bdc52e797c8d16cb45117397b8be31a6852c1f1..3c8cf5dfbf6979b7cb06194ec906a44da6e34cc3 100644 (file)
@@ -42,10 +42,10 @@ JNIEXPORT void JNICALL Java_org_ocera_orte_JOrte_jORTEVerbositySetLogFile
 /*
  * Class:     org_ocera_orte_JOrte
  * Method:    jORTEAppSendThread
- * Signature: (I)V
+ * Signature: (J)V
  */
 JNIEXPORT void JNICALL Java_org_ocera_orte_JOrte_jORTEAppSendThread
-  (JNIEnv *, jclass, jint);
+  (JNIEnv *, jclass, jlong);
 
 #ifdef __cplusplus
 }
index 6c48bc22cf9d2dde73cbc1d0cf410d723fa6347b..bbb8f0bd3593adda6e61084afc675b50ddcf9047 100644 (file)
@@ -10,58 +10,58 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationCreate
- * Signature: (ILjava/lang/String;Ljava/lang/String;ILjava/nio/ByteBuffer;Lorg/ocera/orte/types/NtpTime;I)I
+ * Signature: (JLjava/lang/String;Ljava/lang/String;ILjava/nio/ByteBuffer;Lorg/ocera/orte/types/NtpTime;I)J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_Publication_jORTEPublicationCreate
-  (JNIEnv *, jobject, jint, jstring, jstring, jint, jobject, jobject, jint);
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_Publication_jORTEPublicationCreate
+  (JNIEnv *, jobject, jlong, jstring, jstring, jint, jobject, jobject, jint);
 
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationDestroy
- * Signature: (I)Z
+ * Signature: (J)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_Publication_jORTEPublicationDestroy
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationSend
- * Signature: (ILorg/ocera/orte/types/MessageData;)Z
+ * Signature: (JLorg/ocera/orte/types/MessageData;)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_Publication_jORTEPublicationSend
-  (JNIEnv *, jobject, jint, jobject);
+  (JNIEnv *, jobject, jlong, jobject);
 
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationPropertiesGet
- * Signature: (I)Lorg/ocera/orte/types/PublProp;
+ * Signature: (J)Lorg/ocera/orte/types/PublProp;
  */
 JNIEXPORT jobject JNICALL Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationPropertiesSet
- * Signature: (ILorg/ocera/orte/types/PublProp;)Z
+ * Signature: (JLorg/ocera/orte/types/PublProp;)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_Publication_jORTEPublicationPropertiesSet
-  (JNIEnv *, jobject, jint, jobject);
+  (JNIEnv *, jobject, jlong, jobject);
 
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationGetStatus
- * Signature: (I)Lorg/ocera/orte/types/Status;
+ * Signature: (J)Lorg/ocera/orte/types/Status;
  */
 JNIEXPORT jobject JNICALL Java_org_ocera_orte_Publication_jORTEPublicationGetStatus
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Publication
  * Method:    jORTEPublicationWaitForSubscriptions
- * Signature: (ILorg/ocera/orte/types/NtpTime;JJ)I
+ * Signature: (JLorg/ocera/orte/types/NtpTime;JJ)I
  */
 JNIEXPORT jint JNICALL Java_org_ocera_orte_Publication_jORTEPublicationWaitForSubscriptions
-  (JNIEnv *, jobject, jint, jobject, jlong, jlong);
+  (JNIEnv *, jobject, jlong, jobject, jlong, jlong);
 
 #ifdef __cplusplus
 }
index 73e14e0e91630930b7ac7b76b6dbe62fe54c8b3f..0f29e9ec18d547b40bf13199760015dcf116705e 100644 (file)
@@ -10,58 +10,58 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionCreate
- * Signature: (IIILjava/lang/String;Ljava/lang/String;ILorg/ocera/orte/types/MessageData;Lorg/ocera/orte/types/NtpTime;Lorg/ocera/orte/types/NtpTime;Lorg/ocera/orte/SubscriptionCallback;J)I
+ * Signature: (JIILjava/lang/String;Ljava/lang/String;ILorg/ocera/orte/types/MessageData;Lorg/ocera/orte/types/NtpTime;Lorg/ocera/orte/types/NtpTime;Lorg/ocera/orte/SubscriptionCallback;J)J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionCreate
-  (JNIEnv *, jobject, jint, jint, jint, jstring, jstring, jint, jobject, jobject, jobject, jobject, jlong);
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionCreate
+  (JNIEnv *, jobject, jlong, jint, jint, jstring, jstring, jint, jobject, jobject, jobject, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionDestroy
- * Signature: (I)Z
+ * Signature: (J)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionDestroy
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionPropertiesGet
- * Signature: (I)Lorg/ocera/orte/types/SubsProp;
+ * Signature: (J)Lorg/ocera/orte/types/SubsProp;
  */
 JNIEXPORT jobject JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionPropertiesGet
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionPropertiesSet
- * Signature: (ILorg/ocera/orte/types/SubsProp;)Z
+ * Signature: (JLorg/ocera/orte/types/SubsProp;)Z
  */
 JNIEXPORT jboolean JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionPropertiesSet
-  (JNIEnv *, jobject, jint, jobject);
+  (JNIEnv *, jobject, jlong, jobject);
 
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionGetStatus
- * Signature: (I)Lorg/ocera/orte/types/Status;
+ * Signature: (J)Lorg/ocera/orte/types/Status;
  */
 JNIEXPORT jobject JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionGetStatus
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionWaitForPublications
- * Signature: (ILorg/ocera/orte/types/NtpTime;JJ)I
+ * Signature: (JLorg/ocera/orte/types/NtpTime;JJ)I
  */
 JNIEXPORT jint JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionWaitForPublications
-  (JNIEnv *, jobject, jint, jobject, jlong, jlong);
+  (JNIEnv *, jobject, jlong, jobject, jlong, jlong);
 
 /*
  * Class:     org_ocera_orte_Subscription
  * Method:    jORTESubscriptionPull
- * Signature: (I)I
+ * Signature: (J)I
  */
 JNIEXPORT jint JNICALL Java_org_ocera_orte_Subscription_jORTESubscriptionPull
-  (JNIEnv *, jobject, jint);
+  (JNIEnv *, jobject, jlong);
 
 #ifdef __cplusplus
 }
index a134859c86e462ada411ae2df9c6391638783de0..3a7219c48bb80fef4d1a0a48d5f791cb88f80180 100644 (file)
@@ -10,9 +10,9 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_types_DomainEvents
  * Method:    jORTEDomainInitEvents
- * Signature: ()I
+ * Signature: ()J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
   (JNIEnv *, jclass);
 
 #ifdef __cplusplus
index 89a7f15ded5f2862420589061de298459b6d0a12..7429330b7b879bfb0ab409c7ff618d2421d62458 100644 (file)
@@ -10,9 +10,9 @@ extern "C" {
 /*
  * Class:     org_ocera_orte_types_DomainProp
  * Method:    jORTEDomainPropDefaultGet
- * Signature: ()I
+ * Signature: ()J
  */
-JNIEXPORT jint JNICALL Java_org_ocera_orte_types_DomainProp_jORTEDomainPropDefaultGet
+JNIEXPORT jlong JNICALL Java_org_ocera_orte_types_DomainProp_jORTEDomainPropDefaultGet
   (JNIEnv *, jclass);
 
 #ifdef __cplusplus
index 21856da067544478f2c2b8145b30d6055728599d..a8b07cb7c97d7f721f8097ab60c3a7ddc81b9bb7 100644 (file)
@@ -33,7 +33,7 @@ public class Domain {
    }
 
    /* domain fields */
-   protected int               handle;
+   protected long              handle;
    public DomainProp           props;
    public DomainEvents         events;
 
@@ -51,7 +51,7 @@ public class Domain {
    * Get handle of the Application Domain.   
    * @return Handle of the Application Domain. 
    */
-   public int getHandle()
+   public long getHandle()
    {
      return this.handle;
    }
@@ -81,7 +81,7 @@ public class Domain {
    * @return
    */
    private static native
-   void jORTEDomainStart(int dhandle,
+   void jORTEDomainStart(long dhandle,
                          boolean recvMetatrafficThread,
                          boolean recvUserDataThread,
                             boolean sendThread);
index f41e87fd03e22b55c4ae8cddc498f0b0ba63633d..2a0afea36e1c68e4d29ca90640716f07232fd3bc 100644 (file)
@@ -185,7 +185,7 @@ public class DomainApp extends Domain
  * @param domain given domain
  * @return addres value (from C environment) of the created domain
  */
- private static native int jORTEDomainDefaultAppCreate(int domain,boolean suspend);
+ private static native long jORTEDomainDefaultAppCreate(int domain,boolean suspend);
 
 
 /**
@@ -202,9 +202,9 @@ public class DomainApp extends Domain
  */
 
  private static native
int jORTEDomainAppCreate(int domain,
-                          int propHandle,
-                          int eventsHandle,
long jORTEDomainAppCreate(int  domain,
+                           long propHandle,
+                           long eventsHandle,
                                                  DomainEvents ev,
                                                  boolean suspend);
 
@@ -218,7 +218,7 @@ public class DomainApp extends Domain
  * @return boolean value, False when some error occures, otherwise True
  */
  private static native
- boolean jORTEDomainAppDestroy(int dhandle);
+ boolean jORTEDomainAppDestroy(long dhandle);
 
  
  /**
@@ -232,9 +232,9 @@ public class DomainApp extends Domain
   * @return
   */
   private static native
-  int jORTETypeRegisterAdd(int dhandle,
-                           String typeName,
-                           long maxlenght);
+  int jORTETypeRegisterAdd(long dhandle,
+                            String typeName,
+                            long maxlenght);
 
 
  /**
@@ -245,7 +245,6 @@ public class DomainApp extends Domain
   * @return boolean value, False when some error occures, otherwise True
   */
   private static native
-  boolean jORTETypeRegisterDestroyAll(int dhandle);
+  boolean jORTETypeRegisterDestroyAll(long dhandle);
 
-}
\ No newline at end of file
+}
\ No newline at end of file
index 62fd421e5d1d3463cf87cbb47d58e1bac1539ab2..6f034826212565793c380434eb039fa31b7ddf1d 100644 (file)
@@ -99,7 +99,7 @@ public class DomainMgr extends Domain
    * @return handle of the Manager
    **/
    private static native
-   int jORTEDomainDefaultMgrCreate(int dhandle,boolean suspend);
+   long jORTEDomainDefaultMgrCreate(int dhandle,boolean suspend);
 
 
   /**
@@ -110,10 +110,10 @@ public class DomainMgr extends Domain
    * @return handle of the Manager
    **/
    private static native
-   int jORTEDomainMgrCreate(int dhandle,
-                            int propsHandle,
-                            int eventsHandle,
-                            boolean suspend);
+   long jORTEDomainMgrCreate(int dhandle,
+                             long propsHandle,
+                             long eventsHandle,
+                             boolean suspend);
 
   /**
    * jORTEDomainMgrDestroy - destroy manager object
@@ -121,6 +121,6 @@ public class DomainMgr extends Domain
    * @return if some error occures return False, otherwise True
    **/
    private static native
-   boolean jORTEDomainMgrDestroy(int dhandle);  
+   boolean jORTEDomainMgrDestroy(long dhandle);  
        
 }
index 7b1b5e0c18b67bed8c90f3e3dc9ce8a187564ce0..c70a7a21fb0b1397b99baefc56f710e3f0daf97f 100644 (file)
@@ -53,7 +53,7 @@ public class JOrte {
    }
 
    public static
-   void appSendThread(int dhandle)
+   void appSendThread(long dhandle)
    {
     jORTEAppSendThread(dhandle);
    }
@@ -115,7 +115,7 @@ public class JOrte {
    * @return void
    */
    private static native
-   void jORTEAppSendThread(int dhandle);
+   void jORTEAppSendThread(long dhandle);
 
 
 }
index 597c71fcac7a6f6c34f5aacdc7f4c8984819ccfb..0abf7264977969bfb0b8d0d135eb123fe23f61b8 100644 (file)
@@ -30,7 +30,7 @@ import org.ocera.orte.types.*;
 
 public class Publication {
 
-  private int handle;
+  private long handle;
   private org.ocera.orte.types.MessageData msgData;
 
   private boolean b;
@@ -42,7 +42,7 @@ public class Publication {
    *
    * @return handler of the publication
    */
-   public int getHandle()
+   public long getHandle()
    {
      return this.handle;
    }
@@ -184,7 +184,7 @@ public class Publication {
   * ****************************************************************** */
 
   private native
-  int jORTEPublicationCreate(int appDomainHandle,
+  long jORTEPublicationCreate(long appDomainHandle,
                              String topic,
                              String typeName,
                              int bufflen,
@@ -196,25 +196,25 @@ public class Publication {
                           // NtpTime sendCallBackDelay
 
   private native
-  boolean jORTEPublicationDestroy(int publHandle);
+  boolean jORTEPublicationDestroy(long publHandle);
 
   private native
-  boolean jORTEPublicationSend(int publHandle, 
+  boolean jORTEPublicationSend(long publHandle, 
                                       MessageData instance);
                                       
 
   private native
-  PublProp jORTEPublicationPropertiesGet(int publHandle);
+  PublProp jORTEPublicationPropertiesGet(long publHandle);
   
   private native
-  boolean jORTEPublicationPropertiesSet(int publHandle,
+  boolean jORTEPublicationPropertiesSet(long publHandle,
                                                PublProp publProps);
 
   private native
-  Status jORTEPublicationGetStatus(int publHandle);
+  Status jORTEPublicationGetStatus(long publHandle);
 
   private native
-  int jORTEPublicationWaitForSubscriptions(int publHandle,
+  int jORTEPublicationWaitForSubscriptions(long publHandle,
                                               NtpTime wait,
                                                                           long retries,
                                                                                   long noSubscription);
index 29744174e15b0650be55873400f3aa8007761363..cd386b68b2b339bca764d969d9947e76aeab5e11 100644 (file)
@@ -28,15 +28,16 @@ import  org.ocera.orte.types.*;
 
 public class Subscription {
 
-   private int handle;
-   private int callbackContextHandle = 0;
+   private long handle;
+   private long callbackContextHandle = 0;
+
    private Domain appDomain;
 
   /**
    * Get Subscription's handle.
    * @return Handle of the subscription.
    */
-   public int getHandle()
+   public long getHandle()
    {
      return this.handle;
    }
@@ -173,7 +174,7 @@ public class Subscription {
    * @return ORTE_OK if succesful, ORTE_BAD_HANDLE if bad subscription handle, 
    *         ORTE_TIMEOUT if number of retries has been exhausted.   
    */
-  public boolean pull(int subsHandle)   
+  public boolean pull(long subsHandle)
   { 
     int b = jORTESubscriptionPull(subsHandle);
     if (b == ORTEConstant.ORTE_BAD_HANDLE) 
@@ -203,38 +204,38 @@ public class Subscription {
  * ****************************************************************** */
 
   private native
-  int jORTESubscriptionCreate(int appDomainHandle,
-                              int subsmode,  /*! union */
-                              int substype,  /*! union */
-                              String topic,
-                              String typeName,
-                              int bufflength,
-                              MessageData message,
-                                                         NtpTime deadline,
-                              NtpTime minSeparation,
-                              SubscriptionCallback cb,
-                            // recvCallBackParam
-                              long multicastIPAddress);
+  long jORTESubscriptionCreate(long appDomainHandle,
+                               int subsmode,  /*! union */
+                               int substype,  /*! union */
+                               String topic,
+                               String typeName,
+                               int bufflength,
+                               MessageData message,
+                                                         NtpTime deadline,
+                               NtpTime minSeparation,
+                               SubscriptionCallback cb,
+                             // recvCallBackParam
+                               long multicastIPAddress);
 
   private native
-  boolean jORTESubscriptionDestroy(int subsHandle);
+  boolean jORTESubscriptionDestroy(long subsHandle);
 
   private native
-  SubsProp jORTESubscriptionPropertiesGet(int subsHandle);
+  SubsProp jORTESubscriptionPropertiesGet(long subsHandle);
   
   private native
-  boolean jORTESubscriptionPropertiesSet(int subsHandle, SubsProp subProps);
+  boolean jORTESubscriptionPropertiesSet(long subsHandle, SubsProp subProps);
 
   private native
-  Status jORTESubscriptionGetStatus(int subsHandle);
+  Status jORTESubscriptionGetStatus(long subsHandle);
 
   private native
-  int jORTESubscriptionWaitForPublications(int subsHandle, 
+  int jORTESubscriptionWaitForPublications(long subsHandle, 
                                               NtpTime wait,
                                                                   long retries,
                                                                                   long noPublications);  
   private native
-  int jORTESubscriptionPull(int subsHandle);  
+  int jORTESubscriptionPull(long subsHandle);  
  
   
   
index 2887cdd15c47d560297a0593104d83d5de81c8b4..e3cdb61d481a1e3c6d14f9f44aa42656220ab199 100644 (file)
@@ -26,7 +26,7 @@ package org.ocera.orte.types;
 
 public class DomainEvents {
   /* handler to C struct with default domain properties  */
-  private int handle = 0;
+  private long handle = 0;
 
 
  /* load native library 'libjorte.so' */
@@ -52,7 +52,7 @@ public class DomainEvents {
   }
 
   
-  public int getHandle()
+  public long getHandle()
   {
        return this.handle;
   }
@@ -83,7 +83,7 @@ public class DomainEvents {
   * @return handler to default properties of a domain, NULL if error
   */
   private static native
-  int jORTEDomainInitEvents();
+  long jORTEDomainInitEvents();
 
 
 
index 756b1f5295efe7294e92f10e412d9596ddfbe4db..b4b731017d76fea6c2affa2f37201f6ef9945e8e 100644 (file)
@@ -34,7 +34,7 @@ public class DomainProp {
 
 
  /* handler to C struct with default domain properties  */
-  public int handle = 0;
+  public long handle = 0;
 
 
  /**
@@ -46,7 +46,7 @@ public class DomainProp {
   public static
   DomainProp defaultPropsCreate() {
      DomainProp prop = new DomainProp();
-     int handle = jORTEDomainPropDefaultGet();
+     long handle = jORTEDomainPropDefaultGet();
      prop.handle = handle;
      return prop;
   }
@@ -66,7 +66,7 @@ public class DomainProp {
   * @return handler to default properties of a domain, NULL if error
   */
   private static native
-  int jORTEDomainPropDefaultGet();
+  long jORTEDomainPropDefaultGet();
 
 }
 
index afb7d40c27974fd8e99af41523bbefdac0927a18..45668b80dbd4177f02031dcbb4114838234e7c72 100644 (file)
@@ -1122,17 +1122,17 @@ onSubDelete(const struct ORTEAppInfo *appInfo,
 // /////////////////////////////////////////////////////////////////////
 // create default application domain
 // /////////////////////////////////////////////////////////////////////
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_DomainApp_jORTEDomainDefaultAppCreate
 (JNIEnv *env, jclass class, jint jdomain, jboolean jsusp)
 {
-  jint      d;
+  jlong     d;
 
   #ifdef TEST_STAGE
     printf(":c: jsem pred ORTEDomainDefaultAppCreate() \n");
   #endif
   // call ORTE function
-  d = (jint) ORTEDomainAppCreate((int)jdomain,
+  d = (jlong) ORTEDomainAppCreate((int)jdomain,
                                  NULL,
                                  NULL,
                                  (Boolean) jsusp);
@@ -1149,18 +1149,18 @@ Java_org_ocera_orte_DomainApp_jORTEDomainDefaultAppCreate
 // //////////////////////////////////////////////////////////////////////
 // create user application domain
 // //////////////////////////////////////////////////////////////////////
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_DomainApp_jORTEDomainAppCreate
 (JNIEnv *env, jclass cls,
  jint jdomain,
- jint propHandle,
- jint eventsHandle,
+ jlong propHandle,
+ jlong eventsHandle,
  jobject obj_de,
  jboolean jsusp)
 {
   // jni varibles
   JavaVM                 *jvm;
-  jint                    d;
+  jlong                   d;
   //
   ORTEDomainAppEvents    *dom_events;
   JORTEDomainEventsContext_t  *domain_events_cont;
@@ -1221,7 +1221,7 @@ Java_org_ocera_orte_DomainApp_jORTEDomainAppCreate
   dom_events->onSubDeleteParam = (void *) domain_events_cont;
   ////////////////////////////////////////////////
   // call ORTE function
-  d = (jint) ORTEDomainAppCreate((int)jdomain,
+  d = (jlong) ORTEDomainAppCreate((int)jdomain,
                                  (ORTEDomainProp *) propHandle,
                                  (ORTEDomainAppEvents *) eventsHandle,
                                  (Boolean) jsusp);
index e243efbc9a7387790bb81befdc18e4892fb5e9be..570baefbf65e9665cbfc9a0ae61ba7acb8fd32b4 100644 (file)
@@ -34,7 +34,7 @@
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_DomainApp_jORTEDomainAppDestroy
-(JNIEnv *env, jclass cls, jint dhandle)
+(JNIEnv *env, jclass cls, jlong dhandle)
 {
   // check domain handle
   if (dhandle == 0)
index f457d26ba22c53cb20544b5afd36a1f3969a1274..4ec2f37f604f52b843589444cb581dd1296edae8 100644 (file)
@@ -34,7 +34,7 @@
 #include "jorte/org_ocera_orte_types_DomainEvents.h"
 #include "jorte/4all.h"
 
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
 (JNIEnv *env, jclass cls)
 {
@@ -58,6 +58,6 @@ Java_org_ocera_orte_types_DomainEvents_jORTEDomainInitEvents
      printf(":c: events initialized.. \n");
   #endif
 
-  return ((jint) evs);
+  return ((jlong) evs);
 
 }
index 2ae643a77de38c3a7d4ba173a2b73ec685a3c577..75bf2a8d104ff1ac8bf062a5ed3dd8549d1cdf82 100644 (file)
 /* ****************************** *
  *  create default manager domain *
  * ****************************** */
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_DomainMgr_jORTEDomainDefaultMgrCreate
 (JNIEnv *env, jclass cls, jint jdomain, jboolean susp)
 {
-  jint       d;
+  jlong      d;
 
   // call ORTE function
-  d = (jint) ORTEDomainMgrCreate((int)jdomain,
+  d = (jlong) ORTEDomainMgrCreate((int)jdomain,
                                  NULL,
                                  NULL,
                                  (Boolean) susp);
@@ -61,18 +61,18 @@ Java_org_ocera_orte_DomainMgr_jORTEDomainDefaultMgrCreate
 /* *************************** *
  *  create user manager domain *
  * *************************** */
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_DomainMg_jORTEDomainMgrCreate
-(JNIEnv *env, jclass cls, jint jdomain, jint propHandle,
- jint eventsHandle, jboolean susp)
+(JNIEnv *env, jclass cls, jint jdomain, jlong propHandle,
+ jlong eventsHandle, jboolean susp)
 {
-  jint        d;
+  jlong       d;
 
   // call ORTE function
-  d = (jint) ORTEDomainMgrCreate((int)jdomain,
-                                 (ORTEDomainProp *) propHandle,
-                                 (ORTEDomainAppEvents *) eventsHandle,
-                                 (Boolean) susp);
+  d = (jlong) ORTEDomainMgrCreate((int)jdomain,
+                                  (ORTEDomainProp *) propHandle,
+                                  (ORTEDomainAppEvents *) eventsHandle,
+                                  (Boolean) susp);
   if(d == 0)
   {
     printf(":!c: creating mgrDomain failed! \n");
index 640bbcaf6b27c17ccaff19c86c6695b7ef8324c9..d38df5ef020da4b2ce616f4dd858337eebf224de 100644 (file)
@@ -36,7 +36,7 @@
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_DomainMgr_jORTEDomainMgrDestroy
-(JNIEnv *env, jclass cls, jint dhandle)
+(JNIEnv *env, jclass cls, jlong dhandle)
 {
   int8_t     b;
 
index abe79957fc0f1b97bc5effd95264abddfcb880e5..aeff69e10df74e25daf888578c5b58aab10d30e1 100644 (file)
@@ -34,7 +34,7 @@
 #include "jorte/org_ocera_orte_types_DomainProp.h"
 #include "jorte/4all.h"
 
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_types_DomainProp_jORTEDomainPropDefaultGet
 (JNIEnv *env, jclass cls)
 {
@@ -58,5 +58,5 @@ Java_org_ocera_orte_types_DomainProp_jORTEDomainPropDefaultGet
   #ifdef TEST_STAGE
     printf(":c: default domain properties created.. \n");
   #endif
-  return ((jint) dprop);
+  return ((jlong) dprop);
 }
index 6451313198d3ff5aef47bce7e4c5d94b7a4c26f7..e9a1527d78144950e73a8518c2e419c4498d0528 100644 (file)
@@ -36,7 +36,7 @@
 // ve fci chybi 2 Multicast argumenty - maji se dodat???
 JNIEXPORT void JNICALL
 Java_org_ocera_orte_Domain_jORTEDomainStart
-(JNIEnv *env, jclass cls, jint dom_handle,
+(JNIEnv *env, jclass cls, jlong dom_handle,
  jboolean recvUnicastMetatrafficThread,
  jboolean recvUnicastUserDataThread,
  jboolean sendThread)
index c4595fc1235d9702617968e767b2895bda71cc80..28a26d41474581fab722d52eb7cdac7af7186399 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 // origin orte headers
 #include "orte.h"
+#include "orte_all.h"
 // pregenerated header
 #include "jorte/org_ocera_orte_Publication.h"
 #include "jorte/jorte_protos_api.h"
@@ -61,11 +62,11 @@ sendCallBack(const ORTESendInfo *info,void *vinstance, void *sendCallBackParam)
 
 
 // native method
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationCreate
 (JNIEnv   *env ,
  jobject   obj,
- jint      dom_handle,
+ jlong     dom_handle,
  jstring   j_topic,
  jstring   j_type_name,
  jint      jbufflen,
@@ -154,6 +155,6 @@ Java_org_ocera_orte_Publication_jORTEPublicationCreate
     if(buffer != 0) free(buffer);
     return 0;
   }
-  return ((jint) p);
+  return ((jlong) p);
 
 }
index a96ecbcca7ac27550d9ad40e49752782c5381010..020ecc19bff9ff572c63beb908b1e5688e109dfd 100644 (file)
@@ -35,7 +35,7 @@
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationDestroy
-(JNIEnv *env, jclass cls, jint pub_handle)
+(JNIEnv *env, jclass cls, jlong pub_handle)
 {
   int8_t    b;
 
index 30c54c143c31c9a2983c70b0ed98e04695eb1685..b96168ced57323e022a248b38565a0217377379f 100644 (file)
@@ -37,7 +37,7 @@
 
 JNIEXPORT jobject JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationGetStatus
-(JNIEnv *env, jobject obj, jint j_appDomain_handle)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle)
 {
   // jni types
   jclass           cls_ps = NULL; // class of PubStatus
index f97f5a704247e949e0de5a8df3bc24a2d6cbe051..92871067c742049530a53aff7589931f8734c2af 100644 (file)
@@ -38,7 +38,7 @@
 
 JNIEXPORT jobject JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationPropertiesGet
-(JNIEnv *env, jobject obj, jint j_appDomain_handle)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle)
 {
   // jni types
   jclass         cls_pp   = NULL; // PublProp class
index 0a008e1b439c89404d3b0c72e78d9cc6812e6f42..2a0d4a77157b4000ccb8e88c2224cad81ac014d5 100644 (file)
@@ -39,7 +39,7 @@
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationPropertiesSet
-(JNIEnv *env, jobject obj, jint j_appDomain_handle, jobject obj_pp)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle, jobject obj_pp)
 {
   // jni types
   jclass         cls_pp = NULL;
index 10a7892033e46929da1113877fbdad02b1fdc0aa..3737f09c8426e0acdc977ba5e32a9478fb968858 100644 (file)
@@ -37,7 +37,7 @@
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationSend
-(JNIEnv *env, jobject obj, jint pub_handle, jobject obj_msg)
+(JNIEnv *env, jobject obj, jlong pub_handle, jobject obj_msg)
 {
   jclass    cls;
   jobject   obj_bb;
index 601d42b3db05ebacfa04e92e7d06fd90c235e2ea..0e9365433c6902425d753609a3d9fabf95eee24a 100644 (file)
@@ -39,7 +39,7 @@
 
 JNIEXPORT jint JNICALL
 Java_org_ocera_orte_Publication_jORTEPublicationWaitForSubscriptions
-(JNIEnv *env, jobject obj, jint j_appDomain_handle,
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle,
  jobject obj_ntpT, jlong jretries, jlong jnoSubscriptions)
 {
   int            i;
index 21a940f79b1fec6c1c038ef67984ce6ba79fce29..a10a21daff54fb08e35d600a0f037089ecd5ff58 100644 (file)
@@ -386,11 +386,11 @@ recvCallBack(const ORTERecvInfo *info,void *vinstance, void *recvCallBackParam)
 /* ****************************************************************** *
  *                            native method                           *
  * ****************************************************************** */
-JNIEXPORT jint JNICALL
+JNIEXPORT jlong JNICALL
 Java_org_ocera_orte_Subscription_jORTESubscriptionCreate
 (JNIEnv   *env,
  jobject   obj,
- jint      dhandle,   // appDomain handle
+ jlong     dhandle,   // appDomain handle
  jint      jsmode,    // subs mode
  jint      jstype,    // subs type
  jstring   jtopic,    // subs topic
@@ -488,7 +488,7 @@ Java_org_ocera_orte_Subscription_jORTESubscriptionCreate
     fid = (*env)->GetFieldID(env,
                              cls,
                              "callbackContextHandle",
-                             "I");
+                             "J");
     if(fid == 0)
     {
       #ifdef TEST_STAGE
@@ -496,10 +496,10 @@ Java_org_ocera_orte_Subscription_jORTESubscriptionCreate
       #endif
       break;
     }
-    (*env)->SetIntField(env,
+    (*env)->SetLongField(env,
                         obj,
                         fid,
-                        (int) callback_cont);
+                        (jlong) callback_cont);
     #ifdef TEST_STAGE
        printf(":c: ORTESubscriptionCreate() calling..\n");
     #endif
@@ -548,6 +548,6 @@ Java_org_ocera_orte_Subscription_jORTESubscriptionCreate
   (*env)->ReleaseStringUTFChars(env, jtname, typename);
   // returns handle of new created Subscription
   if(flag_ok == 0) return 0;
-  return ((jint) s);
+  return ((jlong) s);
 
 }
index 5f01b29026edacd5f3363b4276a81640048c2b41..c2f48d440af8a3c31f02e47dea161a50357e1dfe 100644 (file)
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_Subscription_jORTESubscriptionDestroy
-(JNIEnv *env, jobject obj, jint subs_handle)
+(JNIEnv *env, jobject obj, jlong subs_handle)
 {
   int8_t        b;
-  jint          h;
+  jlong         h;
   jclass        cls;
   jfieldID      fid;
   int           flag_ok = 0;
@@ -66,7 +66,7 @@ Java_org_ocera_orte_Subscription_jORTESubscriptionDestroy
     fid = (*env)->GetFieldID(env,
                              cls,
                              "callbackContextHandle",
-                             "I");
+                             "J");
     if(fid == 0)
     {
      #ifdef TEST_STAGE
@@ -75,7 +75,7 @@ Java_org_ocera_orte_Subscription_jORTESubscriptionDestroy
      break;
     }
     // get value
-    h = (*env)->GetIntField(env, obj, fid);
+    h = (*env)->GetLongField(env, obj, fid);
     if(h)
     {
       //JavaVM *jvm;
index 8ee8b3764c002ca9e6b7a9f1abc84d6d08ef11c1..42302b667edd60e782e7786c053d661d49a02f57 100644 (file)
@@ -37,7 +37,7 @@
 
 JNIEXPORT jobject JNICALL
 Java_org_ocera_orte_Subscription_jORTESubscriptionGetStatus
-(JNIEnv *env, jobject obj, jint j_appDomain_handle)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle)
 {
   // jni types
   jclass           cls_ss = NULL; // class of SubsStatus
index 2945151cb771813769a7e167d72ea685daafc1a5..49767e98a0d73ff6b220cfc2c6b8c567edffb99f 100644 (file)
@@ -37,7 +37,7 @@
 
 JNIEXPORT jobject JNICALL
 Java_org_ocera_orte_Subscription_jORTESubscriptionPropertiesGet
-(JNIEnv *env, jobject obj, jint j_appDomain_handle)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle)
 {
   // jni types
   jclass         cls_sp   = NULL; // SubsProp class
index 960393488c2a5d4e1609ad65a4c4744536a24a50..5af99809cb1e9dddd142b5e501ed0a5cb742d908 100644 (file)
@@ -39,7 +39,7 @@
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_Subscription_jORTESubscriptionPropertiesSet
-(JNIEnv *env, jobject obj, jint j_appDomain_handle, jobject obj_sp)
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle, jobject obj_sp)
 {
   // jni types
   jclass         cls_sp = NULL;
index d4781421342c06d2ff65a50a3cb8c3103fb91486..9169219a8dd2dd06a8a2bc1aa60f7f74c3ead66e 100644 (file)
@@ -39,7 +39,7 @@
 
 JNIEXPORT jint JNICALL
 Java_org_ocera_orte_Subscription_jORTESubscriptionWaitForPublications
-(JNIEnv *env, jobject obj, jint j_appDomain_handle,
+(JNIEnv *env, jobject obj, jlong j_appDomain_handle,
  jobject obj_ntpT, jlong jretries, jlong jnoPublications)
 {
   int            i;
index d4e651b1302d7ea50721e7788950f735e55cb4b8..73e9c640ad6080bbe9424df5de4d4a4dae3d6c69 100644 (file)
@@ -34,7 +34,7 @@
 
 JNIEXPORT jint JNICALL
 Java_org_ocera_orte_DomainApp_jORTETypeRegisterAdd
-(JNIEnv *env, jclass cls, jint handle, jstring jname, jlong jlength)
+(JNIEnv *env, jclass cls, jlong handle, jstring jname, jlong jlength)
 {
   const char     *name;
   int            b;
index 6eb4ce0e6dde7ebb000d0d960386a6715f7d9798..cea627eaa157cd40200db8a74e994be9315afbe9 100644 (file)
 
 // library header file's path
 #include "orte.h"
+#include "jorte/4all.h"
 // pregenerated header
 #include "jorte/org_ocera_orte_DomainApp.h"
 
 
 JNIEXPORT jboolean JNICALL
 Java_org_ocera_orte_DomainApp_jORTETypeRegisterDestroyAll
-(JNIEnv *env, jclass cls, jint j_app_domain_handle)
+(JNIEnv *env, jclass cls, jlong j_app_domain_handle)
 {
   int b;
 
index ac1c80245410b8d8e862751261482863da59d49d..fd49c1b1436264c09275f2bc7d3e94c4526cfc74 100644 (file)
@@ -50,7 +50,7 @@ NtpTime getNtpTime(JNIEnv *env, jobject obj)
   fieldID = (*env)->GetFieldID(env,ntpTimeClass,"fraction","J");
 //  if(fieldID == NULL) return(NTPTIME_ZERO(time)); // NEFUNGUJE
   /* get object's value */
-  time.fraction = (uint32_t) (*env)->GetIntField(env,obj,fieldID);
+  time.fraction = (uint32_t) (*env)->GetLongField(env,obj,fieldID);
 
   return(time);