diff --git a/README.md b/README.md index 9c7dea3..d1ad897 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,8 @@ SPDX-License-Identifier: GPL-2.0-or-later # Middleware for Revolution Pi This middleware will support D-Bus as IPC interface. + +## D-Bus + +See [docs/dbus.md](docs/dbus.md) for an overview of the standard D-Bus data +types. diff --git a/docs/dbus.md b/docs/dbus.md new file mode 100644 index 0000000..d282894 --- /dev/null +++ b/docs/dbus.md @@ -0,0 +1,51 @@ + + +# D-Bus + +## Datentypen + +Hier ist eine **Liste der standardisierten D‑Bus-Datentypen** (Signaturen), wie +sie u. a. in Introspection/XML (`type="..."`) verwendet werden. + +## Basis-Typen (Basic Types) + +| Signatur | Bedeutung | +|----------|-------------------------------------| +| `y` | Byte (unsigned 8-bit) | +| `b` | Boolean | +| `n` | Int16 (signed) | +| `q` | UInt16 (unsigned) | +| `i` | Int32 (signed) | +| `u` | UInt32 (unsigned) | +| `x` | Int64 (signed) | +| `t` | UInt64 (unsigned) | +| `d` | Double (IEEE 754) | +| `s` | String (UTF‑8) | +| `o` | Object Path | +| `g` | Signature (Typ-Signatur als String) | + +## Container-Typen (Compound/Container) + +| Form | Bedeutung | Beispiel | +|------------|-------------------------------------------------|---------------------------------| +| `aX` | Array von `X` | `as` = Array von Strings | +| `(XYZ...)` | Struct/Tupel | `(is)` = (Int32, String) | +| `{KV}` | Dict-Entry (nur innerhalb eines Arrays erlaubt) | `a{sv}` = Dict String → Variant | + +## Spezial-Typ + +| Signatur | Bedeutung | +|----------|---------------------------------------------------| +| `v` | Variant (beliebiger Typ, zur Laufzeit festgelegt) | + +## Häufig genutzte Kombis (Praxis) + +- `as` → Liste von Strings +- `ao` → Liste von Object Paths +- `a{sv}` → „Properties“-Map (String → Variant), sehr verbreitet bei + `org.freedesktop.DBus.Properties` +- `a{ss}` → String → String Map