17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 22:49:16 +01:00

First implementation of graph vehicles

This commit is contained in:
2026-10-14 12:20:49 +02:00
parent 70abf879b3
commit 1ef465264c
121 changed files with 12292 additions and 729 deletions

View File

@@ -0,0 +1,10 @@
// nested module of modules/latch.vhgm
{
"format": "maszyna-vehicle-graph", "version": 2,
"nodes": [
{ "id": "a", "type": "module.input", "params": { "type": "bool" } },
{ "id": "not", "type": "logic.not" },
{ "id": "q", "type": "module.output", "params": { "type": "bool" } }
],
"connections": [ { "from": "a.out", "to": "not.a" }, { "from": "not.q", "to": "q.in" } ]
}

View File

@@ -0,0 +1,25 @@
// module for tests/module.vhg: a latching relay with an inverted output (from a nested module), an input
// passed straight to an output, and a nested module with its input left unconnected (it sees the default value)
{
"format": "maszyna-vehicle-graph", "version": 2,
"vehicle": { "name": "latch" },
"nodes": [
{ "id": "on", "type": "module.input", "params": { "type": "bool", "label": "close" } },
{ "id": "off", "type": "module.input", "params": { "type": "bool", "label": "open" } },
{ "id": "note", "type": "module.input", "params": { "type": "float", "default": 2 } },
{ "id": "sr", "type": "logic.sr" },
{ "id": "inv", "type": "module", "params": { "file": "inverter.vhgm" } },
{ "id": "inv2", "type": "module", "params": { "file": "inverter.vhgm" } },
{ "id": "q", "type": "module.output", "params": { "type": "bool" } },
{ "id": "nq", "type": "module.output", "params": { "type": "bool" } },
{ "id": "echo", "type": "module.output", "params": { "type": "float" } },
{ "id": "nq2", "type": "module.output", "params": { "type": "bool" } }
],
"connections": [
{ "from": "on.out", "to": "sr.s" }, { "from": "off.out", "to": "sr.r" },
{ "from": "sr.q", "to": "q.in" },
{ "from": "sr.q", "to": "inv.a" }, { "from": "inv.q", "to": "nq.in" },
{ "from": "note.out", "to": "echo.in" },
{ "from": "inv2.q", "to": "nq2.in" }
]
}

View File

@@ -0,0 +1,2 @@
{ "format": "maszyna-vehicle-graph", "version": 2,
"nodes": [ { "id": "again", "type": "module", "params": { "file": "self.vhgm" } } ] }