60#ifndef PROTOCORE_FANUC_J519_H
61#define PROTOCORE_FANUC_J519_H
65#if PROTOCORE_ENABLE_FANUC_J519
70#define PROTOCORE_J519_UDP_PORT 60015
73#define PROTOCORE_J519_AXES 9
76#define PROTOCORE_J519_THRESHOLDS 20
82 PROTOCORE_J519_LEN_START = 8,
83 PROTOCORE_J519_LEN_MOTION = 64,
84 PROTOCORE_J519_LEN_STOP = 8,
85 PROTOCORE_J519_LEN_REQUEST = 16,
86 PROTOCORE_J519_LEN_STATUS = 132,
87 PROTOCORE_J519_LEN_ACK = 184,
96 J519_START_OR_STATUS = 0,
99 J519_REQUEST_OR_ACK = 3,
105 J519_STYLE_CARTESIAN = 0,
106 J519_STYLE_JOINT = 1,
132 J519_THR_VELOCITY = 0,
133 J519_THR_ACCELERATION = 1,
141 J519_STATUS_READY = 0x01,
142 J519_STATUS_CMD_RECEIVED = 0x02,
143 J519_STATUS_SYSRDY = 0x04,
144 J519_STATUS_IN_MOTION = 0x08,
151 uint32_t sequence_no;
153 uint8_t read_io_type;
154 uint16_t read_io_index;
155 uint16_t read_io_mask;
157 uint8_t write_io_type;
158 uint16_t write_io_index;
159 uint16_t write_io_mask;
160 uint16_t write_io_value;
161 float joint_data[PROTOCORE_J519_AXES];
168 uint32_t sequence_no;
170 uint8_t read_io_type;
171 uint16_t read_io_index;
172 uint16_t read_io_mask;
173 uint16_t read_io_value;
175 float cartesian_pose[PROTOCORE_J519_AXES];
176 float joint_pose[PROTOCORE_J519_AXES];
177 float motor_current[PROTOCORE_J519_AXES];
185 uint32_t threshold_type;
193 uint32_t threshold_type;
194 uint32_t max_cart_speed;
196 float threshold_no_load[PROTOCORE_J519_THRESHOLDS];
197 float threshold_max_load[PROTOCORE_J519_THRESHOLDS];
210proto_bool protocore_j519_peek(
const uint8_t *buf,
size_t len, uint32_t *type, uint32_t *version_no);
215size_t protocore_j519_build_start(uint8_t *buf,
size_t cap, uint32_t version_no);
218size_t protocore_j519_build_stop(uint8_t *buf,
size_t cap, uint32_t version_no);
221size_t protocore_j519_build_motion(uint8_t *buf,
size_t cap,
const J519MotionCommand *cmd);
224size_t protocore_j519_build_request(uint8_t *buf,
size_t cap,
const J519Request *req);
230proto_bool protocore_j519_parse_motion(
const uint8_t *buf,
size_t len, J519MotionCommand *out);
233proto_bool protocore_j519_parse_request(
const uint8_t *buf,
size_t len, J519Request *out);
238size_t protocore_j519_build_status(uint8_t *buf,
size_t cap,
const J519RobotStatus *st);
241size_t protocore_j519_build_ack(uint8_t *buf,
size_t cap,
const J519Ack *ack);
247proto_bool protocore_j519_parse_status(
const uint8_t *buf,
size_t len, J519RobotStatus *out);
250proto_bool protocore_j519_parse_ack(
const uint8_t *buf,
size_t len, J519Ack *out);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS