What is the difference between the configuration RTDB and the shared memory RTDB?
Question
What is the difference between the configuration RTDB and the shared memory RTDB?
Answer
The shared memory RTDB is the RTDB which is loaded by a test loaded in memory on the real-time host. When a test is started, the test loads a configuration RTDB into the shared memory RTDB space and then works on the RTDB in shared memory. If I just re-start the real-time host and perform a rtobj.getSharedMemRTDBName, it returns empty since no test is loaded into memory. If I run a test (which will load the test into memory), the same query returns the RTDB name. Even if I stop the test (it is still loaded into memory), the query will return the same RTDB name. If the test is stopped, I can still get the list of variables using the rtobj.getSharedMemRTDBVarList call but getting and setting the item values makes sense only when a test is running.
The configuration RTDB is loaded into a different memory section of the real-time host and this will be unique for each socket connection to the real-time host. For example, say I create the rtobj object to my real-time host ‘redhawk1’ from MATLAB 9a and I create another rtobj object to the same real-time host ‘redhawk1’ from MATLAB 10a, now I have two unique connections to the same real-time host and I can load and work on two different configuration RTDB’s via the two different sockets. Though both the sockets will be accessing the same shared memory RTDB the configuration RTDB’s may be different. Even in the same version of MATLAB, the SimWB Toolkit GUI and the rtobj API use different sockets to connect to the real-time host. Add to this the SIMulation Workbench Control Center (Java GUI) which has its own socket there may be 3 different configuration RTDBs or 3 different copies of the same RTDB.