Project

General

Profile

Actions

Bug #393

closed

serialization for remote call fails to compile (genom3-pocolibs).

Added by François Félix Ingrand 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal

Description

This simple component and interface:

test-interface.gen:

interface test_interface {
  function set_t(in double dd);
};


test.gen:

#include "test-interface.gen" 

component test {

  use test_interface;

  ids {
    double d2;
  };

  task  t2{
    codel <start>  codel_test(in d2, in set_t) yield ether;
  };

};


Fails to compile:
make[1]: Entering directory '/home/felix/work/test2/build/pocolibs/server'
gcc -DHAVE_CONFIG_H -I. -I./autoconf   -I/home/felix/openrobots/include -I/home/felix/work/include  -pthread -g -O2 -MT src/test_pocolibs-test_remotelib.o -MD -MP -MF src/.deps/test_pocolibs-test_remotelib.Tpo -c -o src/test_pocolibs-test_remotelib.o `test -f 'src/test_remotelib.c' || echo './'`src/test_remotelib.c
src/test_remotelib.c: In function ‘genom_test_set_t_encode’:
src/test_remotelib.c:138:30: error: incompatible type for argument 1 of ‘genom_serialen_double’
  138 |   s += genom_serialen_double(in);
      |                              ^~
      |                              |
      |                              const void *
In file included from src/test_msglib.h:12,
                 from src/test_control_task.h:17,
                 from src/test_remotelib.c:9:
src/serialize.h:1677:30: note: expected ‘double’ but argument is of type ‘const void *’
 1677 | genom_serialen_double(double data)
      |                       ~~~~~~~^~~~
src/test_remotelib.c:140:30: error: incompatible type for argument 2 of ‘genom_serialize_double’
  140 |   genom_serialize_double(&p, in);
      |                              ^~
      |                              |
      |                              const void *
In file included from src/test_msglib.h:12,
                 from src/test_control_task.h:17,
                 from src/test_remotelib.c:9:
src/serialize.h:1683:46: note: expected ‘double’ but argument is of type ‘const void *’
 1683 | genom_serialize_double(char **buffer, double data)
      |                                       ~~~~~~~^~~~
make[1]: *** [Makefile:653: src/test_pocolibs-test_remotelib.o] Error 1
make[1]: Leaving directory '/home/felix/work/test2/build/pocolibs/server'
make: *** [Makefile:531: all-recursive] Error 1

Actions #1

Updated by Anthony Mallet 8 months ago

  • Status changed from New to Closed
Actions #2

Updated by Anthony Mallet 8 months ago

  • Project changed from genom3 to genom3-pocolibs
Actions

Also available in: Atom PDF