flowrs-engine/e2e/fixtures/apps/station_call_tree.flowrs
flowRS 2b6f30d348 flowRS engine, cut from flowRS f907e0756a7c
Built alone from an empty CARGO_HOME, its tests passed, and flowrsc checked, ran and exported a
document from the conformance corpus; the export built alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 08:54:33 -05:00

946 lines
No EOL
19 KiB
Text

{
"format": 2,
"generator": "flowrs 0.1.0",
"nodes": [
{
"id": 0,
"type_id": "FloatLiteral",
"properties": {
"unit": "A",
"value": "0.5"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "Call",
"properties": {
"fn": "station@1"
},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 2,
"type_id": "io.print",
"properties": {},
"position": [
500.0,
60.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 0,
"from_port": "value",
"to_node": 1,
"to_port": "load",
"mode": "Move"
},
{
"id": 1,
"from_node": 1,
"from_port": "passed",
"to_node": 2,
"to_port": "value",
"mode": "Move"
}
],
"groups": [],
"functions": [
{
"name": "dmm_driver.read_dc_volts",
"version": 1,
"nodes": [
{
"id": 0,
"type_id": "Call",
"properties": {
"command": "meas:volt:dc?",
"fn": "scpi.query_f64@1"
},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "FunctionInput",
"properties": {
"name": "setpoint",
"type": "f64"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 2,
"type_id": "FunctionInput",
"properties": {
"name": "load",
"type": "f64"
},
"position": [
60.0,
170.0
],
"group": null
},
{
"id": 3,
"type_id": "FunctionOutput",
"properties": {
"name": "volts",
"type": "f64@{unit=V}"
},
"position": [
500.0,
60.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 1,
"from_port": "value",
"to_node": 0,
"to_port": "setpoint",
"mode": "Move"
},
{
"id": 1,
"from_node": 2,
"from_port": "value",
"to_node": 0,
"to_port": "load",
"mode": "Move"
},
{
"id": 2,
"from_node": 0,
"from_port": "value",
"to_node": 3,
"to_port": "value",
"mode": "Move"
}
],
"groups": []
},
{
"name": "run_step",
"version": 1,
"nodes": [
{
"id": 0,
"type_id": "Call",
"properties": {
"fn": "settle@1",
"tolerance": "0.2"
},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "logic.compare",
"properties": {
"op": ">="
},
"position": [
500.0,
60.0
],
"group": null
},
{
"id": 2,
"type_id": "logic.compare",
"properties": {
"op": "<="
},
"position": [
500.0,
170.0
],
"group": null
},
{
"id": 3,
"type_id": "logic.and",
"properties": {},
"position": [
720.0,
60.0
],
"group": null
},
{
"id": 4,
"type_id": "logic.and",
"properties": {},
"position": [
940.0,
60.0
],
"group": null
},
{
"id": 5,
"type_id": "FunctionInput",
"properties": {
"name": "voltage",
"type": "f64"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 6,
"type_id": "FunctionInput",
"properties": {
"name": "low",
"type": "f64"
},
"position": [
60.0,
170.0
],
"group": null
},
{
"id": 7,
"type_id": "FunctionInput",
"properties": {
"name": "high",
"type": "f64"
},
"position": [
60.0,
280.0
],
"group": null
},
{
"id": 8,
"type_id": "FunctionInput",
"properties": {
"name": "load",
"type": "f64"
},
"position": [
60.0,
390.0
],
"group": null
},
{
"id": 9,
"type_id": "FunctionOutput",
"properties": {
"name": "value",
"type": "f64"
},
"position": [
500.0,
280.0
],
"group": null
},
{
"id": 10,
"type_id": "FunctionOutput",
"properties": {
"name": "passed",
"type": "bool"
},
"position": [
1160.0,
60.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 5,
"from_port": "value",
"to_node": 0,
"to_port": "target",
"mode": "Copy"
},
{
"id": 1,
"from_node": 5,
"from_port": "value",
"to_node": 0,
"to_port": "setpoint",
"mode": "Copy"
},
{
"id": 2,
"from_node": 8,
"from_port": "value",
"to_node": 0,
"to_port": "load",
"mode": "Move"
},
{
"id": 3,
"from_node": 0,
"from_port": "value",
"to_node": 1,
"to_port": "a",
"mode": "Copy"
},
{
"id": 4,
"from_node": 6,
"from_port": "value",
"to_node": 1,
"to_port": "b",
"mode": "Move"
},
{
"id": 5,
"from_node": 0,
"from_port": "value",
"to_node": 2,
"to_port": "a",
"mode": "Copy"
},
{
"id": 6,
"from_node": 7,
"from_port": "value",
"to_node": 2,
"to_port": "b",
"mode": "Move"
},
{
"id": 7,
"from_node": 1,
"from_port": "result",
"to_node": 3,
"to_port": "a",
"mode": "Move"
},
{
"id": 8,
"from_node": 2,
"from_port": "result",
"to_node": 3,
"to_port": "b",
"mode": "Move"
},
{
"id": 9,
"from_node": 3,
"from_port": "result",
"to_node": 4,
"to_port": "a",
"mode": "Move"
},
{
"id": 10,
"from_node": 0,
"from_port": "settled",
"to_node": 4,
"to_port": "b",
"mode": "Move"
},
{
"id": 11,
"from_node": 0,
"from_port": "value",
"to_node": 9,
"to_port": "value",
"mode": "Copy"
},
{
"id": 12,
"from_node": 4,
"from_port": "result",
"to_node": 10,
"to_port": "value",
"mode": "Move"
}
],
"groups": []
},
{
"name": "scpi.query_f64",
"version": 1,
"nodes": [
{
"id": 0,
"type_id": "math.mul",
"properties": {},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "math.sub",
"properties": {},
"position": [
500.0,
60.0
],
"group": null
},
{
"id": 2,
"type_id": "text.case",
"properties": {
"mode": "upper"
},
"position": [
280.0,
170.0
],
"group": null
},
{
"id": 3,
"type_id": "FunctionInput",
"properties": {
"name": "command",
"type": "String"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 4,
"type_id": "FunctionInput",
"properties": {
"name": "setpoint",
"type": "f64"
},
"position": [
60.0,
170.0
],
"group": null
},
{
"id": 5,
"type_id": "FunctionInput",
"properties": {
"name": "load",
"type": "f64"
},
"position": [
60.0,
280.0
],
"group": null
},
{
"id": 6,
"type_id": "FunctionInput",
"properties": {
"default": "0.05",
"name": "r_out",
"type": "f64"
},
"position": [
60.0,
390.0
],
"group": null
},
{
"id": 7,
"type_id": "FunctionOutput",
"properties": {
"name": "value",
"type": "f64"
},
"position": [
720.0,
60.0
],
"group": null
},
{
"id": 8,
"type_id": "FunctionOutput",
"properties": {
"name": "sent",
"type": "String"
},
"position": [
500.0,
170.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 5,
"from_port": "value",
"to_node": 0,
"to_port": "a",
"mode": "Move"
},
{
"id": 1,
"from_node": 6,
"from_port": "value",
"to_node": 0,
"to_port": "b",
"mode": "Move"
},
{
"id": 2,
"from_node": 4,
"from_port": "value",
"to_node": 1,
"to_port": "a",
"mode": "Move"
},
{
"id": 3,
"from_node": 0,
"from_port": "product",
"to_node": 1,
"to_port": "b",
"mode": "Move"
},
{
"id": 4,
"from_node": 3,
"from_port": "value",
"to_node": 2,
"to_port": "text",
"mode": "Move"
},
{
"id": 5,
"from_node": 1,
"from_port": "diff",
"to_node": 7,
"to_port": "value",
"mode": "Move"
},
{
"id": 6,
"from_node": 2,
"from_port": "out",
"to_node": 8,
"to_port": "value",
"mode": "Move"
}
],
"groups": []
},
{
"name": "settle",
"version": 1,
"nodes": [
{
"id": 0,
"type_id": "Call",
"properties": {
"fn": "dmm_driver.read_dc_volts@1"
},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "math.sub",
"properties": {},
"position": [
500.0,
60.0
],
"group": null
},
{
"id": 2,
"type_id": "math.abs",
"properties": {},
"position": [
720.0,
60.0
],
"group": null
},
{
"id": 3,
"type_id": "logic.compare",
"properties": {
"op": "<="
},
"position": [
940.0,
60.0
],
"group": null
},
{
"id": 4,
"type_id": "FunctionInput",
"properties": {
"name": "target",
"type": "f64"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 5,
"type_id": "FunctionInput",
"properties": {
"name": "tolerance",
"type": "f64"
},
"position": [
60.0,
170.0
],
"group": null
},
{
"id": 6,
"type_id": "FunctionInput",
"properties": {
"name": "setpoint",
"type": "f64"
},
"position": [
60.0,
280.0
],
"group": null
},
{
"id": 7,
"type_id": "FunctionInput",
"properties": {
"name": "load",
"type": "f64"
},
"position": [
60.0,
390.0
],
"group": null
},
{
"id": 8,
"type_id": "FunctionOutput",
"properties": {
"name": "value",
"type": "f64"
},
"position": [
500.0,
170.0
],
"group": null
},
{
"id": 9,
"type_id": "FunctionOutput",
"properties": {
"name": "settled",
"type": "bool"
},
"position": [
1160.0,
60.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 6,
"from_port": "value",
"to_node": 0,
"to_port": "setpoint",
"mode": "Move"
},
{
"id": 1,
"from_node": 7,
"from_port": "value",
"to_node": 0,
"to_port": "load",
"mode": "Move"
},
{
"id": 2,
"from_node": 0,
"from_port": "volts",
"to_node": 1,
"to_port": "a",
"mode": "Copy"
},
{
"id": 3,
"from_node": 4,
"from_port": "value",
"to_node": 1,
"to_port": "b",
"mode": "Move"
},
{
"id": 4,
"from_node": 1,
"from_port": "diff",
"to_node": 2,
"to_port": "value",
"mode": "Move"
},
{
"id": 5,
"from_node": 2,
"from_port": "abs",
"to_node": 3,
"to_port": "a",
"mode": "Move"
},
{
"id": 6,
"from_node": 5,
"from_port": "value",
"to_node": 3,
"to_port": "b",
"mode": "Move"
},
{
"id": 7,
"from_node": 0,
"from_port": "volts",
"to_node": 8,
"to_port": "value",
"mode": "Copy"
},
{
"id": 8,
"from_node": 3,
"from_port": "result",
"to_node": 9,
"to_port": "value",
"mode": "Move"
}
],
"groups": []
},
{
"name": "station",
"version": 1,
"nodes": [
{
"id": 0,
"type_id": "Call",
"properties": {
"fn": "run_step@1",
"high": "3.5",
"low": "3.1",
"voltage": "3.3"
},
"position": [
280.0,
60.0
],
"group": null
},
{
"id": 1,
"type_id": "Call",
"properties": {
"fn": "run_step@1",
"high": "5.25",
"low": "4.75",
"voltage": "5"
},
"position": [
280.0,
170.0
],
"group": null
},
{
"id": 2,
"type_id": "logic.and",
"properties": {},
"position": [
500.0,
60.0
],
"group": null
},
{
"id": 3,
"type_id": "FunctionInput",
"properties": {
"name": "load",
"type": "f64"
},
"position": [
60.0,
60.0
],
"group": null
},
{
"id": 4,
"type_id": "FunctionOutput",
"properties": {
"name": "v1",
"type": "f64"
},
"position": [
500.0,
170.0
],
"group": null
},
{
"id": 5,
"type_id": "FunctionOutput",
"properties": {
"name": "v2",
"type": "f64"
},
"position": [
500.0,
280.0
],
"group": null
},
{
"id": 6,
"type_id": "FunctionOutput",
"properties": {
"name": "passed",
"type": "bool"
},
"position": [
720.0,
60.0
],
"group": null
}
],
"wires": [
{
"id": 0,
"from_node": 3,
"from_port": "value",
"to_node": 0,
"to_port": "load",
"mode": "Copy"
},
{
"id": 1,
"from_node": 3,
"from_port": "value",
"to_node": 1,
"to_port": "load",
"mode": "Copy"
},
{
"id": 2,
"from_node": 0,
"from_port": "passed",
"to_node": 2,
"to_port": "a",
"mode": "Move"
},
{
"id": 3,
"from_node": 1,
"from_port": "passed",
"to_node": 2,
"to_port": "b",
"mode": "Move"
},
{
"id": 4,
"from_node": 0,
"from_port": "value",
"to_node": 4,
"to_port": "value",
"mode": "Move"
},
{
"id": 5,
"from_node": 1,
"from_port": "value",
"to_node": 5,
"to_port": "value",
"mode": "Move"
},
{
"id": 6,
"from_node": 2,
"from_port": "result",
"to_node": 6,
"to_port": "value",
"mode": "Move"
}
],
"groups": []
}
],
"widgets": {
"io.print": "dfec86693a3ed913",
"logic.and": "452e431ed5b782c5",
"logic.compare": "fb701f1dffa99334",
"math.abs": "517265e22e299512",
"math.mul": "c0420ebca1090887",
"math.sub": "ad4ea3d000427e71",
"text.case": "8f53f4f179133ce2"
},
"app": {
"version": "1.0",
"library": "flowrs-app@1",
"source": "",
"title": "A test station as a call tree of graph functions"
}
}