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

thrift: Vocabs are not supported in structs #2476

Closed
drdanz opened this issue Feb 1, 2021 · 1 comment
Closed

thrift: Vocabs are not supported in structs #2476

drdanz opened this issue Feb 1, 2021 · 1 comment
Labels
Affects: YARP v3.4.2 This is a known issue affecting YARP v3.4.2 Component: Tool - yarpidl_thrift Fixed in: YARP v3.5.0 Issue Type: Bug Involves some intervention from a system administrator Resolution: Fixed

Comments

@drdanz
Copy link
Member

drdanz commented Feb 1, 2021

In order to write a struct that is compatible with current protocols, and to get automatic parsing, it should be possible to add a "vocab" to a struct.
At the moment this seems to be impossible.

@drdanz drdanz added Issue Type: Bug Involves some intervention from a system administrator Component: Tool - yarpidl_thrift Affects: YARP v3.4.2 This is a known issue affecting YARP v3.4.2 labels Feb 1, 2021
@drdanz
Copy link
Member Author

drdanz commented Feb 1, 2021

By handling BOTTLE_TAG_VOCAB in WireReader::readI32, it is possible to add an i32 to the struct, and read it.
Unfortunately this works only in read mode, in write mode it will be serialized as an i32 instead of as a vocab.
Therefore I'd rather look for some other solution.

drdanz added a commit to drdanz/yarp that referenced this issue Feb 4, 2021
Vocabs can be defined in this way:

```
typedef i32 ( yarp.type = "yarp::conf::vocab32_t" ) vocab

struct FooStruct
{
    1: vocab foo;
}
```

Fixes robotology#2476
drdanz added a commit to drdanz/yarp that referenced this issue Feb 8, 2021
Vocabs can be defined in this way:

```
typedef i32 ( yarp.type = "yarp::conf::vocab32_t" ) vocab

struct FooStruct
{
    1: vocab foo;
}
```

Fixes robotology#2476
drdanz added a commit to drdanz/yarp that referenced this issue Feb 15, 2021
Vocabs can be defined in this way:

```
typedef i32 ( yarp.type = "yarp::conf::vocab32_t" ) vocab

struct FooStruct
{
    1: vocab foo;
}
```

Fixes robotology#2476
drdanz added a commit to drdanz/yarp that referenced this issue Feb 15, 2021
Vocabs can be defined in this way:

```
typedef i32 ( yarp.type = "yarp::conf::vocab32_t" ) vocab

struct FooStruct
{
    1: vocab foo;
}
```

Fixes robotology#2476
@drdanz drdanz closed this as completed in 2328793 Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: YARP v3.4.2 This is a known issue affecting YARP v3.4.2 Component: Tool - yarpidl_thrift Fixed in: YARP v3.5.0 Issue Type: Bug Involves some intervention from a system administrator Resolution: Fixed
Projects
None yet
Development

No branches or pull requests

1 participant