| 177 | |
| 178 | template <class T> |
| 179 | auto Context::GetChannelResource(const res::Channel<T>& res, std::source_location loc) -> ChannelResource& { |
| 180 | AIMRT_ASSERT_WITH_LOC(loc, res.IsValid(), "Channel [{}] is invalid.", res.GetName()); |
| 181 | AIMRT_ASSERT_WITH_LOC(loc, res.context_id_ == id_, "Channel [{}] belongs to context [{}], but current context is [{}].", res.GetName(), res.context_id_, id_); |
| 182 | AIMRT_ASSERT_WITH_LOC(loc, res.idx_ < channel_resources_.size(), "Channel [{}] index [{}] out of range (size = {}).", res.GetName(), res.idx_, channel_resources_.size()); |
| 183 | return channel_resources_[res.idx_]; |
| 184 | } |
| 185 | |
| 186 | template <class Q, class P> |
| 187 | auto Context::GetRpcResource(const res::Service<Q, P>& res, std::source_location loc) -> RpcResource& { |
no test coverage detected