* (by command 'javah -jni class_with_native_function')
*
* @author Lukas Pokorny (lukas_pokorny@centrum.cz)
+ * @author Martin Vajnar (martin.vajnar@gmail.com)
* @author CTU FEE Prague - Department of Control Engineering (dce.felk.cvut.cz)
* @author Project ORTE - OCERA Real Time Ethernet (www.ocera.org)
* @author dedication to Kj
*
*/
-#include <string.h>
-#include <stdlib.h>
-// library header file's path
-#include "orte.h"
-// enable TEST_STAGE run level
-#include "jorte/4all.h"
-#include "jorte/jorte_protos_api.h"
-// pregenerated header
-#include "jorte/org_ocera_orte_Publication.h"
-
+#include "jorte/jorte.h"
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
break;
}
// find class
- cls_pp = (*env)->FindClass(env, "org/ocera/orte/types/PublProp");
+ cls_pp = findClass(env, "org.ocera.orte.types.PublProp");
if(cls_pp == 0)
{
#ifdef TEST_STAGE
// setting object's fields
/////////////////////////////////////////////////
// set topic
- if(!setTopic(env,cls_pp,obj_pp,publ_prop->topic))
+ if(!setTopic(env,cls_pp,obj_pp,(const char *)publ_prop->topic))
{
#ifdef TEST_STAGE
printf(":!c: setTopic() failed! \n");
}
/////////////////////////////////////////////////
// set type
- if(!setType(env,cls_pp,obj_pp,publ_prop->typeName))
+ if(!setType(env,cls_pp,obj_pp,(const char *)publ_prop->typeName))
{
#ifdef TEST_STAGE
printf(":!c: setType() failed! \n");
jbool);
/////////////////////////////////////////////////
// fieldID - persistence
- cls_ntpT = (*env)->FindClass(env, "org/ocera/orte/types/NtpTime");
+ cls_ntpT = findClass(env, "org.ocera.orte.types.NtpTime");
if(cls_ntpT == 0)
{
#ifdef TEST_STAGE