HAL4RT 1.0 FTF Avatar
  1. OMG Issue

HAL4RT — Syntax errors in HAL4RT_Surface.h (robotics/15-11-04)

  • Key: HAL4RT-12
  • Status: open  
  • Source: AIST ( Dr. Noriaki Ando)
  • Summary:

    Since HAL4RT_Surface.h (robotics/15-11-04) includes some syntax errors, it cannot be compiled.
    1. To use int32_t #include <stdint.h> directive necessary. (C99)
    2. Invalid function pointers declarations in SENSOR structure.
    3. Invalid #endif syntax.

    At least the following modifications are necessary.

    HAL4RT_Surface.h.patch
    --- org/HAL4RT_Surface.h        2016-03-15 03:11:51.496000000 +0900
    +++ mod/HAL4RT_Surface.h        2016-03-15 03:27:33.664000000 +0900
    @@ -1,6 +1,7 @@
     #ifndef HAL4RT_SURFACE_H
     #define HAL4RT_SURFACE_H
    
    +#include <stdint.h>
    
     int32_t completed();
     int32_t notify_event();
    @@ -14,30 +15,30 @@
    
    
     typedef struct ApplicationBase {
    -  int32_t completed();
    -  int32_t notify_event();
    -  int32_t notify_error();
    +  int32_t (*completed)();
    +  int32_t (*notify_event)();
    +  int32_t (*notify_error)();
     } APPLICATIONBASE;
    
    
     typedef struct System {
    -  int32_t notify_error();
    -  int32_t get_error_detail();
    +  int32_t (*notify_error)();
    +  int32_t (*get_error_detail)();
     } SYSTEM;
    
    
     typedef struct Command {
    -  int32_t execute();
    -  int32_t completed();
    +  int32_t (*execute)();
    +  int32_t (*completed)();
     } COMMAND;
    
    
     typedef struct Event {
    -  int32_t subscribe();
    -  int32_t unsubscribe();
    -  int32_t notify_event();
    -  int32_t get_event_data();
    +  int32_t (*subscribe)();
    +  int32_t (*unsubscribe)();
    +  int32_t (*notify_event)();
    +  int32_t (*get_event_data)();
     } EVENT;
    
    
    -#endif HAL4RT_SURFACE_H
    +#endif /* HAL4RT_SURFACE_H */
    
  • Reported: HAL4RT 1.0b1 — Mon, 14 Mar 2016 18:30 GMT
  • Updated: Mon, 6 Nov 2017 12:34 GMT