chore: close wasm status contract work

This commit is contained in:
wangdequan
2026-07-08 09:20:47 -04:00
parent 97732ceb0b
commit e69333972c
69 changed files with 20435 additions and 495 deletions

View File

@@ -17,21 +17,40 @@ enum {
LCMOT_CMD_STEP,
LCMOT_CMD_RESUME,
LCMOT_CMD_ABORT,
LCMOT_CMD_ENABLE,
LCMOT_CMD_DISABLE,
LCMOT_CMD_SET_MOTION_ID,
LCMOT_CMD_SET_AOUT,
LCMOT_CMD_JOINT_HOME,
LCMOT_CMD_JOINT_UNHOME,
LCMOT_CMD_INJECT_ERROR,
LCMOT_CMD_INJECT_SOFT_LIMIT,
};
typedef struct {
int type;
int line;
int axis_index;
int joint_index;
int motion_id;
int motion_type;
int aout_index;
int aout_now;
double target[9];
double distance;
double velocity;
double ini_maxvel;
double acceleration;
double ini_maxjerk;
double analog_value;
double analog_end;
} LcmotCommand;
typedef struct {
int initialized;
int config_num;
int axes;
int joints;
long long cycle;
int program_line;
int motion_type;
@@ -42,19 +61,28 @@ typedef struct {
int stepping;
int id_for_step;
int motion_id;
int next_motion_id;
int has_next_motion_id;
int motion_enabled;
int aborted;
int motion_error;
int on_soft_limit;
int switchkins_type;
double requested_vel;
double current_vel;
double analog_out_03;
double axis_cmd[9];
double axis_fb[9];
double joint_cmd[9];
double joint_fb[9];
LcmotCommand queue[64];
double axis_cmd[LCMOT_MAX_AXES];
double axis_fb[LCMOT_MAX_AXES];
double joint_cmd[LCMOT_MAX_AXES];
double joint_fb[LCMOT_MAX_AXES];
LcmotCommand queue[LCMOT_COMMAND_QUEUE_CAPACITY];
int queue_head;
int queue_tail;
int queue_count;
char errors[8][128];
int error_head;
int error_tail;
int error_count;
} LcmotRuntime;
static LcmotRuntime lcmot_state;
@@ -169,11 +197,11 @@ static int axis_index_from_json(const char *json)
static int queue_push(LcmotCommand command)
{
LcmotRuntime *state = &lcmot_state;
if (state->queue_count >= (int)(sizeof(state->queue) / sizeof(state->queue[0]))) {
if (state->queue_count >= LCMOT_COMMAND_QUEUE_CAPACITY) {
return -1;
}
state->queue[state->queue_tail] = command;
state->queue_tail = (state->queue_tail + 1) % (int)(sizeof(state->queue) / sizeof(state->queue[0]));
state->queue_tail = (state->queue_tail + 1) % LCMOT_COMMAND_QUEUE_CAPACITY;
state->queue_count += 1;
return 0;
}
@@ -185,7 +213,7 @@ static int queue_pop(LcmotCommand *command)
return 0;
}
*command = state->queue[state->queue_head];
state->queue_head = (state->queue_head + 1) % (int)(sizeof(state->queue) / sizeof(state->queue[0]));
state->queue_head = (state->queue_head + 1) % LCMOT_COMMAND_QUEUE_CAPACITY;
state->queue_count -= 1;
return 1;
}
@@ -194,7 +222,66 @@ static int is_motion_command(int type)
{
return type == LCMOT_CMD_LINEAR_MOVE ||
type == LCMOT_CMD_CIRCULAR_MOVE ||
type == LCMOT_CMD_JOG_INCR;
type == LCMOT_CMD_JOG_INCR ||
type == LCMOT_CMD_JOINT_HOME;
}
static int next_command_motion_id(LcmotRuntime *state, int requested_motion_id)
{
int id;
if (requested_motion_id > 0) {
return requested_motion_id;
}
if (state->has_next_motion_id) {
id = state->next_motion_id;
state->has_next_motion_id = 0;
return id;
}
return state->motion_id + 1;
}
static int coordinate_count_from_ini(const char *ini_text)
{
const char *line;
int count = 0;
if (!ini_text) {
return 0;
}
line = strstr(ini_text, "COORDINATES");
if (!line) {
return 0;
}
line = strchr(line, '=');
if (!line) {
return 0;
}
line += 1;
while (*line && *line != '\n' && *line != '\r') {
if ((*line >= 'A' && *line <= 'Z') || (*line >= 'a' && *line <= 'z')) {
count += 1;
while ((*line >= 'A' && *line <= 'Z') || (*line >= 'a' && *line <= 'z')) {
line += 1;
}
continue;
}
line += 1;
}
return count;
}
static void queue_error_message(const char *message)
{
LcmotRuntime *state = &lcmot_state;
if (!message || !state->initialized) {
return;
}
if (state->error_count >= 8) {
state->error_head = (state->error_head + 1) % 8;
state->error_count -= 1;
}
snprintf(state->errors[state->error_tail], sizeof(state->errors[state->error_tail]), "%s", message);
state->error_tail = (state->error_tail + 1) % 8;
state->error_count += 1;
}
static void sync_hal_pins(void)
@@ -271,6 +358,17 @@ static void apply_command(const LcmotCommand *command)
return;
}
switch (command->type) {
case LCMOT_CMD_ENABLE:
state->motion_enabled = 1;
break;
case LCMOT_CMD_DISABLE:
state->motion_enabled = 0;
state->current_vel = 0.0;
break;
case LCMOT_CMD_SET_MOTION_ID:
state->next_motion_id = command->motion_id;
state->has_next_motion_id = 1;
break;
case LCMOT_CMD_PAUSE:
state->paused = 1;
state->stepping = 0;
@@ -300,16 +398,56 @@ static void apply_command(const LcmotCommand *command)
state->queue_head = 0;
state->queue_tail = 0;
state->queue_count = 0;
queue_error_message("MOTION_ABORTED");
break;
case LCMOT_CMD_INJECT_ERROR:
state->motion_error = 1;
state->current_vel = 0.0;
state->in_position = 1;
queue_error_message("MOTION_ERROR");
break;
case LCMOT_CMD_INJECT_SOFT_LIMIT:
state->on_soft_limit = 1;
state->current_vel = 0.0;
state->in_position = 1;
queue_error_message("MOTION_SOFT_LIMIT");
break;
case LCMOT_CMD_SET_AOUT:
state->analog_out_03 = command->analog_value;
state->switchkins_type = (int)lrint(command->analog_value);
break;
case LCMOT_CMD_JOINT_HOME:
i = command->joint_index;
if (i < 0) {
for (i = 0; i < 9; ++i) {
state->axis_cmd[i] = 0.0;
state->axis_fb[i] = 0.0;
state->joint_cmd[i] = 0.0;
state->joint_fb[i] = 0.0;
}
} else if (i < 9) {
state->axis_cmd[i] = 0.0;
state->axis_fb[i] = 0.0;
state->joint_cmd[i] = 0.0;
state->joint_fb[i] = 0.0;
}
state->program_line = command->line > 0 ? command->line : 1;
state->coord_mode = 0;
state->teleop_mode = 0;
state->current_vel = 0.0;
state->in_position = 1;
break;
case LCMOT_CMD_JOINT_UNHOME:
state->current_vel = 0.0;
state->in_position = 1;
break;
case LCMOT_CMD_LINEAR_MOVE:
case LCMOT_CMD_CIRCULAR_MOVE:
state->motion_id += 1;
state->motion_id = next_command_motion_id(state, command->motion_id);
state->program_line = command->line;
state->motion_type = command->type == LCMOT_CMD_CIRCULAR_MOVE ? 2 : 1;
state->motion_type = command->motion_type > 0
? command->motion_type
: (command->type == LCMOT_CMD_CIRCULAR_MOVE ? 2 : 1);
state->coord_mode = 1;
state->teleop_mode = 0;
state->in_position = 0;
@@ -330,7 +468,7 @@ static void apply_command(const LcmotCommand *command)
}
break;
case LCMOT_CMD_JOG_INCR:
state->motion_id += 1;
state->motion_id = next_command_motion_id(state, command->motion_id);
i = command->axis_index;
if (i < 0 || i >= 9) {
i = 0;
@@ -360,10 +498,15 @@ static void apply_command(const LcmotCommand *command)
int lcmot_init_from_ini(const char *ini_path, const char *ini_text)
{
int coordinates;
(void)ini_path;
(void)ini_text;
memset(&lcmot_state, 0, sizeof(lcmot_state));
lcmot_state.initialized = 1;
lcmot_state.config_num = 1;
coordinates = coordinate_count_from_ini(ini_text);
lcmot_state.axes = coordinates > 0 ? coordinates : LCMOT_MAX_AXES;
lcmot_state.joints = lcmot_state.axes;
lcmot_state.motion_enabled = 1;
lcmot_state.in_position = 1;
lcmot_state.coord_mode = 1;
create_motion_hal_pins();
@@ -380,7 +523,15 @@ int lcmot_write_command_json(const char *json)
}
memset(&command, 0, sizeof(command));
command.line = json_int_after(json, "\"line\"", lcmot_state.program_line);
command.motion_id = json_int_after(json, "\"id\"", lcmot_state.next_motion_id);
command.motion_type = json_int_after(json, "\"motionType\"", 0);
command.joint_index = json_int_after(json, "\"joint\"", -1);
command.aout_index = json_int_after(json, "\"index\"", 0);
command.aout_now = json_int_after(json, "\"now\"", 1);
command.velocity = json_number_after(json, "\"velocity\"", 60.0);
command.ini_maxvel = json_number_after(json, "\"iniMaxVel\"", command.velocity);
command.acceleration = json_number_after(json, "\"acceleration\"", 0.0);
command.ini_maxjerk = json_number_after(json, "\"iniMaxJerk\"", 0.0);
for (i = 0; i < 9; ++i) {
command.target[i] = lcmot_state.axis_cmd[i];
}
@@ -393,6 +544,7 @@ int lcmot_write_command_json(const char *json)
command.distance = json_number_after(json, "\"distance\"", 0.0);
command.axis_index = axis_index_from_json(json);
command.analog_value = json_number_after(json, "\"value\"", lcmot_state.analog_out_03);
command.analog_end = json_number_after(json, "\"end\"", command.analog_value);
if (contains_token(json, "EMC_TRAJ_LINEAR_MOVE") || contains_token(json, "EMCMOT_SET_LINE")) {
command.type = LCMOT_CMD_LINEAR_MOVE;
@@ -400,6 +552,10 @@ int lcmot_write_command_json(const char *json)
command.type = LCMOT_CMD_CIRCULAR_MOVE;
} else if (contains_token(json, "EMC_JOG_INCR") || contains_token(json, "EMCMOT_JOG_INCR")) {
command.type = LCMOT_CMD_JOG_INCR;
} else if (contains_token(json, "EMCMOT_JOINT_HOME") || contains_token(json, "EMC_JOINT_HOME")) {
command.type = LCMOT_CMD_JOINT_HOME;
} else if (contains_token(json, "EMCMOT_JOINT_UNHOME") || contains_token(json, "EMC_JOINT_UNHOME")) {
command.type = LCMOT_CMD_JOINT_UNHOME;
} else if (contains_token(json, "EMC_TRAJ_PAUSE") || contains_token(json, "EMCMOT_PAUSE")) {
command.type = LCMOT_CMD_PAUSE;
} else if (contains_token(json, "EMC_TRAJ_STEP") || contains_token(json, "EMCMOT_STEP")) {
@@ -408,15 +564,31 @@ int lcmot_write_command_json(const char *json)
command.type = LCMOT_CMD_RESUME;
} else if (contains_token(json, "EMC_TRAJ_ABORT") || contains_token(json, "EMCMOT_ABORT")) {
command.type = LCMOT_CMD_ABORT;
} else if (contains_token(json, "EMC_TRAJ_ENABLE") || contains_token(json, "EMCMOT_ENABLE")) {
command.type = LCMOT_CMD_ENABLE;
} else if (contains_token(json, "EMC_TRAJ_DISABLE") || contains_token(json, "EMCMOT_DISABLE")) {
command.type = LCMOT_CMD_DISABLE;
} else if (contains_token(json, "EMC_TRAJ_SET_MOTION_ID") || contains_token(json, "EMCMOT_SET_MOTION_ID")) {
command.type = LCMOT_CMD_SET_MOTION_ID;
} else if (contains_token(json, "EMCMOT_SET_AOUT") || contains_token(json, "SET_AOUT")) {
command.type = LCMOT_CMD_SET_AOUT;
} else if (contains_token(json, "EMCMOT_INJECT_ERROR")) {
command.type = LCMOT_CMD_INJECT_ERROR;
} else if (contains_token(json, "EMCMOT_INJECT_SOFT_LIMIT")) {
command.type = LCMOT_CMD_INJECT_SOFT_LIMIT;
} else {
return -1;
}
if (command.type == LCMOT_CMD_PAUSE ||
command.type == LCMOT_CMD_STEP ||
command.type == LCMOT_CMD_RESUME ||
command.type == LCMOT_CMD_ABORT) {
command.type == LCMOT_CMD_ABORT ||
command.type == LCMOT_CMD_ENABLE ||
command.type == LCMOT_CMD_DISABLE ||
command.type == LCMOT_CMD_SET_MOTION_ID ||
command.type == LCMOT_CMD_JOINT_UNHOME ||
command.type == LCMOT_CMD_INJECT_ERROR ||
command.type == LCMOT_CMD_INJECT_SOFT_LIMIT) {
apply_command(&command);
sync_hal_pins();
return 0;
@@ -424,6 +596,104 @@ int lcmot_write_command_json(const char *json)
return queue_push(command);
}
int lcmot_write_jog_incr(int axis, int joint, double distance, double velocity, int motion_id)
{
LcmotCommand command;
if (!lcmot_state.initialized) {
return -1;
}
memset(&command, 0, sizeof(command));
command.type = LCMOT_CMD_JOG_INCR;
command.axis_index = axis;
command.joint_index = joint;
command.distance = distance;
command.velocity = velocity;
command.motion_id = motion_id;
return queue_push(command);
}
int lcmot_write_joint_home(int joint)
{
LcmotCommand command;
if (!lcmot_state.initialized) {
return -1;
}
memset(&command, 0, sizeof(command));
command.type = LCMOT_CMD_JOINT_HOME;
command.line = 1;
command.joint_index = joint;
return queue_push(command);
}
int lcmot_write_joint_unhome(int joint)
{
LcmotCommand command;
if (!lcmot_state.initialized) {
return -1;
}
memset(&command, 0, sizeof(command));
command.type = LCMOT_CMD_JOINT_UNHOME;
command.joint_index = joint;
apply_command(&command);
sync_hal_pins();
return 0;
}
int lcmot_write_aout(int index, double start, double end, int now)
{
LcmotCommand command;
if (!lcmot_state.initialized) {
return -1;
}
memset(&command, 0, sizeof(command));
command.type = LCMOT_CMD_SET_AOUT;
command.aout_index = index;
command.aout_now = now;
command.analog_value = start;
command.analog_end = end;
return queue_push(command);
}
int lcmot_write_linear_move(int line,
int motion_type,
int motion_id,
double x,
double y,
double z,
double a,
double b,
double c,
double velocity,
double ini_maxvel,
double acceleration,
double ini_maxjerk)
{
int i;
LcmotCommand command;
if (!lcmot_state.initialized) {
return -1;
}
memset(&command, 0, sizeof(command));
command.type = LCMOT_CMD_LINEAR_MOVE;
command.line = line;
command.motion_type = motion_type;
command.motion_id = motion_id;
command.velocity = velocity;
command.ini_maxvel = ini_maxvel;
command.acceleration = acceleration;
command.ini_maxjerk = ini_maxjerk;
for (i = 0; i < 9; ++i) {
command.target[i] = lcmot_state.axis_cmd[i];
}
command.target[0] = x;
command.target[1] = y;
command.target[2] = z;
command.target[3] = a;
command.target[4] = b;
command.target[5] = c;
return queue_push(command);
}
int lcmot_step_servo(long period_ns, int cycles)
{
int i;
@@ -433,7 +703,8 @@ int lcmot_step_servo(long period_ns, int cycles)
}
for (i = 0; i < cycles; ++i) {
lcmot_state.cycle += 1;
if (!lcmot_state.aborted && lcmot_state.queue_count > 0) {
if (!lcmot_state.aborted && !lcmot_state.motion_error && !lcmot_state.on_soft_limit &&
lcmot_state.queue_count > 0) {
command = lcmot_state.queue[lcmot_state.queue_head];
if (!lcmot_state.paused ||
(lcmot_state.stepping && is_motion_command(command.type)) ||
@@ -450,52 +721,140 @@ int lcmot_step_servo(long period_ns, int cycles)
return 0;
}
int lcmot_read_status_snapshot(LcmotStatusSnapshot *snapshot)
{
int i;
LcmotRuntime *state = &lcmot_state;
if (!snapshot || !state->initialized) {
return -1;
}
memset(snapshot, 0, sizeof(*snapshot));
snapshot->cycle = state->cycle;
snapshot->program_line = state->program_line;
snapshot->motion_type = state->motion_type;
snapshot->coord_mode = state->coord_mode;
snapshot->teleop_mode = state->teleop_mode;
snapshot->in_position = state->in_position;
snapshot->paused = state->paused;
snapshot->stepping = state->stepping;
snapshot->id_for_step = state->id_for_step;
snapshot->motion_id = state->motion_id;
snapshot->aborted = state->aborted;
snapshot->motion_error = state->motion_error;
snapshot->on_soft_limit = state->on_soft_limit;
snapshot->motion_enabled = state->motion_enabled;
snapshot->next_motion_id = state->next_motion_id;
snapshot->status = (state->aborted || state->motion_error || state->on_soft_limit)
? 2
: (state->queue_count > 0 || !state->in_position ? 1 : 0);
snapshot->queue_count = state->queue_count;
snapshot->queue_capacity = LCMOT_COMMAND_QUEUE_CAPACITY;
snapshot->queue_full = state->queue_count >= LCMOT_COMMAND_QUEUE_CAPACITY;
snapshot->active_depth = state->in_position ? 0 : 1;
snapshot->command_queue_depth = state->queue_count;
snapshot->switchkins_type = state->switchkins_type;
snapshot->requested_vel = state->requested_vel;
snapshot->current_vel = state->current_vel;
snapshot->analog_out_03 = state->analog_out_03;
for (i = 0; i < LCMOT_MAX_AXES; ++i) {
snapshot->axis_cmd[i] = state->axis_cmd[i];
snapshot->axis_fb[i] = state->axis_fb[i];
snapshot->joint_cmd[i] = state->joint_cmd[i];
snapshot->joint_fb[i] = state->joint_fb[i];
}
return 0;
}
int lcmot_read_config_snapshot(LcmotConfigSnapshot *snapshot)
{
int i;
LcmotRuntime *state = &lcmot_state;
if (!snapshot || !state->initialized) {
return -1;
}
memset(snapshot, 0, sizeof(*snapshot));
snapshot->config_num = state->config_num;
snapshot->axes = state->axes;
snapshot->joints = state->joints;
snapshot->queue_capacity = LCMOT_COMMAND_QUEUE_CAPACITY;
snapshot->linear_units = 1.0;
snapshot->angular_units = 1.0;
for (i = 0; i < LCMOT_MAX_AXES; ++i) {
snapshot->axis_min_limit[i] = -1000.0;
snapshot->axis_max_limit[i] = 1000.0;
}
return 0;
}
int lcmot_read_error_message(char *out, int out_len)
{
LcmotRuntime *state = &lcmot_state;
if (!out || out_len <= 0 || !state->initialized || state->error_count <= 0) {
return -1;
}
if (write_output(state->errors[state->error_head], out, out_len) != 0) {
return -1;
}
state->error_head = (state->error_head + 1) % 8;
state->error_count -= 1;
return 0;
}
int lcmot_read_status_json(char *out, int out_len)
{
char buffer[4096];
LcmotRuntime *state = &lcmot_state;
LcmotStatusSnapshot snapshot;
if (lcmot_read_status_snapshot(&snapshot) != 0) {
return -1;
}
snprintf(buffer, sizeof(buffer),
"{\"semanticBoundary\":\"linuxcnc_motion_runtime_phase3_minimal\","
"\"motionRuntimeReady\":true,"
"\"nativeHalSyncReady\":false,"
"\"cycle\":%lld,"
"\"motion\":{\"programLine\":%d,\"id\":%d,\"motionType\":%d,\"coordMode\":%d,"
"\"teleopMode\":%d,\"inPosition\":%s,\"paused\":%s,\"aborted\":%s,"
"\"stepping\":%s,\"idForStep\":%d,\"motionId\":%d,"
"\"motion\":{\"programLine\":%d,\"id\":%d,\"enabled\":%s,\"nextMotionId\":%d,"
"\"motionType\":%d,\"coordMode\":%d,"
"\"teleopMode\":%d,\"status\":%d,\"inPosition\":%s,\"paused\":%s,\"aborted\":%s,"
"\"motionError\":%s,\"onSoftLimit\":%s,\"stepping\":%s,\"idForStep\":%d,\"motionId\":%d,"
"\"switchkinsType\":%d,\"requestedVel\":%.17g,\"currentVel\":%.17g,"
"\"queueDepth\":%d,\"activeDepth\":%d,\"commandQueueDepth\":%d},"
"\"axis\":{\"x\":%.17g,\"y\":%.17g,\"z\":%.17g,\"a\":%.17g,\"b\":%.17g,\"c\":%.17g},"
"\"joint0\":{\"motorPosCmd\":%.17g,\"motorPosFb\":%.17g},"
"\"queueDepth\":%d,\"activeDepth\":%d,\"commandQueueDepth\":%d}",
state->cycle,
state->program_line,
state->motion_id,
state->motion_type,
state->coord_mode,
state->teleop_mode,
state->in_position ? "true" : "false",
state->paused ? "true" : "false",
state->aborted ? "true" : "false",
state->stepping ? "true" : "false",
state->id_for_step,
state->motion_id,
state->switchkins_type,
state->requested_vel,
state->current_vel,
state->queue_count,
state->in_position ? 0 : 1,
state->queue_count,
state->axis_fb[0],
state->axis_fb[1],
state->axis_fb[2],
state->axis_fb[3],
state->axis_fb[4],
state->axis_fb[5],
state->joint_cmd[0],
state->joint_fb[0],
state->queue_count,
state->in_position ? 0 : 1,
state->queue_count);
snapshot.cycle,
snapshot.program_line,
snapshot.motion_id,
snapshot.motion_enabled ? "true" : "false",
snapshot.next_motion_id,
snapshot.motion_type,
snapshot.coord_mode,
snapshot.teleop_mode,
snapshot.status,
snapshot.in_position ? "true" : "false",
snapshot.paused ? "true" : "false",
snapshot.aborted ? "true" : "false",
snapshot.motion_error ? "true" : "false",
snapshot.on_soft_limit ? "true" : "false",
snapshot.stepping ? "true" : "false",
snapshot.id_for_step,
snapshot.motion_id,
snapshot.switchkins_type,
snapshot.requested_vel,
snapshot.current_vel,
snapshot.queue_count,
snapshot.active_depth,
snapshot.command_queue_depth,
snapshot.axis_fb[0],
snapshot.axis_fb[1],
snapshot.axis_fb[2],
snapshot.axis_fb[3],
snapshot.axis_fb[4],
snapshot.axis_fb[5],
snapshot.joint_cmd[0],
snapshot.joint_fb[0],
snapshot.queue_count,
snapshot.active_depth,
snapshot.command_queue_depth);
return write_output(buffer, out, out_len);
}

View File

@@ -4,9 +4,75 @@
extern "C" {
#endif
#define LCMOT_MAX_AXES 9
#define LCMOT_COMMAND_QUEUE_CAPACITY 64
typedef struct {
long long cycle;
int program_line;
int motion_type;
int coord_mode;
int teleop_mode;
int in_position;
int paused;
int stepping;
int id_for_step;
int motion_id;
int aborted;
int status;
int queue_count;
int queue_capacity;
int queue_full;
int active_depth;
int command_queue_depth;
int switchkins_type;
double requested_vel;
double current_vel;
double analog_out_03;
double axis_cmd[LCMOT_MAX_AXES];
double axis_fb[LCMOT_MAX_AXES];
double joint_cmd[LCMOT_MAX_AXES];
double joint_fb[LCMOT_MAX_AXES];
int motion_error;
int on_soft_limit;
int motion_enabled;
int next_motion_id;
} LcmotStatusSnapshot;
typedef struct {
int config_num;
int axes;
int joints;
int queue_capacity;
double linear_units;
double angular_units;
double axis_min_limit[LCMOT_MAX_AXES];
double axis_max_limit[LCMOT_MAX_AXES];
} LcmotConfigSnapshot;
int lcmot_init_from_ini(const char *ini_path, const char *ini_text);
int lcmot_write_command_json(const char *json);
int lcmot_write_linear_move(int line,
int motion_type,
int motion_id,
double x,
double y,
double z,
double a,
double b,
double c,
double velocity,
double ini_maxvel,
double acceleration,
double ini_maxjerk);
int lcmot_write_jog_incr(int axis, int joint, double distance, double velocity, int motion_id);
int lcmot_write_joint_home(int joint);
int lcmot_write_joint_unhome(int joint);
int lcmot_write_aout(int index, double start, double end, int now);
int lcmot_step_servo(long period_ns, int cycles);
int lcmot_read_status_snapshot(LcmotStatusSnapshot *snapshot);
int lcmot_read_config_snapshot(LcmotConfigSnapshot *snapshot);
int lcmot_read_error_message(char *out, int out_len);
int lcmot_read_status_json(char *out, int out_len);
int lcmot_read_hal_snapshot_json(char *out, int out_len);
int lcmot_reset(void);

File diff suppressed because it is too large Load Diff