Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does microxrceddsgen support union? #75

Open
coolwaterld opened this issue Dec 28, 2023 · 1 comment
Open

Does microxrceddsgen support union? #75

coolwaterld opened this issue Dec 28, 2023 · 1 comment

Comments

@coolwaterld
Copy link

Question:
Does microxrceddsgen support union?
Env:
OS: Linuxmint LMDE 5 (elsie)
openjdk 17.0.6 2023-01-17
microxrceddsgen version: 2.0.2 (master branch)
ID:Micro-XRCE-DDS-Gen/thirdparty/IDL-Parser/test/idls/coverage_basic.idl (only keep MyEnum and SimpleUnion)

enum MyEnum
{
    A,
    B,
    C
};
union SimpleUnion switch (long)
{
    case A:
        long first;
    case B:
        long long second;
};

Operation:
./microxrceddsgen ./coverage_basic.idl -replace
(I copy coverage_basic.idl to scrip folder)
Result:
Generated: coverage_basic.c coverage_basic.h BUT no union supported.
coverage_basic.c is empty:

#include "coverage_basic.h"

#include <ucdr/microcdr.h>
#include <string.h>

coverage_basic.h only enum

#ifndef _coverage_basic_H_
#define _coverage_basic_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include <stdint.h>
#include <stdbool.h>

typedef enum MyEnum
{
    A,
    B,
    C
} MyEnum;

typedef uint32_t MyEnum_cdr;


#ifdef __cplusplus
}
#endif

#endif // _coverage_basic_H_
@pablogs9
Copy link
Member

pablogs9 commented Jan 5, 2024

No, it does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants