Feature/machine properties

This commit is contained in:
Kai Kriegel 2020-12-15 22:43:31 +00:00
parent 1f846dea38
commit f1c518884f

View File

@ -84,11 +84,22 @@ struct Machine {
responsible @3 :User; # This field may be NULL if nobody is using the 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; read @0 :Read;
interface Read $CSharp.name("ReadInterface") { interface Read $CSharp.name("ReadInterface") {
info @0 () -> ( minfo :MInfo, dummy :UInt8 = 0 ); info @0 () -> ( minfo :MInfo, dummy :UInt8 = 0 );
# Check the state of a machine. # Check the state of a machine.
getProperties @1 () -> (properties :PropertyMap, dummy :UInt8 = 0 );
# Read Machine Properties
} }
write @1 :Write; write @1 :Write;
@ -106,6 +117,12 @@ struct Machine {
reserve @1 () -> ( ret :GiveBack ); reserve @1 () -> ( ret :GiveBack );
# Try to reserve a machine. returns a NULL-ptr if the user does not have the required # Try to reserve a machine. returns a NULL-ptr if the user does not have the required
# permissions to reserve this machine # 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
} }