Please provide the following info:
Hardware Platform: DriveWorks AGX Xavier
Software Version: Drive Software 2.2
Host Machine Version: Ubuntu 18.04.4 LTS (Bionic Beaver)
SDK Manager Version: 220.127.116.1143
Note: I am running everything I mentioned below in Linux 18.4 Host machine.
Long story short, my Plugin parses data packets based on CAN IDs. If user changes one of the CAN IDs through the Plugin parameters my Plugin and IMU both adapt to that new CAN ID and keep parsing the data. Challenge is when the plugin is restarted. Plugin resets its IDs to default because it can’t store that information. And IMU still sends out last changed IDs. So my Plugin won’t be able to understand those messages unless there is a way to store this information.
I am implementing a custom IMU plugin for our CAN based IMU product. It reads plugin parameters for IMU configuration requests from the plugin user. When _dwSensorPlugin_start() is called, my plugin sends CAN configuration messages to the IMU. In _dwSensorIMUPlugin_parseDataBuffer, uses dwCANMessage.ID to determine packet type and subsequently parse it to provide data to SAL. All the supported IDs for the product are predefined in the plugin implementation.
One of the feature we have is an ability to change PS number of the messages. PS number is part of 29-bit CAN identification data (dwCANMessage.ID). Our IMU provides an ability to change and store this PS number for any message, which essentially changes the ID of the message sent by the IMU. This is useful for the customers who has overlapping ID list and can change IMU message ID to avoid conflicting IDs.
But if this ID is changed the Plugin will no longer recognize that packet because my plugin only looks for the IDs initialized at the beginning. I can update the message ID in my plugin when user sends parameter to change the ID. But this new ID is not stored permanently by the Plugin. When User re-runs the plugin, ID list in plugin resets to the default again and looses new IDs. IMU will still be sending messages with new IDs but Plugin won’t be able to understand those messages with new IDs. To solve this problem, User is going to have to manually change the ID to default in the IMU and then use Plugin parameter to change it back to the new one so that plugin can understand the message with new ID.
Is there a better way to do this? Can I store these ID values somewhere and get my plugin to read IDs from there every time it starts and make change to those IDs every time a plugin user changes one. Can I create a .xml or text file from which my plugin reads initial id values and dump last known ID values for the use in next initialization?
I hope this makes sense. I am happy to answer any questions you might have. Or maybe you can redirect me to some threads that talks about this. I couldn’t find any.
Thank you for your time in advance.