Instrument Control Lib
Framework to control Oscilloscopes, SMUs, Function Generators and DC Powersupplies via Ethernet.
ErrorCodeDefines.h
Go to the documentation of this file.
1 #if 0
2 //
3 // Created by florianfrank on 29.12.20.
4 //
5 
6 #ifndef PIL_ERROR_CODE_DEFINES_H
7 #define PIL_ERROR_CODE_DEFINES_H
8 
9 #include <cstdint> // uint32_t
10 
12 #define MAX_ERROR_MSG_LEN 128
13 
14 typedef int PIL_ERROR_CODE;
15 
19 enum
20 {
22  PIL_NO_ERROR,
24  PIL_INVALID_ARGUMENTS,
26  PIL_ERRNO,
28  PIL_TIMEOUT,
30  PIL_INTERFACE_CLOSED,
32  PIL_INVALID_BAUDRATE,
33  /* Error insufficient resources. */
34  PIL_INSUFFICIENT_RESOURCES,
36  PIL_INSUFFICIENT_PERMISSIONS,
38  PIL_DEADLOCK_DETECTED,
40  PIL_THREAD_NOT_JOINABLE,
42  PIL_THREAD_NOT_FOUND,
44  PIL_ONLY_PARTIALLY_READ_WRITTEN,
46  PIL_NO_SUCH_FILE,
47 
48  PIL_XML_PARSING_ERROR,
50  PIL_UNKNOWN_ERROR,
51 
52 } typedef PIL_ERROR_CODES;
53 
57 struct
58 {
60  PIL_ERROR_CODE m_ErrorCode;
62  uint32_t m_ErrnoCode;
64  char m_ErrorMessage[MAX_ERROR_MSG_LEN];
65 } typedef PIL_ErrorHandle;
66 
67 
68 #endif //PIL_ERROR_CODE_DEFINES_H
69 #endif