| 246 | } |
| 247 | |
| 248 | FSecure::ByteVector ChannelLinter::TranslateCommand(StringVector const& commandParams) |
| 249 | { |
| 250 | uint16_t commandId = GetCommandId(commandParams.at(0)); |
| 251 | |
| 252 | if (!m_ChannelCommands.count(commandId)) |
| 253 | throw std::runtime_error("Failed to find a command with id: " + std::to_string(commandId)); |
| 254 | |
| 255 | Form commandForm = m_ChannelCommands.at(commandId).m_ArgumentsForm; |
| 256 | json command |
| 257 | { |
| 258 | { "id", commandId}, |
| 259 | { "arguments", commandForm.Fill({begin(commandParams) + 1, end(commandParams)})}, // + 1 to omit command id} |
| 260 | }; |
| 261 | return C3::Core::Profiler::TranslateCommand(command); |
| 262 | } |
| 263 | |
| 264 | StringVector ChannelLinter::GetComplementaryChannelArgs() const |
| 265 | { |