Without seeing the code for the component, I can only make assumptions, but it seems that when you set the center frequency of the component, it will eventually set the frequency of the hardware, probably when the call to self.port_labInterface_out.setFrequencyMHz() occurs. When this occurs, it probably then asks the device what frequency it was actually set to, and sets the frequency of the component to reflect this before returning from the setFrequencyMHz call.
However, like I said, those are assumptions. Using the librtlsdr library and the ctypes module, you may be able to call the functions that the component itself is most likely calling, namely rtlsdr_open to get a reference to the device, rtlsdr_set_center_freq to set the center frequency, and rtlsdr_get_center_freq to get the center frequency of the device. The biggest problems with this approach are:
- That you will have to create a python ctypes version of the rtlsdr_dev struct used by these calls in order to pass a reference around
- Since the component already has a reference to the device, the rtlsdr_open in your unit test will fail
You could get around the first problem, which is more an inconvenience than a problem, by using cunit or cppunit for your unit tests, allowing you to reuse the struct defined in the rtlsdr library.
The second problem is a limitation of the rtlsdr library and/or libusb. This almost certainly means you won't be able to accomplish your original goal of querying the device directly