Hello,
I was able to log data from a publisher/subscriber using the recording service and a plugin library I created that selects certain fields from an idl structure that uses FlatData and Shared Memory and printing them into a .dat file (similar to what's taught in the tutorials) which can be viewed in a text editor. Now I'm trying to dump all of this info into a JSON file and then view all the fields, but my generated .dat file is empty. I'm using a custom profile qos xml for both readers and writers which uses XCDR2 and I'm copying the same qos for my recording service.
The console doesn't throw any errors (other than a multicast communication warning that I'm addressing in a different post, but it doesn't prevent my log to record data when I'm using a plugin library). Does anybody have an idea on why I can log data using a plugin library but not in a JSON format?
I'm attaching both xml files for the pub/sub qos and recording service, as well as the generated json files.
Thanks
Attachment | Size |
---|---|
json_logging.zip | 6.86 KB |
Hi David,
When you say "Now I'm trying to dump all of this info into a JSON file and then view all the fields, but my generated .dat file is empty", what do you mean exactly? Are you publishing the same data but Recording Service set to record in JSON-sqlite format is not recording anything? Or are you using your custom plugin to read the data?
Thanks,
Juanlu
Hi Juanlu,
Sorry if I wasn't very clear. I am not using my custom plugin anymore, I'm recording in JSON-sqlite format and it doesn't throw any errors, but when I inspect the .dat file with sqlite it shows empty. I'm trying to record the topic with type "Images::Image". I attached the xml file where I set the JSON recording and the output files as well. Here's the extract of the json recording service xml
I realized what was my mistake. When defining the domain_participant, I forgot to add the <register_type> filed for the topic I was trying to record. Once I added the line
<register_type name="Images_Image" type_ref="Images::Image"/>
After <participant_qos> it's working now!