From 738ba91d4fc1393056e6c94f14a76e812756daf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 15 May 2024 13:50:45 +0200 Subject: [PATCH] rpcmethods: map out combinations of methods for property and file nodes The file and property nodes have optional features that are provided by additional methods. By providing them on that node these features combined provide a different types of nodes. This maps out combinations and provides names to them. --- src/rpcmethods/file.md | 14 +++++++++++++- src/rpcmethods/property.md | 10 ++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/rpcmethods/file.md b/src/rpcmethods/file.md index fd079fe..6810cd7 100644 --- a/src/rpcmethods/file.md +++ b/src/rpcmethods/file.md @@ -13,6 +13,18 @@ method definition in this standard). That is because sometimes you want to allow a different levels of access to different users to same file (such as append to regular user, while write and truncate to super users). +The combination of provided method for file node will define the expected +functionality of the file. For the convinience of reader the following table is +provided with various, but not all, types of file node modes. The methods +`*:stat`, and `*:size` are always provided. + +| | `*:crc` / `*:sha1` | `*:read` | `*:write` | `*:truncate` | `*:append` | +|-------------|--------------------|----------|-----------|--------------|------------| +| Read only | ✔️ | ✔️ | ❌ | ❌ | ❌ | +| Fixed size | ✔️ | ✔️ | ✔️ | ❌ | ❌ | +| Resizable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| Append only | ✔️ | ✔️ | ❌ | ❌ | ✔️ | + ## `*:stat` | Name | SHV Path | Flags | Access | @@ -167,7 +179,7 @@ zero length bytes value is provided. | `write` | Any | | Write | Write is optional method that can be provided if modification of the file over -SHV RCP is allowed. +SHV RPC is allowed. | Parameter | Result | |--------------|--------| diff --git a/src/rpcmethods/property.md b/src/rpcmethods/property.md index 91cebca..7a29ebc 100644 --- a/src/rpcmethods/property.md +++ b/src/rpcmethods/property.md @@ -4,6 +4,16 @@ Property node is a convention where we associate value storage with some SHV path. The value can be received, optionally modified and its change can be signaled. +The type of the property depends on the presence of the methods. The following +table + +| | `*:get` | `*:get:*chng` | `*:set` | +|---------------------------------|---------|---------------|---------| +| Read only | ✔️ | ❌ | ❌ | +| Read only with signaled change | ✔️ | ✔️ | ❌ | +| Read-write | ✔️ | ❌ | ✔️ | +| Read-write with signaled change | ✔️ | ✔️ | ✔️ | + ## `*:get` | Name | SHV Path | Flags | Access |