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,
95 J519_START_OR_STATUS = 0,
98 J519_REQUEST_OR_ACK = 3,
103 J519_STYLE_CARTESIAN = 0,
104 J519_STYLE_JOINT = 1,
128 J519_THR_VELOCITY = 0,
129 J519_THR_ACCELERATION = 1,
137 J519_STATUS_READY = 0x01,
138 J519_STATUS_CMD_RECEIVED = 0x02,
139 J519_STATUS_SYSRDY = 0x04,
140 J519_STATUS_IN_MOTION = 0x08,
147 uint32_t sequence_no;
149 uint8_t read_io_type;
150 uint16_t read_io_index;
151 uint16_t read_io_mask;
153 uint8_t write_io_type;
154 uint16_t write_io_index;
155 uint16_t write_io_mask;
156 uint16_t write_io_value;
157 float joint_data[PROTOCORE_J519_AXES];
164 uint32_t sequence_no;
166 uint8_t read_io_type;
167 uint16_t read_io_index;
168 uint16_t read_io_mask;
169 uint16_t read_io_value;
171 float cartesian_pose[PROTOCORE_J519_AXES];
172 float joint_pose[PROTOCORE_J519_AXES];
173 float motor_current[PROTOCORE_J519_AXES];
181 uint32_t threshold_type;
189 uint32_t threshold_type;
190 uint32_t max_cart_speed;
192 float threshold_no_load[PROTOCORE_J519_THRESHOLDS];
193 float threshold_max_load[PROTOCORE_J519_THRESHOLDS];
206embed_bool protocore_j519_peek(
const uint8_t *buf,
size_t len, uint32_t *type, uint32_t *version_no);
211size_t protocore_j519_build_start(uint8_t *buf,
size_t cap, uint32_t version_no);
214size_t protocore_j519_build_stop(uint8_t *buf,
size_t cap, uint32_t version_no);
217size_t protocore_j519_build_motion(uint8_t *buf,
size_t cap,
const J519MotionCommand *cmd);
220size_t protocore_j519_build_request(uint8_t *buf,
size_t cap,
const J519Request *req);
226embed_bool protocore_j519_parse_motion(
const uint8_t *buf,
size_t len, J519MotionCommand *out);
229embed_bool protocore_j519_parse_request(
const uint8_t *buf,
size_t len, J519Request *out);
234size_t protocore_j519_build_status(uint8_t *buf,
size_t cap,
const J519RobotStatus *st);
237size_t protocore_j519_build_ack(uint8_t *buf,
size_t cap,
const J519Ack *ack);
243embed_bool protocore_j519_parse_status(
const uint8_t *buf,
size_t len, J519RobotStatus *out);
246embed_bool protocore_j519_parse_ack(
const uint8_t *buf,
size_t len, J519Ack *out);
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.