Using:
Redhawk 1.9 / CentOS 6.4 (32 bit) / C++ implementation
Creating a new FRONTEND::TUNER device
Using default setting on code generation
The following error message happens when I add the following port required for FRONTEND Digital Tuner and regenerate the code.
<ports>
<provides repid="IDL:FRONTEND/DigitalTuner:1.0" providesname="DigitalTuner"/>
<provides repid="IDL:FRONTEND/RFInfo:1.0" providesname="RFInfo"/>
</ports>
Error message (Problems window):
cannot allocate an object of abstract type ‘FRONTEND_RFInfo_In_i’ TestFrontEndDevice_base.cpp /TestFrontEndDevice/cpp line 50 C/C++ Problem
Error message (console):
port_impl.h:56: note: because the following virtual functions are pure within ‘FRONTEND_RFInfo_In_i’:
/usr/local/redhawk/core/include/redhawk/FRONTEND/RFInfo.h:323: note: virtual void FRONTEND::_impl_RFInfo::rf_flow_id(const char*)
/usr/local/redhawk/core/include/redhawk/FRONTEND/RFInfo.h:325: note: virtual void FRONTEND::_impl_RFInfo::rfinfo_pkt(const FRONTEND::RFInfoPkt&)
make: * [TestFrontEndDevice-TestFrontEndDevice_base.o] Error 1
There appears to be a bug in the code generation for the RFInfo class. If you compare the signatures of the generated code in the port_impl.h file to those of the "unimplemented" ones above, you'll notice that for the rf_flow_id function in port_impl.h there is no const keyword. The same can be said about the rfinfo_pkt method. It is missing the const keyword and an ampersand in the function declaration.
To fix this, simply add the const keywords and the ampersand in the appropriate places in both the declaration in the port_impl.h file and the definition in the port_impl.cpp file.