Enforce LinuxCNC WASM XYZAC command authority
This commit is contained in:
@@ -16,6 +16,7 @@ function setup(id) {
|
||||
const send = (kind, operation_id, payload = {}) => session.accept({ ...base, kind, seq: ++seq, operation_id, payload });
|
||||
send("HELLO", "hello"); send("SESSION_ATTACH", "attach");
|
||||
assert.equal(send("LOAD_WORKSPACE", "workspace", { root_path: "/workspace", configuration: toWorkerConfiguration(bundle) }).payload.status, "verified");
|
||||
assert.equal(send("POWER", "power-on", { active: true }).payload.status, "verified");
|
||||
return { session, send };
|
||||
}
|
||||
|
||||
@@ -69,7 +70,8 @@ const estop = mdiCase.send("ESTOP", "mdi-estop", { active: true });
|
||||
assert.equal(estop.kind, "COMMAND_RESULT");
|
||||
assert.equal(estop.payload.task.state, "ESTOP");
|
||||
assert.equal(estop.payload.device_io.source, "wasm_io");
|
||||
const recovered = mdiCase.send("IO_RECOVER", "mdi-recover");
|
||||
mdiCase.send("ESTOP", "mdi-estop-reset", { active: false });
|
||||
const recovered = mdiCase.send("POWER", "mdi-power-after-estop", { active: true });
|
||||
assert.equal(recovered.payload.motion_authority, "wasm");
|
||||
|
||||
console.log(JSON.stringify({ schema: "xyzac-manual-control-rtcp-06.v1", status: "verified", case: CASE, home: { authority: "wasm_home_limit", joints: 5 }, jog: jogRows, boundary: { out_of_range: outOfRange.payload.code, nonfinite_speed: nonFinite.payload.code, following_error: ferror.payload.code }, mdi: "verified", mdi_running_gate: mdiWhileRunning.payload.message_key, estop_recovery: "verified", state_hash: recovered.payload.panel_snapshot.state_hash }));
|
||||
|
||||
Reference in New Issue
Block a user