Hello,
I was looking to get some assistance in passing a struct to Java via the RSA. I
get that you need to setup a class on the java end to mimic your C struct but I
can’t seem to get the descriptor file to work with what I’ve got.
Java Interface is named RemoteExample inside package org.apache.celix
class complex_input_example2 {
public double a;
public double b;
public int n;
public String name;
}
class complex_output_example2 {
public double pow;
public int fib;
public String name;
}
complex_output_example2 setComplex2(complex_input_example2 exmpl);
In C I have:
struct complex_input_example2 {
double a;
double b;
int32_t n;
char* name;
};
struct complex_output_example2 {
double pow;
int32_t fib;
char* name;
};
struct remote_example {
void* handle;
int (*setComplex2)(void* handle, complex_input_example2* exmpl,
complex_output_example2 **out);
};
//Example.descriptor
:header
type=interface
name=org.apache.celix.RemoteExample
version=1.0.0
:annotations
classname=org.apache.celix.RemoteExample
:types
complex_input_example2={DDNt a bn name}
complex_output_example2={DNt pow fib name}
:methods
setComplex2(Lorg/apache/celix/RemoteExample.complex_input_example2;)Lorg/apache/celix/RemoteExample.complex_output_example2;=setComplex2(#am=handle;PLcomplex_input_example2;#am=out;*Lcomplex_output_example2;)N
Debugging out what the descriptor wants seems to yield:
setComplex2(Lorg/apache/celix/RemoteExample$complex_input_example2;)Lorg/apache/celixRemoteExample$complex_output_example2;
Error says “Cannot find method with sig” the above string. However if I put the
$ in the descriptor then it just errors out and won’t load the descriptor.
Thanks,
Brian
Sent from my iPhone
Sent from my iPhone