You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Micro-Epsilon SDK outputs numerical error codes that are explained in the SDK Manual. The driver should output the error code with a text message containing the explanation in the SDK manual.
@gavanderhoorn I intend to make a translator function that translates a numerical value into a numerical value + text string. Is there a C++ structure (e.g. an error code function) that I should use.
@dave992 I created a feature branch and (very naively) just started to make a function in driver.cpp. The function is not a member of "scancontrol_driver::ScanControlDriver".
How to proceed, in general I want to:
define a function that returns a string does this work: std::string function_name(arg,arg1){ }
as a test: call this function directly as a first thing in the driver. As I want to test without sensor....
To test the function you do not need the driver, so calling your function at the beginning of main() should be okay for testing purposes. When it works you can move it to the correct place(s) in the driver code.
Originally added by @rtonnaer:
The Micro-Epsilon SDK outputs numerical error codes that are explained in the SDK Manual. The driver should output the error code with a text message containing the explanation in the SDK manual.
@gavanderhoorn I intend to make a translator function that translates a numerical value into a numerical value + text string. Is there a C++ structure (e.g. an error code function) that I should use.
Response by @gavanderhoorn :
These sort of things are typically done using either a map (which maps
int
tostd::string
), or even just a simpleswitch
:You could wrap this in a function which takes the error code and returns a
std::string
.The text was updated successfully, but these errors were encountered: