From f1c518884f837abf1ca9edfaa017026fcd56ad2d Mon Sep 17 00:00:00 2001 From: Kai Kriegel Date: Tue, 15 Dec 2020 22:43:31 +0000 Subject: [PATCH] Feature/machine properties --- api.capnp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api.capnp b/api.capnp index 54ce797..0046740 100644 --- a/api.capnp +++ b/api.capnp @@ -84,11 +84,22 @@ struct Machine { responsible @3 :User; # This field may be NULL if nobody is using the machine } + + struct PropertyMap { + properties @0 :List(Property); + struct Property { + key @0 :Text; + value @1 :Text; + } + } read @0 :Read; interface Read $CSharp.name("ReadInterface") { info @0 () -> ( minfo :MInfo, dummy :UInt8 = 0 ); # Check the state of a machine. + + getProperties @1 () -> (properties :PropertyMap, dummy :UInt8 = 0 ); + # Read Machine Properties } write @1 :Write; @@ -106,6 +117,12 @@ struct Machine { reserve @1 () -> ( ret :GiveBack ); # Try to reserve a machine. returns a NULL-ptr if the user does not have the required # permissions to reserve this machine + + setProperties @2 (properties :PropertyMap) -> (); + # Write all Machine Properties + + setProperty @3 (property :PropertyMap.Property) -> (); + # Write ONE Machine Property identified by it's key }