mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 23:01:47 +01:00
48 lines
1.4 KiB
Cap'n Proto
48 lines
1.4 KiB
Cap'n Proto
@0x82abdb5c1dcf399d;
|
|
|
|
using Rust = import "../programming_language/rust.capnp";
|
|
$Rust.parentModule("schema::traits");
|
|
|
|
using CSharp = import "../programming_language/csharp.capnp";
|
|
$CSharp.namespace("FabAccessAPI.Schema");
|
|
|
|
using import "../traits.capnp".TraitSuper;
|
|
using import "../traits.capnp".TraitError;
|
|
using import "../utils.capnp".Fallible;
|
|
|
|
# OID for this trait: 1.3.6.1.4.1.61783.612.1.4
|
|
# │ │ │ │
|
|
# RLKM UG PEN ╯ │ │ │
|
|
# │ │ │
|
|
# FabAccess subtree ╯ │ │
|
|
# │ │
|
|
# Traits ╯ │
|
|
# │
|
|
# Lockers ╯
|
|
|
|
interface TraitLocker extends (TraitSuper) {
|
|
getState @0 () -> StateLocker;
|
|
engage @1 () -> Fallible(TraitLocker, TraitError(ErrorLocker));
|
|
unengage @2 () -> Fallible(TraitLocker, TraitError(ErrorLocker));
|
|
}
|
|
|
|
struct StateLocker {
|
|
union {
|
|
locked @0 :Void;
|
|
unlocked @1 :Void;
|
|
open @2 :Void;
|
|
unenganged @3 :Void;
|
|
}
|
|
}
|
|
|
|
struct ErrorLocker {
|
|
union {
|
|
isLocked @0 :Void;
|
|
isUnlocked @1 :Void;
|
|
isOpen @2 :Void;
|
|
incomplete @3 :AnyPointer;
|
|
# Object is incomplete in some way.
|
|
# TODO: Define this interface
|
|
}
|
|
}
|