2015-06-19 56 views
0

我有一個組件使用前端:: OutDigitalTunerPort將FEI調用到RH設備。以下是在XXX_base.cpp生成的代碼:對前端RH支持:: OutDigitalTunerPort似乎缺少大多數FEI功能

device_fei_out = new frontend::OutDigitalTunerPort("device_fei_out"); 
addPort("device_fei_out", device_fei_out); 

下面是一個示例用法在編譯正確: device_fei_out-> setTunerOutputSampleRate(ID,頻率);

下面是一個不能編譯的示例用法: device_fei_out-> setTunerCenterFrequency(id);

顯然,這個FEI調用沒有在適當的模板定義中定義 - 編譯錯誤指向/usr/local/redhawk/core/include/frontend/fe_tuner_port_impl.h。

看着這個代碼 - 我可以看到,只有工作FEI撥打以上在以下類中定義: OutDigitalTunerPortT digital_tuner_delegation

,所有其他的「設置」 FEI函數中定義: OutAnalogTunerPortT analog_tuner_delegation

那麼這是否意味着前端:: OutDigitalTunerPort僅支持這一個「設置」功能?我還可以如何讓所有的FEI呼叫到RH設備?

下面的編譯錯誤一個細節 - 有類似:

/usr/local/redhawk/core/include/frontend/fe_tuner_port_impl.h:329:錯誤:不匹配「運算符=!」在「I = '操作符='((前端:: OutAnalogTunerPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> *)此) - >前端:: OutAnalogTunerPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> ::前端:: OutFrontendTunerPortT < _CORBA_ObjRef_Var。 ,FRONTEND :: DigitalTuner> ::。frontend :: OutFrontendPort < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> :: outConnections.std :: vector < _Tp,_Alloc> ::開頭爲_Tp = std :: pair < _CORBA_ObjRef_Var,std :: basic_str ING,性病::分配器>>,_Alloc =標準::分配器,性病:: basic_string的,標準::分配器>>>」

double freq=0.5; 
std::string id1("usrp-to-wavemaster"); 
device_fei_out->setTunerCenterFrequency(id1, freq); 

的/ usr /本地/紅鷹/型芯/包含/前端/ fe_tuner_port_impl .h:在成員函數'void frontend :: OutAnalogTunerPortT :: setTunerCenterFrequency(std :: string &,double)[with PortType_var = _CORBA_ObjRef_Var,PortType = FRONTEND :: DigitalTuner]': WaveformMaster.cpp:124:從這裏實例化 /usr/local/redhawk/core/include/frontend/fe_tuner_port_impl.h:329:錯誤:在'i =((前端:: OutAnalogTunerPortT <_CORBA_ObjRef_Var,FRONTEND :: DigitalTuner>)'中的'operator ='不匹配) - >前端:: OutAnalogTunerPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> ::。frontend :: OutFrontendTunerPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> ::。frontend :: OutFrontendPort < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> :: outConnections.std :: vector < _Tp,_Alloc > ::開始於_Tp = std :: pair < _CORBA_ObjRef_Var,std :: basic_string,std :: allocator>>,_Alloc = std :: allocator,std :: basic_string,std :: allocator>>>' /usr/LIB/GCC/x86_64的-紅帽-LINUX/4.4.7 /../../../../包括/ C++/4.4.7 /比特/ stl_iterator。h:669:注意:候選是:__gnu_cxx :: __ normal_iterator,std :: basic_string,std :: allocator>,std :: vector,std :: basic_string,std :: allocator >>,std :: allocator,std :: basic_string,std :: allocator >> >>> >> & __gnu_cxx :: _ normal_iterator,std :: basic_string,std :: allocator >>,std :: vector,std :: basic_string,std :: allocator >> std ::分配器,std :: basic_string,std :: allocator>>>> ::運算符=(const __gnu_cxx :: __ normal_iterator,std :: basic_string,std :: allocator>>,std :: vector,std ::/usr/local/redhawk/core/src/sd :: allocator>,std :: allocator,std :: basic_string,std :: allocator>>>> &) WaveformMaster.cpp:124:從這裏實例化 /include/frontend/fe_tuner_port_impl.h:329:錯誤:'i!=((frontend :: OutAnalogTun erPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> *)本) - >前端:: OutAnalogTunerPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> ::前端:: OutFrontendTunerPortT < _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> ::前端:: OutFrontendPort <。 _CORBA_ObjRef_Var,FRONTEND :: DigitalTuner> :: outConnections.std :: vector < _Tp,_Alloc> ::以_Tp = std :: end結尾< _CORBA_ObjRef_Var,std :: basic_string,std :: allocator>>,_Alloc = std ::分配器,std :: basic_string,std :: allocator>>>' /usr/include/omniORB4/fixed.h:57:備註:候選者爲:CORBA ::布爾運算符!=(const CORBA :: Fixed &,const CORBA :: Fixed &) /usr/local/redhawk/core/include/bulkio/bulkio_out_port.h:718:note:bool operator!=(const bulkio :: connection_desc riptor_struct &,常量bulkio :: connection_descriptor_struct &) /usr/local/redhawk/core/include/frontend/fe_tuner_struct_props.h:116:注:布爾運算符=(const的前端:: frontend_tuner_allocation_struct &,常量前端:: frontend_tuner_allocation_struct & ) /usr/local/redhawk/core/include/frontend/fe_tuner_struct_props.h:173:注:布爾運算符=(const的前端:: frontend_listener_allocation_struct &,常量前端:: frontend_listener_allocation_struct &) 在/ usr /本地/紅鷹/ core/include/frontend/fe_tuner_struct_props.h:272:note:bool operator!=(const frontend :: default_frontend_tuner_status_struct_struct &,const frontend :: default_frontend_tuner_status_struct _struct &) /usr/local/redhawk/core/include/frontend/fe_tuner_struct_props.h:308:注:BOOL操作=(常量的std ::矢量> &,常量性病::矢量> &) 的/ usr/local/redhawk/core/include/frontend/fe_tuner_port_impl.h:在成員函數'void frontend :: OutAnalogTunerPortT :: setTunerBandwidth(std :: string &,double)[with PortType_var = _CORBA_ObjRef_Var,PortType = FRONTEND :: DigitalTuner]':

回答

1
  1. 的setTunerCenterFrequency(..)函數有兩個參數(的std :: string & ID,雙頻率),你只用ID調用,這可能是你的編譯問題的原因。如果這不是問題的原因,請提供您的源代碼和所有錯誤輸出的更多詳細信息以及您正在使用的REDHAWK版本。

  2. OutDigitalTunerPort支持全部 OutAnalogTunerPort功能。 OutDigitalTunerPort從繼承自OutAnalogTunerPortT的OutDigitalTunerPortT繼承(所以是的,它具有OutAnalogTunerPort的所有功能以及getTunerOutputSampleRate和setTunerOutputSampleRate函數的添加)。

+0

感謝您爲我着想。對於前一篇文章中的拼寫錯誤 - 這不會用適當的參數進行編譯 - 上面我添加了您請求的內容 - 源代碼行後跟與這些行相關的完整編譯輸出 - 屬於單個「set」調用。 –

+0

請注意,實際的問題不僅僅是缺少OutDigitalTunerPort FEI成員函數,因爲它們從定義它們的OutAnalogTunerPort繼承。但是這些更多的基類函數無法編譯,因爲其中嵌入的operator ==和operator!=調用與任何可用的原型都不匹配 - 這是實際的問題。 –

+0

您使用的是什麼REDHAWK版本?什麼FEI版本? – Neon