ifw-fcf  5.0.0-pre2
motorRpcErrors.hpp
Go to the documentation of this file.
1 
10 #ifndef DEVMGR_DEVICE_LAMP_RPC_ERRORS_H
11 #define DEVMGR_DEVICE_LAMP_RPC_ERRORS_H
12 
13 // System headers
14 #include <unordered_map>
15 
16 namespace fcf::devmgr::motor {
17 
18  enum {
19  RPC_SUCCESS = 0,
20  RPC_ERR_NOT_OP = -1,
26  };
27 
28  const std::unordered_map<short, std::string> rpc_errors = {
29  {RPC_ERR_NOT_OP, "Cannot disable motor. Not in OP state"},
30  {RPC_ERR_NOT_OP_READY, "Cannot enable motor. Not in READY."},
31  {RPC_ERR_NOT_OP_NOTREADY, "Cannot init motor. Not in NOTREADY or FAILURE."},
32  {RPC_ERR_MOTOR_LOCAL, "RPC calls are not allowed in Local mode."},
33  {RPC_ERR_MOTOR_LOWER_LIMIT, "Move rejected. Target position beyond lower SW limit."},
34  {RPC_ERR_MOTOR_UPPER_LIMIT, "Move rejected. Target position beyond upper SW limit."}
35  };
36 
37 }
38 #endif // DEVMGR_DEVICE_LAMP_RPC_ERRORS_H
Definition: motor.hpp:18
const std::unordered_map< short, std::string > rpc_errors
Definition: motorBaseRpcErrors.hpp:28
@ RPC_ERR_NOT_OP_READY
Definition: motorBaseRpcErrors.hpp:21
@ RPC_ERR_MOTOR_LOCAL
Definition: motorBaseRpcErrors.hpp:23
@ RPC_ERR_NOT_OP
Definition: motorBaseRpcErrors.hpp:20
@ RPC_ERR_MOTOR_UPPER_LIMIT
Definition: motorBaseRpcErrors.hpp:25
@ RPC_SUCCESS
Definition: motorBaseRpcErrors.hpp:19
@ RPC_ERR_NOT_OP_NOTREADY
Definition: motorBaseRpcErrors.hpp:22
@ RPC_ERR_MOTOR_LOWER_LIMIT
Definition: motorBaseRpcErrors.hpp:24