#include <string>
#include <tuple>
Go to the source code of this file.
|
| std::string | stripEcho (const std::string &response, const std::string &command) |
| | Strip a command echo prefix from a response string.
|
| |
| std::tuple< std::string, std::string > | parseVersionInfo (const std::string &raw) |
| | Parse a raw version-info string ("MODEL,FIRMWARE") into components.
|
| |
◆ parseVersionInfo()
| std::tuple< std::string, std::string > parseVersionInfo |
( |
const std::string & | raw | ) |
|
Parse a raw version-info string ("MODEL,FIRMWARE") into components.
- Parameters
-
| raw | The raw string from the KEYENCE command. |
- Returns
- A tuple of (model, firmwareVersion).
- Exceptions
-
| std::runtime_error | if the format is unexpected. |
◆ stripEcho()
| std::string stripEcho |
( |
const std::string & | response, |
|
|
const std::string & | command ) |
Strip a command echo prefix from a response string.
- Parameters
-
| response | The raw response from the device. |
| command | The command that was sent (potential echo). |
- Returns
- The response with any leading echo removed.