AUBO SDK  0.26.0
Loading...
Searching...
No Matches
error_stack.h File Reference

汇总错误码 More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <aubo/global_config.h>
#include <aubo/error_stack/hal_error.h>
#include <aubo/error_stack/rtm_error.h>
#include <aubo/error_stack/system_error.h>
Include dependency graph for error_stack.h:

Go to the source code of this file.

Namespaces

namespace  arcs
 
namespace  arcs::error_stack
 

Macros

#define _PH1_   "{}"
 
#define _PH2_   "{}"
 
#define _PH3_   "{}"
 
#define _PH4_   "{}"
 
#define ARCS_ERROR_CODES
 
#define _D(n, v, s, r)   n = (int)v,
 
#define _D(n, v, s, r)
 
#define _D(n, v, s, r)   s,
 
#define _D(n, v, s, r)   n##_INDEX,
 
#define _D(n, v, s, r)
 
#define _D(n, v, s, r)
 

Enumerations

enum  arcs::error_stack::ErrorCodes { arcs::error_stack::ARCS_ERROR_CODES }
 

Functions

constexpr int ARCS_ABI_EXPORT arcs::error_stack::codeCompose (int aa, int bb, int cccc)
 
constexpr int ARCS_ABI_EXPORT arcs::error_stack::mod (int x)
 
int arcs::error_stack::str2ErrorCode (const char *err_code_name)
 
const char * arcs::error_stack::errorCode2Str (int err_code)
 
std::ostream & arcs::error_stack::dump (std::ostream &os)
 

Detailed Description

汇总错误码

Definition in file error_stack.h.

Macro Definition Documentation

◆ _D [1/6]

#define _D (   n,
  v,
  s,
 
)    n = (int)v,

Definition at line 54 of file error_stack.h.

◆ _D [2/6]

#define _D (   n,
  v,
  s,
 
)
Value:
if (strcmp(#n, err_code_name) == 0) \
return v;

Definition at line 54 of file error_stack.h.

◆ _D [3/6]

#define _D (   n,
  v,
  s,
 
)    s,

Definition at line 54 of file error_stack.h.

◆ _D [4/6]

#define _D (   n,
  v,
  s,
 
)    n##_INDEX,

Definition at line 54 of file error_stack.h.

◆ _D [5/6]

#define _D (   n,
  v,
  s,
 
)
Value:
if (err_code == v) \
index = n##_INDEX;

Definition at line 54 of file error_stack.h.

◆ _D [6/6]

#define _D (   n,
  v,
  s,
 
)
Value:
os << std::setw(20) << #n << "\t" << v << "\t" << s << "\t" << r \
<< std::endl;

Definition at line 54 of file error_stack.h.

◆ _PH1_

#define _PH1_   "{}"

Definition at line 18 of file error_stack.h.

◆ _PH2_

#define _PH2_   "{}"

Definition at line 19 of file error_stack.h.

◆ _PH3_

#define _PH3_   "{}"

Definition at line 20 of file error_stack.h.

◆ _PH4_

#define _PH4_   "{}"

Definition at line 21 of file error_stack.h.

◆ ARCS_ERROR_CODES

#define ARCS_ERROR_CODES
Value:
SYSTEM_ERRORS \
JOINT_ERRORS \
SAFETY_INTERFACE_BOARD_ERRORS \
RTM_ERRORS \
TOOL_ERRORS \
PEDSTRAL_ERRORS \
HARDWARE_INTERFACE_ERRORS \
_D(ARCS_MAX_ERROR_CODE, -1, "Max error code", "suggest...")

Definition at line 41 of file error_stack.h.