From 2c3c074e9711897d4c2d46a136b51f58e83ef3f1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Oct 2010 03:30:37 +0000 Subject: Merge command and message extensions. --- ext/command.lv2/command.ttl | 73 -------------------------------------------- ext/command.lv2/manifest.ttl | 7 ----- ext/message.lv2/message.ttl | 66 ++++++++++++++++++++++++--------------- wscript | 1 - 4 files changed, 42 insertions(+), 105 deletions(-) delete mode 100644 ext/command.lv2/command.ttl delete mode 100644 ext/command.lv2/manifest.ttl diff --git a/ext/command.lv2/command.ttl b/ext/command.lv2/command.ttl deleted file mode 100644 index ab8b82b..0000000 --- a/ext/command.lv2/command.ttl +++ /dev/null @@ -1,73 +0,0 @@ -# LV2 Command Extension -# Copyright (C) 2010 David Robillard -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -@prefix cmd: . -@prefix lv2: . -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . -@prefix doap: . -@prefix foaf: . - - - a lv2:Specification ; - doap:name "LV2 Command" ; - doap:maintainer [ - a foaf:Person ; - foaf:name "David Robillard" ; - foaf:homepage ; - rdfs:seeAlso - ] ; - rdfs:comment """ -This extension defines special port types used for controlling and inspecting a -plugin instance by sending messages/commands and receiving responses to them. -It also allows plugins to send status updates to the host. The port types in -this extension only define an abstract notion of plugin control, not actual -data types and/or message semantics. They must be used with some other port -data type (e.g. event) to define the actual data format of port buffers. -As a result, this extension can be used in conjunction with any extension -that defines a port type suitable for controlling plugins. -""" . - -cmd:CommandPort a rdfs:Class ; - rdfs:label "Command Port" ; - rdfs:subClassOf lv2:Port ; - rdfs:comment """ -An input port used to control a plugin instance. A plugin has -at most 1 CommandPort. A CommandPort is always an lv2:InputPort. Hosts or -UIs send messages to the command port in order to control a plugin instance -in any way. This is an abstract port class, the actual format and semantics -of the port buffer (and messages) are defined by some other port type. -""" . - -cmd:StatusPort a rdfs:Class ; - rdfs:label "Command Port" ; - rdfs:subClassOf lv2:Port ; - rdfs:comment """ -An output port used to notify the host about changes to a plugin instance and -responses to commands. A plugin has at most 1 StatusPort. A StatusPort is -always an lv2:OutputPort. Any response to a command sent to the CommandPort -of the plugin will appear in the StatusPort output. The plugin may also emit -other messages (i.e. the contents of a StatusPort are not necessarily responses -to commands). This is an abstract port class, the actual format and semantics -of the port buffer (and messages) are defined by some other port type. -""" . - diff --git a/ext/command.lv2/manifest.ttl b/ext/command.lv2/manifest.ttl deleted file mode 100644 index 0590b62..0000000 --- a/ext/command.lv2/manifest.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix lv2: . -@prefix rdfs: . - - - a lv2:Specification ; - rdfs:seeAlso . - diff --git a/ext/message.lv2/message.ttl b/ext/message.lv2/message.ttl index 03072f3..172041a 100644 --- a/ext/message.lv2/message.ttl +++ b/ext/message.lv2/message.ttl @@ -38,11 +38,9 @@ rdfs:seeAlso ] ; rdfs:comment """ -This extension defines the format for "messages" which can be used to -dynamically control an LV2 plugin instance at runtime. Messages are useful -for any kind of plugin control that does not fit well with control ports. -Plugins can both receive and send messages (and thus send messages to each -other) via any mechanism. +This extension defines a standard for LV2 "messages" which allow dynamic +control and investigation of plugin instances, by both hosts and other +plugins. This extension requires the host to support the LV2 URI Map extension, and the @@ -56,28 +54,48 @@ message:MessageType a rdfs:Class ; Base class for all types of LV2 Message. A type of message, which must be a resource (i.e. have a URI). This URI -is used as the selector component of a Message and is used by receivers -to interpret the meaning of messages (e.g. which components are present). +is used as the selector component of a Message and is used by receivers to +interpret the meaning of messages (e.g. which components are present). + +A message in memory is simply an atom:Dict with at least one rdf:type that is a rdfs:subClassOf +message:MessageType. The definitions of various message types define what +other key/value pairs can be expected in the message. """ . -message:Message a atom:AtomType ; - rdfs:label "Message" ; - rdfs:comment """ -A message is a communication from one component to another. Messages consist -of a selector URI, and a key/value dictionary. Keys in the dictionary are -URI mapped integers, and values are Atoms. The selector URI dictates how -the message is to be interpreted (e.g. the selector can be used as a "verb" -to build commands). +cmd:ControlPort a rdfs:Class ; + rdfs:label "Control Port" ; + rdfs:subClassOf lv2:Port ; + rdfs:comment """ +An input port used to control a plugin instance. A plugin has +at most 1 cmd:ControlPort. A ControlPort is always an lv2:InputPort. Hosts +can send messages to the control port in order to investigate or manipulate +a plugin instance (possibly on behalf of a UI or another plugin instance). -Messages are simple to serialise in many different formats (e.g. any RDF -serialisation including LV2 Turtle files, JSON, XML, etc) making network -transparency and persistence simple, assuming the implementation can -serialise Atoms. +This is an abstract port class, the actual format and semantics +of the port buffer (and messages) are defined by some other port type, i.e. +a cmdControlPort MUST have another type which defines the format and semantics +of the port buffer contents (likely candidates are +atom-port:MessagePort +or ev:EventPort). +""" . -Because all messages have a standard format, plugins and hosts can store, -communicate, or otherwise work with messages even if they do not understand -that particular message's selector. +cmd:ResponsePort a rdfs:Class ; + rdfs:label "Response Port" ; + rdfs:subClassOf lv2:Port ; + rdfs:comment """ +An output port used to notify the host about changes to a plugin instance +or respond to messages send to its cmd:ControlPort. A plugin has at most +1 StatusPort. A StatusPort is always an lv2:OutputPort. Any response to a +command sent to the CommandPort of the plugin will appear in the StatusPort +output. The plugin may also emit other messages (i.e. the contents of a +StatusPort are not necessarily responses to commands). -In memory, a Message is simply a uint32_t selector (a URI mapped integer) -followed by an atom:Blank. +This is an abstract port class, the actual format and semantics +of the port buffer (and messages) are defined by some other port type, i.e. +a cmdControlPort MUST have another type which defines the format and semantics +of the port buffer contents (likely candidates are +atom-port:MessagePort +or ev:EventPort). """ . + diff --git a/wscript b/wscript index 3a3e9e7..4e8ad30 100644 --- a/wscript +++ b/wscript @@ -68,7 +68,6 @@ def build(bld): ext = ''' atom atom-port - command contexts data-access dyn-manifest -- cgit v1.2.1