| 281 | |
| 282 | template<typename B, typename R, typename Q> |
| 283 | module::Modem<B, R, Q>* |
| 284 | Modem ::build(const tools::Constellation<R>* cstl) const |
| 285 | { |
| 286 | if (this->type == "SCMA" && this->implem == "STD") |
| 287 | { |
| 288 | return _build_scma<B, R, Q>(); |
| 289 | } |
| 290 | else if (this->type == "OOK" && this->implem == "STD") |
| 291 | { |
| 292 | if (channel_type == "AWGN") return new module::Modem_OOK_AWGN<B, R, Q>(this->N, this->no_sig2); |
| 293 | if (channel_type == "BEC") return new module::Modem_OOK_BEC<B, R, Q>(this->N); |
| 294 | if (channel_type == "BSC") return new module::Modem_OOK_BSC<B, R, Q>(this->N); |
| 295 | } |
| 296 | else |
| 297 | { |
| 298 | if (this->max == "MAX") return _build<B, R, Q, tools::max<Q>, tools::max_i<Q>>(cstl); |
| 299 | if (this->max == "MAXL") return _build<B, R, Q, tools::max_linear<Q>, tools::max_linear_i<Q>>(cstl); |
| 300 | if (this->max == "MAXS") return _build<B, R, Q, tools::max_star<Q>, tools::max_star_i<Q>>(cstl); |
| 301 | if (this->max == "MAXSS") return _build<B, R, Q, tools::max_star_safe<Q>, tools::max_star_safe_i<Q>>(cstl); |
| 302 | } |
| 303 | |
| 304 | throw spu::tools::cannot_allocate(__FILE__, __LINE__, __func__); |
| 305 | } |
| 306 | |
| 307 | template<typename B, typename R, typename Q> |
| 308 | module::Modem<B, R, Q>* |
nothing calls this directly
no outgoing calls
no test coverage detected