ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lampRpcErrors.hpp
Go to the documentation of this file.
1 
10 #ifndef DEVMGR_DEVICE_MOTOR_RPC_ERRORS_H
11 #define DEVMGR_DEVICE_MOTOR_RPC_ERRORS_H
12 
13 // System headers
14 #include <unordered_map>
15 
16 namespace devmgr {
17  namespace lamp {
18 
19  enum {
20  RPC_SUCCESS = 0,
21  RPC_ERR_NOT_OP = -1,
26  RPC_ERR_COOLING = -6,
27  RPC_ERR_LOCAL = -7
28  };
29 
30  const std::unordered_map<short, std::string> rpc_errors = {
31  {RPC_ERR_NOT_OP, "Cannot disable lamp. Not in OP state"},
32  {RPC_ERR_NOT_STANDBY_READY, "Cannot enable lamp. Not in READY."},
33  {RPC_ERR_NOT_STANDBY_NOTREADY, "Cannot init lamp. Not in NOTREADY or FAILURE."},
34  {RPC_ERR_SWITCHING_ON , "Not allowed to turn Lamp ON while turning it OFF"},
35  {RPC_ERR_SWITCHING_OFF, "Not allowed to turn Lamp OFF while turning it ON"},
36  {RPC_ERR_COOLING, "Cannot switch lamp ON. Still cooling down."},
37  {RPC_ERR_LOCAL, "RPC calls are not allowed in Local mode"},
38  };
39 
40  }
41 }
42 #endif // DEVMGR_DEVICE_MOTOR_RPC_ERRORS_H
Definition: lampRpcErrors.hpp:27
Definition: lampRpcErrors.hpp:24
Definition: lampRpcErrors.hpp:23
Definition: lampRpcErrors.hpp:21
const std::unordered_map< short, std::string > rpc_errors
Definition: lampRpcErrors.hpp:30
Definition: lampRpcErrors.hpp:20
Definition: lampRpcErrors.hpp:22
Definition: lampRpcErrors.hpp:25
Definition: lampRpcErrors.hpp:26