changeset 20:225ad84ea39b

Begin capnp RPC test
author Chris Cannam
date Fri, 07 Oct 2016 12:07:17 +0100
parents 77c34ecc4498
children b1ca7b265d24
files capnproto/vamp.capnp capnproto/vamp.rpc.capnp
diffstat 2 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/capnproto/vamp.capnp	Thu Oct 06 14:33:12 2016 +0100
+++ b/capnproto/vamp.capnp	Fri Oct 07 12:07:17 2016 +0100
@@ -161,12 +161,19 @@
     handle             @0  :Int32;
 }
 
+struct FinishResponse {
+    handle             @0  :Int32;
+    features           @1  :FeatureSet;
+}
+
 struct Error {
     code               @0  :Int32;
     message            @1  :Text;
 }
 
 struct RpcRequest {
+    # Request bundle for use when using Cap'n Proto serialisation without
+    # Cap'n Proto RPC layer.
     request :union {
 	list           @0  :ListRequest;
 	load           @1  :LoadRequest;
@@ -177,13 +184,15 @@
 }
 
 struct RpcResponse {
+    # Response bundle for use when using Cap'n Proto serialisation without
+    # Cap'n Proto RPC layer.
     response :union {
         error          @0  :Error;
 	list           @1  :ListResponse;
 	load           @2  :LoadResponse;
 	configure      @3  :ConfigurationResponse;
 	process        @4  :ProcessResponse;
-	finish         @5  :ProcessResponse;
+	finish         @5  :FinishResponse;
     }
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/capnproto/vamp.rpc.capnp	Fri Oct 07 12:07:17 2016 +0100
@@ -0,0 +1,16 @@
+@0xbe97303b9e5b3429;
+
+using Cxx = import "/capnp/c++.capnp";
+$Cxx.namespace("vampipe::rpc");
+
+using Vamp = import "vamp.capnp";
+
+interface Piper {
+    # RPC interface for use when using Cap'n Proto RPC layer.
+    list               @0 (req :Vamp.ListRequest) -> (resp :Vamp.ListResponse);
+    load               @1 (req :Vamp.LoadRequest) -> (resp :Vamp.LoadResponse);
+    configure          @2 (req :Vamp.ConfigurationRequest) -> (resp :Vamp.ConfigurationResponse);
+    process            @3 (req :Vamp.ProcessRequest) -> (resp :Vamp.ProcessResponse);
+    finish             @4 (req :Vamp.FinishRequest) -> (resp :Vamp.FinishResponse);
+}
+