我在manager.cpp中有一个函数:
///Calculate of the time slot
bool link_layer_manager_t::calc_ts_clk_est_duration_seconds()
{
std::map<const string_t, lm_device_t *> setRegMsg={};
vector<response_t> res;
setRegMsg={{"trx_set_jr_fraction' + frac_msb +' ' + frac_lsb +'", &rx}};
response_t r = send_sequence_to_device(setRegMsg,res);
}
send_sequence_to_device
是一个floationg函数,它位于不同的文件中(manager.cpp包含此文件)。
这是功能:
template<class T>
response_t send_sequence_to_device( std::map<const string_t,T*> msg2device_p, std::vector<response_t>& result_list, ushort num_attempts=SEND_NUM_ATTEMPTS )
{
bool is_ok_flag = true;
response_t r;
raftor1_logs_t* rlogs;
typename std::map<const string_t, T*>::iterator msg_it;
for( msg_it=msg2device_p.begin(); msg_it!=msg2device_p.end() and is_ok_flag; msg_it++ )
{
r = msg_it->second->send(msg_it->first, true, num_attempts);
result_list.push_back(r);
is_ok_flag = is_ok_flag and is_ok(r);
if( not(is_ok_flag) )
{
stringstream ss;
ss << "ALERT: Sequence aborted due to error on message [" << msg_it->first << "] ";
if( r.erred() )
ss << "due to communication failure.";
else
ss << "with error message [" << r.msg << "].";
rlogs->alert.begin_record();
rlogs->alert.write( ss.str() );
rlogs->alert.end_record();
}
}
if( is_ok_flag )
r.set_ok("ok.\n");
return r;
}
当我尝试构建函数时,我收到以下错误:
错误:没有匹配函数来调用'send_sequence_to_device(std :: map,lm_device_t *&gt;&amp;)'|
为什么?