Get command id from string (allows negative inputs e.g "-2" for Close) @param command Id string @returns command Id @throws std::invalid_argument
| 61 | /// @returns command Id |
| 62 | /// @throws std::invalid_argument |
| 63 | uint16_t GetCommandId(std::string const& commandId) |
| 64 | { |
| 65 | // allow negative inputs |
| 66 | auto commandIdL = std::stoi(commandId); |
| 67 | return static_cast<uint16_t>(commandIdL); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | ChannelLinter::ChannelLinter(AppConfig config) : |