report_data.h
Go to the documentation of this file.
1 /* Copyright 2017 UFACTORY Inc. All Rights Reserved.
2  *
3  * Software License Agreement (BSD License)
4  *
5  * Author: Jimy Zhang <jimy92@163.com>
6  ============================================================================*/
7 #ifndef XARM_REPORT_DATA_H_
8 #define XARM_REPORT_DATA_H_
9 
10 #include <string>
12 
13 
15  public:
16  ReportDataDevelop(void);
17  ~ReportDataDevelop(void);
18 
19  int flush_data(unsigned char *rx_data);
20  void print_data(void);
21 
22  private:
23  int runing_;
24  int mode_;
25  int cmdnum_;
26  float angle_[7];
27  float pose_[6];
28  float tau_[7];
30 };
31 
32 
33 
35  public:
36  ReportDataNorm(void);
37  ~ReportDataNorm(void);
38 
39  int flush_data(unsigned char *rx_data);
40  void print_data(void);
41 
42  // private:
43  int runing_;
44  int mode_;
45  int cmdnum_;
46  float angle_[7];
47  float pose_[6];
48  float tau_[7];
49 
50  int mt_brake_;
51  int mt_able_;
52  int err_;
53  int war_;
54  float tcp_offset_[6];
55  float tcp_load_[4];
58  float gravity_dir_[3];
60 };
61 
62 
63 
65  public:
66  ReportDataRich(void);
67  ~ReportDataRich(void);
68 
69  int flush_data(unsigned char *rx_data);
70  void print_data(void);
71 
72  private:
73  int runing_;
74  int mode_;
75  int cmdnum_;
76  float angle_[7];
77  float pose_[6];
78  float tau_[7];
79 
80  int mt_brake_;
81  int mt_able_;
82  int err_;
83  int war_;
84  float tcp_offset_[6];
85  float tcp_load_[4];
88  float gravity_dir_[3];
90 
91  int arm_type_;
92  int axis_num_;
94  int slave_id_;
97  unsigned char versions_[30];
98  float trs_jerk_;
99  float trs_accmin_;
100  float trs_accmax_;
103  float p2p_jerk_;
104  float p2p_accmin_;
105  float p2p_accmax_;
108  float rot_jerk_;
109  float rot_accmax_;
110  int sv3msg_[16];
111  float trs_msg_[5];
112  float p2p_msg_[5];
113  float rot_msg_[2];
114 };
115 
117 public:
118  XArmReportData(std::string report_type = "normal");
119  ~XArmReportData(void);
120 
121  int flush_data(unsigned char *rx_data);
122  void print_data(void);
123 
124 private:
125  int __flush_common_data(unsigned char *rx_data);
126  void __print_common_data(void);
127  int _flush_dev_data(unsigned char *rx_data);
128  void _print_dev_data(void);
129  int _flush_normal_data(unsigned char *rx_data);
130  void _print_normal_data(void);
131  int _flush_rich_data(unsigned char *rx_data);
132  void _print_rich_data(void);
133 
134 public:
136  // dev/normal/rich report data
137  int state;
138  int mode;
139  int cmdnum;
140  float angle[7];
141  float pose[6];
142  float tau[7];
143 
144  // normal/rich report data
145  int mt_brake;
146  int mt_able;
147  int err;
148  int war;
149  float tcp_offset[6];
150  float tcp_load[4];
153  float gravity_dir[3];
154 
155  // rich report data
156  int arm_type;
157  int axis_num;
159  int slave_id;
162  unsigned char versions[30];
163  float trs_jerk;
164  float trs_accmin;
165  float trs_accmax;
166  float trs_velomin;
167  float trs_velomax;
168  float p2p_jerk;
169  float p2p_accmin;
170  float p2p_accmax;
171  float p2p_velomin;
172  float p2p_velomax;
173  float rot_jerk;
174  float rot_accmax;
175 
176  int temperatures[7];
177  float rt_tcp_spd;
178  float rt_joint_spds[7];
179  int count;
180  float world_offset[6];
181  int gpio_reset_conf[2];
185  float collision_model_params[6];
186  float voltages[7];
187  float currents[7];
188 
191  int cgpio_input_digitals[2];
192  int cgpio_output_digitals[2];
193  float cgpio_input_analogs[2];
194  float cgpio_output_analogs[2];
195  unsigned char cgpio_input_conf[16];
196  unsigned char cgpio_output_conf[16];
197 
198 private:
199  std::string report_type;
200  unsigned char *data_fp;
201  int sv3msg_[16];
202  float trs_msg_[5];
203  float p2p_msg_[5];
204  float rot_msg_[2];
205 };
206 
207 #endif // XARM_REPORT_DATA_H_
~ReportDataDevelop(void)
Definition: report_data.cc:23
int flush_data(unsigned char *rx_data)
Definition: report_data.cc:25
int collision_detection
Definition: report_data.h:183
float p2p_velomax_
Definition: report_data.h:107
float trs_velomax_
Definition: report_data.h:102
unsigned char * data_fp
Definition: report_data.h:200
float trs_accmin_
Definition: report_data.h:99
std::string report_type
Definition: report_data.h:199
void print_data(void)
Definition: report_data.cc:43
float p2p_velomin_
Definition: report_data.h:106
int collision_tool_type
Definition: report_data.h:184
float trs_velomin_
Definition: report_data.h:101


xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23