celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Michael <brian.m7...@gmail.com>
Subject Structs to Java
Date Wed, 13 May 2020 20:09:11 GMT

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);

complex_input_example2={DDNt a bn name}
complex_output_example2={DNt pow fib name}

Debugging out what the descriptor wants seems to yield:

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. 


Sent from my iPhone

Sent from my iPhone
View raw message