Mercurial > hg > piper
changeset 158:781de01a04eb
Request/response -> RpcRequest/response
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 06 Oct 2016 11:23:25 +0100 |
parents | 7af4aef46c1d |
children | a99929c1df42 |
files | examples/request.json examples/response-error.json examples/response-ok.json examples/rpcrequest.json examples/rpcresponse-error.json examples/rpcresponse-ok.json schema/request.json schema/response.json schema/rpcrequest.json schema/rpcresponse.json |
diffstat | 10 files changed, 91 insertions(+), 91 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/request.json Wed Oct 05 13:52:28 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -{"method": "load", "params": {"pluginKey":"vamp-example-plugins:percussiononsets","inputSampleRate":44100,"adapterFlags":["AdaptInputDomain","AdaptBufferSize"]}, "id": 6, "jsonrpc": "2.0"} -
--- a/examples/response-error.json Wed Oct 05 13:52:28 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{"method": "process", "error": {"code": 6, "message": "An error occurred!" },"id": "6"}
--- a/examples/response-ok.json Wed Oct 05 13:52:28 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{"method": "load", "result": {"pluginHandle":12345,"staticData":{"basic": {"description": "Detect percussive note onsets by identifying broadband energy rises", "identifier": "percussiononsets", "name": "Simple Percussion Onset Detector"}, "basicOutputInfo": [{"description": "Percussive note onset locations", "identifier": "onsets", "name": "Onsets"}, {"description": "Broadband energy rise detection function", "identifier": "detectionfunction", "name": "Detection Function"}], "category": ["Time", "Onsets"], "copyright": "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005. Freely redistributable (BSD license)", "inputDomain": "FrequencyDomain", "pluginKey": "vamp-example-plugins:percussiononsets", "maker": "Vamp SDK Example Plugins", "maxChannelCount": 1, "minChannelCount": 1, "parameters": [{"basic": {"description": "Energy rise within a frequency bin necessary to count toward broadband total", "identifier": "threshold", "name": "Energy rise threshold"}, "defaultValue": 3, "extents": {"max": 20, "min": 0}, "unit": "dB", "valueNames": []}, {"basic": {"description": "Sensitivity of peak detector applied to broadband detection function", "identifier": "sensitivity", "name": "Sensitivity"}, "defaultValue": 40, "extents": {"max": 100, "min": 0}, "unit": "%", "valueNames": []}], "programs": [], "pluginVersion": 2},"defaultConfiguration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}},"id": "6"}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rpcrequest.json Thu Oct 06 11:23:25 2016 +0100 @@ -0,0 +1,2 @@ +{"method": "load", "params": {"pluginKey":"vamp-example-plugins:percussiononsets","inputSampleRate":44100,"adapterFlags":["AdaptInputDomain","AdaptBufferSize"]}, "id": 6, "jsonrpc": "2.0"} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rpcresponse-error.json Thu Oct 06 11:23:25 2016 +0100 @@ -0,0 +1,1 @@ +{"method": "process", "error": {"code": 6, "message": "An error occurred!" },"id": "6"}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/rpcresponse-ok.json Thu Oct 06 11:23:25 2016 +0100 @@ -0,0 +1,1 @@ +{"method": "load", "result": {"pluginHandle":12345,"staticData":{"basic": {"description": "Detect percussive note onsets by identifying broadband energy rises", "identifier": "percussiononsets", "name": "Simple Percussion Onset Detector"}, "basicOutputInfo": [{"description": "Percussive note onset locations", "identifier": "onsets", "name": "Onsets"}, {"description": "Broadband energy rise detection function", "identifier": "detectionfunction", "name": "Detection Function"}], "category": ["Time", "Onsets"], "copyright": "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005. Freely redistributable (BSD license)", "inputDomain": "FrequencyDomain", "pluginKey": "vamp-example-plugins:percussiononsets", "maker": "Vamp SDK Example Plugins", "maxChannelCount": 1, "minChannelCount": 1, "parameters": [{"basic": {"description": "Energy rise within a frequency bin necessary to count toward broadband total", "identifier": "threshold", "name": "Energy rise threshold"}, "defaultValue": 3, "extents": {"max": 20, "min": 0}, "unit": "dB", "valueNames": []}, {"basic": {"description": "Sensitivity of peak detector applied to broadband detection function", "identifier": "sensitivity", "name": "Sensitivity"}, "defaultValue": 40, "extents": {"max": 100, "min": 0}, "unit": "%", "valueNames": []}], "programs": [], "pluginVersion": 2},"defaultConfiguration":{"blockSize": 512, "channelCount": 2, "parameterValues": {"sensitivity": 40, "threshold": 3}, "stepSize": 1024}},"id": "6"}
--- a/schema/request.json Wed Oct 05 13:52:28 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -{ - "id": "http://vamp-plugins.org/json/schema/request#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a serialised request compatible with JSON-RPC", - "type": "object", - "properties": { - "method": { - "type": "string" - }, - "params": { - "anyOf": [ - { "$ref": "http://vamp-plugins.org/json/schema/listrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/loadrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/configurationrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/processrequest#" }, - { "$ref": "http://vamp-plugins.org/json/schema/finishrequest#" } - ] - }, - "id": { - "anyOf": [ - { "type": "string" }, - { "type": "number" } - ] - }, - "jsonrpc": { - "type": "string" - } - }, - "required": [ "method" ], - "additionalProperties": false -} -
--- a/schema/response.json Wed Oct 05 13:52:28 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -{ - "id": "http://vamp-plugins.org/json/schema/response#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for a success or failure response to a request", - "type": "object", - "oneOf": [ { - "properties": { - "method": { - "type": "string" - }, - "result": { - "anyOf": [ - { "$ref": "http://vamp-plugins.org/json/schema/listresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/loadresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/configurationresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/processresponse#" }, - { "$ref": "http://vamp-plugins.org/json/schema/finishresponse#" } - ] - }, - "id": { - "anyOf": [ - { "type": "string" }, - { "type": "number" } - ] - }, - "jsonrpc": { - "type": "string" - } - }, - "required": [ "method", "result" ], - "additionalProperties": false - }, { - "properties": { - "method": { - "type": "string" - }, - "error": { - "$ref": "http://vamp-plugins.org/json/schema/error#" - }, - "id": { - "anyOf": [ - { "type": "string" }, - { "type": "number" } - ] - }, - "jsonrpc": { - "type": "string" - } - }, - "required": [ "method", "error" ], - "additionalProperties": false - } ] -} - -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/rpcrequest.json Thu Oct 06 11:23:25 2016 +0100 @@ -0,0 +1,32 @@ +{ + "id": "http://vamp-plugins.org/json/schema/rpcrequest#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a serialised request compatible with JSON-RPC", + "type": "object", + "properties": { + "method": { + "type": "string" + }, + "params": { + "anyOf": [ + { "$ref": "http://vamp-plugins.org/json/schema/listrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/loadrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/configurationrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/processrequest#" }, + { "$ref": "http://vamp-plugins.org/json/schema/finishrequest#" } + ] + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "method" ], + "additionalProperties": false +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/rpcresponse.json Thu Oct 06 11:23:25 2016 +0100 @@ -0,0 +1,55 @@ +{ + "id": "http://vamp-plugins.org/json/schema/rpcresponse#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "schema for a success or failure response to a request", + "type": "object", + "oneOf": [ { + "properties": { + "method": { + "type": "string" + }, + "result": { + "anyOf": [ + { "$ref": "http://vamp-plugins.org/json/schema/listresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/loadresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/configurationresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/processresponse#" }, + { "$ref": "http://vamp-plugins.org/json/schema/finishresponse#" } + ] + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "method", "result" ], + "additionalProperties": false + }, { + "properties": { + "method": { + "type": "string" + }, + "error": { + "$ref": "http://vamp-plugins.org/json/schema/error#" + }, + "id": { + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] + }, + "jsonrpc": { + "type": "string" + } + }, + "required": [ "method", "error" ], + "additionalProperties": false + } ] +} + +