-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hello, I am X-posting this issue from the Go Connector repo for better visibility, I will paste the details from that issue here.
Proposal:
Hello ππ» I would like to be able to get the instance_handle field from the Sample Info structure (called Infos in this library). I have tried forking the library and adding a simple method that replicates what already exists, you can view it here: rticommunity/rticonnextdds-connector-go#59
Current behavior:
Unfortunately calling this method results in the following error in our Go code:
err = m.reader.Take()
if err != nil && !errors.Is(err, rti.ErrNoData) {
return fmt.Errorf("taking samples from input: %w", err)
}
l, err := m.reader.Samples.GetLength()
if err != nil {
return fmt.Errorf("taking samples from input: %w", err)
}
for i := range l {
instanceHandle, err := m.reader.Infos.GetInstanceHandle(i)
if err != nil {
return fmt.Errorf("getting instance handle from sample: %w", err)
}
...
}getting instance handle from sample: DDS Exception:
RTILuaSampleInfo_get:Unknown SampleInfo field: instance_handle
RTILuaMetamethodImpl_InDataDereference:!RTILuaSampleInfo_get failed with retcode 1
RTILuaMetamethodImpl_InData:!dereference operation failed with retcode 1
RTI_Connector_get_json_from_infos:!get stack values
Desired behavior:
The instance handle is returned.
Use case:
Metadata
Metadata
Assignees
Labels
No labels