API
ttyErrors.hpp
Go to the documentation of this file.
1 /** \file ttyErrors.hpp
2  * \brief Error numbers for the tty utilities.
3  * \author Jared R. Males (jaredmales@gmail.com)
4  *
5  * \ingroup tty_files
6  * History:
7  * - 2018-01-17 created by JRM
8  */
9 
10 #ifndef tty_ttyErrors_hpp
11 #define tty_ttyErrors_hpp
12 
13 #include <string>
14 
15 #define TTY_E_NOERROR (0)
16 #define TTY_E_TCGETATTR (-42001)
17 #define TTY_E_SETISPEED (-42002)
18 #define TTY_E_SETOSPEED (-42003)
19 #define TTY_E_TCSETATTR (-42004)
20 #define TTY_E_TIMEOUTONWRITEPOLL (-42011)
21 #define TTY_E_ERRORONWRITEPOLL (-42012)
22 #define TTY_E_ERRORONWRITE (-42013)
23 #define TTY_E_TIMEOUTONWRITE (-42014)
24 #define TTY_E_TIMEOUTONREADPOLL (-42015)
25 #define TTY_E_ERRORONREADPOLL (-42016)
26 #define TTY_E_ERRORONREAD (-42017)
27 #define TTY_E_TIMEOUTONREAD (-42018)
28 #define TTY_E_NODEVNAMES (-42021)
29 #define TTY_E_UDEVNEWFAILED (-42022)
30 #define TTY_E_DEVNOTFOUND (-42023)
31 #define TTY_E_BADBAUDRATE (-42030)
32 
33 #define TELNET_E_NOERROR (0)
34 #define TELNET_E_GETADDR (-42040)
35 #define TELNET_E_SOCKET (-42041)
36 #define TELNET_E_BIND (-42042)
37 #define TELNET_E_CONNECT (-42043)
38 #define TELNET_E_TELNETINIT (-42044)
39 #define TELNET_E_EHERROR (-42045)
40 #define TELNET_E_LOGINTIMEOUT (-42046)
41 
42 namespace MagAOX
43 {
44 namespace tty
45 {
46 
47 /// Get a text explanation of a TTY_E_ error code.
48 /**
49  * \ingroup tty
50  */
51 std::string ttyErrorString( int ec /**< [in] the error code */ );
52 
53 } //namespace tty
54 } //namespace MagAOX
55 
56 #endif //tty_ttyErrors_hpp
57 
std::string ttyErrorString(int ec)
Get a text explanation of a TTY_E_ error code.
Definition: ttyErrors.cpp:15
Definition: dm.hpp:24