rticommunity / rticonnextdds-connector-go

RTI Connector for Connext DDS is a lightweight technology that enables DDS data to be accessed with Go.
Other
26 stars 12 forks source link

Optional Members don't appear to be unset once set #53

Closed adamarbor closed 6 months ago

adamarbor commented 6 months ago

Description:

If an optional member is specified in the XML file, and the member is set and then not set on the next write (for a keyed instance) the optional member stays populated.

How to reproduce:

  1. Download the zip file goddsreproduce.zip and extract
  2. Run go get
  3. Run go run main.go
  4. See in Admin Console that after 2nd write, with optional member unset, that it is still set to value that was written to in first write

System information:

Operating system: Ubuntu 22.04 Platform: x64Linux4gcc7.3.0
Go version: 1.21.5

adamarbor commented 6 months ago

Realized just after submitting this, there is a ClearMembers() function that clears out anything that was set on that instance, and it in turn clears out the optional member.