Main Page
Namespaces
Classes
Files
File List
File Members
include
xarm
core
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>
11
#include "
xarm/core/common/data_type.h
"
12
13
14
class
ReportDataDevelop
{
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];
29
int
total_num_
;
30
};
31
32
33
34
class
ReportDataNorm
{
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];
56
int
collis_sens_
;
57
int
teach_sens_
;
58
float
gravity_dir_[3];
59
int
total_num_
;
60
};
61
62
63
64
class
ReportDataRich
{
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];
86
int
collis_sens_
;
87
int
teach_sens_
;
88
float
gravity_dir_[3];
89
int
total_num_
;
90
91
int
arm_type_
;
92
int
axis_num_
;
93
int
master_id_
;
94
int
slave_id_
;
95
int
motor_tid_
;
96
int
motor_fid_
;
97
unsigned
char
versions_[30];
98
float
trs_jerk_
;
99
float
trs_accmin_
;
100
float
trs_accmax_
;
101
float
trs_velomin_
;
102
float
trs_velomax_
;
103
float
p2p_jerk_
;
104
float
p2p_accmin_
;
105
float
p2p_accmax_
;
106
float
p2p_velomin_
;
107
float
p2p_velomax_
;
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
116
class
XArmReportData
{
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
:
135
int
total_num
;
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];
151
int
collis_sens
;
152
int
teach_sens
;
153
float
gravity_dir[3];
154
155
// rich report data
156
int
arm_type
;
157
int
axis_num
;
158
int
master_id
;
159
int
slave_id
;
160
int
motor_tid
;
161
int
motor_fid
;
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];
182
int
simulation_mode
;
183
int
collision_detection
;
184
int
collision_tool_type
;
185
float
collision_model_params[6];
186
float
voltages[7];
187
float
currents[7];
188
189
int
cgpio_state
;
190
int
cgpio_code
;
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_
ReportDataNorm::mode_
int mode_
Definition:
report_data.h:44
ReportDataRich::err_
int err_
Definition:
report_data.h:82
ReportDataDevelop::total_num_
int total_num_
Definition:
report_data.h:29
ReportDataRich::rot_jerk_
float rot_jerk_
Definition:
report_data.h:108
XArmReportData::trs_accmax
float trs_accmax
Definition:
report_data.h:165
ReportDataNorm::collis_sens_
int collis_sens_
Definition:
report_data.h:56
ReportDataRich::mode_
int mode_
Definition:
report_data.h:74
ReportDataRich::p2p_accmax_
float p2p_accmax_
Definition:
report_data.h:105
ReportDataRich::slave_id_
int slave_id_
Definition:
report_data.h:94
ReportDataDevelop::tau_
float tau_[7]
Definition:
report_data.h:28
ReportDataDevelop::~ReportDataDevelop
~ReportDataDevelop(void)
Definition:
report_data.cc:23
ReportDataNorm
Definition:
report_data.h:34
ReportDataDevelop::flush_data
int flush_data(unsigned char *rx_data)
Definition:
report_data.cc:25
XArmReportData::simulation_mode
int simulation_mode
Definition:
report_data.h:182
ReportDataRich::rot_accmax_
float rot_accmax_
Definition:
report_data.h:109
XArmReportData::collis_sens
int collis_sens
Definition:
report_data.h:151
XArmReportData::count
int count
Definition:
report_data.h:179
ReportDataRich::trs_jerk_
float trs_jerk_
Definition:
report_data.h:98
XArmReportData::collision_detection
int collision_detection
Definition:
report_data.h:183
ReportDataRich::total_num_
int total_num_
Definition:
report_data.h:89
ReportDataRich::motor_fid_
int motor_fid_
Definition:
report_data.h:96
XArmReportData::motor_tid
int motor_tid
Definition:
report_data.h:160
XArmReportData::total_num
int total_num
Definition:
report_data.h:135
ReportDataRich::p2p_velomax_
float p2p_velomax_
Definition:
report_data.h:107
XArmReportData::p2p_velomin
float p2p_velomin
Definition:
report_data.h:171
XArmReportData::mt_able
int mt_able
Definition:
report_data.h:146
ReportDataRich::trs_velomax_
float trs_velomax_
Definition:
report_data.h:102
XArmReportData::slave_id
int slave_id
Definition:
report_data.h:159
ReportDataNorm::cmdnum_
int cmdnum_
Definition:
report_data.h:45
ReportDataDevelop::cmdnum_
int cmdnum_
Definition:
report_data.h:25
XArmReportData::err
int err
Definition:
report_data.h:147
XArmReportData::master_id
int master_id
Definition:
report_data.h:158
ReportDataNorm::teach_sens_
int teach_sens_
Definition:
report_data.h:57
ReportDataRich::p2p_accmin_
float p2p_accmin_
Definition:
report_data.h:104
ReportDataRich::motor_tid_
int motor_tid_
Definition:
report_data.h:95
ReportDataRich::teach_sens_
int teach_sens_
Definition:
report_data.h:87
ReportDataDevelop::runing_
int runing_
Definition:
report_data.h:23
XArmReportData::data_fp
unsigned char * data_fp
Definition:
report_data.h:200
XArmReportData::trs_jerk
float trs_jerk
Definition:
report_data.h:163
ReportDataRich::mt_able_
int mt_able_
Definition:
report_data.h:81
XArmReportData::trs_accmin
float trs_accmin
Definition:
report_data.h:164
ReportDataRich::mt_brake_
int mt_brake_
Definition:
report_data.h:80
ReportDataRich::arm_type_
int arm_type_
Definition:
report_data.h:91
XArmReportData::trs_velomax
float trs_velomax
Definition:
report_data.h:167
ReportDataNorm::total_num_
int total_num_
Definition:
report_data.h:59
XArmReportData::rot_accmax
float rot_accmax
Definition:
report_data.h:174
ReportDataRich::axis_num_
int axis_num_
Definition:
report_data.h:92
XArmReportData::arm_type
int arm_type
Definition:
report_data.h:156
XArmReportData
Definition:
report_data.h:116
ReportDataRich::p2p_jerk_
float p2p_jerk_
Definition:
report_data.h:103
ReportDataRich::cmdnum_
int cmdnum_
Definition:
report_data.h:75
ReportDataDevelop
Definition:
report_data.h:14
ReportDataRich::collis_sens_
int collis_sens_
Definition:
report_data.h:86
XArmReportData::rot_jerk
float rot_jerk
Definition:
report_data.h:173
XArmReportData::cgpio_state
int cgpio_state
Definition:
report_data.h:189
XArmReportData::p2p_jerk
float p2p_jerk
Definition:
report_data.h:168
XArmReportData::motor_fid
int motor_fid
Definition:
report_data.h:161
XArmReportData::p2p_accmin
float p2p_accmin
Definition:
report_data.h:169
XArmReportData::cgpio_code
int cgpio_code
Definition:
report_data.h:190
ReportDataNorm::mt_brake_
int mt_brake_
Definition:
report_data.h:50
ReportDataRich::runing_
int runing_
Definition:
report_data.h:73
XArmReportData::rt_tcp_spd
float rt_tcp_spd
Definition:
report_data.h:177
ReportDataDevelop::pose_
float pose_[6]
Definition:
report_data.h:27
ReportDataRich::master_id_
int master_id_
Definition:
report_data.h:93
ReportDataRich::trs_accmin_
float trs_accmin_
Definition:
report_data.h:99
XArmReportData::p2p_accmax
float p2p_accmax
Definition:
report_data.h:170
XArmReportData::mode
int mode
Definition:
report_data.h:138
ReportDataNorm::mt_able_
int mt_able_
Definition:
report_data.h:51
XArmReportData::report_type
std::string report_type
Definition:
report_data.h:199
ReportDataDevelop::angle_
float angle_[7]
Definition:
report_data.h:26
ReportDataNorm::runing_
int runing_
Definition:
report_data.h:43
XArmReportData::axis_num
int axis_num
Definition:
report_data.h:157
ReportDataDevelop::print_data
void print_data(void)
Definition:
report_data.cc:43
ReportDataRich
Definition:
report_data.h:64
data_type.h
XArmReportData::p2p_velomax
float p2p_velomax
Definition:
report_data.h:172
XArmReportData::trs_velomin
float trs_velomin
Definition:
report_data.h:166
ReportDataRich::p2p_velomin_
float p2p_velomin_
Definition:
report_data.h:106
ReportDataDevelop::mode_
int mode_
Definition:
report_data.h:24
XArmReportData::war
int war
Definition:
report_data.h:148
XArmReportData::collision_tool_type
int collision_tool_type
Definition:
report_data.h:184
ReportDataNorm::err_
int err_
Definition:
report_data.h:52
ReportDataRich::trs_accmax_
float trs_accmax_
Definition:
report_data.h:100
XArmReportData::state
int state
Definition:
report_data.h:137
XArmReportData::teach_sens
int teach_sens
Definition:
report_data.h:152
ReportDataRich::war_
int war_
Definition:
report_data.h:83
ReportDataRich::trs_velomin_
float trs_velomin_
Definition:
report_data.h:101
ReportDataDevelop::ReportDataDevelop
ReportDataDevelop(void)
Definition:
report_data.cc:12
XArmReportData::mt_brake
int mt_brake
Definition:
report_data.h:145
ReportDataNorm::war_
int war_
Definition:
report_data.h:53
XArmReportData::cmdnum
int cmdnum
Definition:
report_data.h:139
xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23