继续完成 web-rtcp-5axis-sim-plan

结论:完成 LinuxCNC kinematics WASM ABI 覆盖,并将 web-rtcp-5axis-sim-plan 的 RTCP frame/boundary adapter 接到 xyzac-trt kinematics SDK;Node、build、browser smoke 验证通过。
This commit is contained in:
2026-06-21 16:44:29 +08:00
parent a6eda3fbff
commit 626bcfe8e3
101 changed files with 101586 additions and 770 deletions

View File

@@ -0,0 +1,110 @@
export const xyzacTrtPyvcpPanelSchema = {
id: "xyzac-trt-switchkins-pyvcp",
profileId: "xyzac-trt",
title: "SWITCHKINS",
sourceXmlPath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt.xml",
postguiHalPath: "configs/sim/axis/vismach/5axis/table-rotary-tilting/switchkins_postgui.hal",
boundary: "pyvcp_hal_schema_reference_only",
promotionAllowed: false,
groups: [
{
id: "switchkins-mode",
type: "vbox",
label: "SWITCHKINS",
controls: [
{
id: "kinstype-legends",
type: "multilabel",
legends: ["0:IDENTITY", "1: XYZAC ", "2: USERK "],
halNets: [
{
signal: "kinstype.is-0",
source: "kinstype.is-0",
target: "pyvcp.multilabel.0.legend0",
},
{
signal: "kinstype.is-1",
source: "kinstype.is-1",
target: "pyvcp.multilabel.0.legend1",
},
{
signal: "kinstype.is-2",
source: "kinstype.is-2",
target: "pyvcp.multilabel.0.legend2",
},
],
},
{
id: "type0-button",
type: "button",
text: "IDENTITY",
halpin: "pyvcp.type0-button",
halNet: "type0-button",
mdiCommandIndex: 0,
mdiCommand: "M429",
webAction: { type: "SET_KINS_TYPE", kinsType: "identity" },
},
{
id: "type1-button",
type: "button",
text: "TCP:XYZAC",
halpin: "pyvcp.type1-button",
halNet: "type1-button",
mdiCommandIndex: 1,
mdiCommand: "M428",
webAction: { type: "SET_KINS_TYPE", kinsType: "tcp-xyzac" },
},
{
id: "type2-button",
type: "button",
text: "userk",
halpin: "pyvcp.type2-button",
halNet: "type2-button",
mdiCommandIndex: 2,
mdiCommand: "M430",
webAction: null,
},
],
},
{
id: "vismach-actions",
type: "vbox",
controls: [
{
id: "vismach-clear",
type: "button",
text: "vismach-clear",
halpin: "pyvcp.vismach-clear",
halNet: "vismach-clear",
target: "vismach.plotclear",
webAction: { type: "CLEAR_PREVIEW" },
},
],
},
],
};
export function createPyvcpHalBindingSummary(schema = xyzacTrtPyvcpPanelSchema) {
const controls = schema.groups.flatMap((group) => group.controls);
const buttons = controls.filter((control) => control.type === "button");
const halNets = [
...controls.flatMap((control) => control.halNets || []),
...buttons.map((button) => ({
signal: button.halNet,
source: button.halpin,
target: button.target || `halui.mdi-command-${String(button.mdiCommandIndex).padStart(2, "0")}`,
})),
];
return {
schemaId: schema.id,
profileId: schema.profileId,
boundary: schema.boundary,
promotionAllowed: schema.promotionAllowed,
controlCount: controls.length,
buttonCount: buttons.length,
halNetCount: halNets.length,
mdiCommands: buttons.filter((button) => button.mdiCommand).map((button) => button.mdiCommand),
halNets,
};
}