| 127 | } |
| 128 | |
| 129 | std::string ToString() const { |
| 130 | std::stringstream ss; |
| 131 | if (type_ == aimrt_rpc_context_type_t::AIMRT_RPC_CLIENT_CONTEXT) { |
| 132 | ss << "Client context, "; |
| 133 | } else if (type_ == aimrt_rpc_context_type_t::AIMRT_RPC_SERVER_CONTEXT) { |
| 134 | ss << "Server context, "; |
| 135 | } else { |
| 136 | ss << "Unknown context, "; |
| 137 | } |
| 138 | |
| 139 | ss << "timeout: " << timeout_ns_ / 1000000 << "ms, meta: {"; |
| 140 | |
| 141 | for (auto itr = meta_data_map_.begin(); itr != meta_data_map_.end(); ++itr) { |
| 142 | if (itr != meta_data_map_.begin()) ss << ","; |
| 143 | ss << "{\"" << itr->first << "\":\"" << itr->second << "\"}"; |
| 144 | } |
| 145 | |
| 146 | ss << "}"; |
| 147 | |
| 148 | return ss.str(); |
| 149 | } |
| 150 | |
| 151 | private: |
| 152 | static const aimrt_rpc_context_base_ops_t* GenOpsBase() { |
nothing calls this directly
no outgoing calls
no test coverage detected