13.07.2015 Views

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples might be “samp.hub.event.shutdown” or “file.load”.A client may subscribe to one or more MTypes to indicate which messagesit is will<strong>ing</strong> to receive. A client will only ever receive messages with MTypesto which it has subscribed. In order to do this it passes a subscriptionsmap to the hub. Each key of this map is an MType str<strong>ing</strong> to which theclient wishes to subscribe, and the correspond<strong>ing</strong> value is a map which maycontain additional information about that subscription. Currently, no keysare defined for these per-MType maps, so typically they will be empty (haveno entries). The use of a map here is to permit experimentation and perhapsfuture extension of the <strong>SAMP</strong> standard.As a special case, simple wildcard<strong>ing</strong> is permitted in subscriptions. Thekeys of the subscription map may actually be of the form , where ::= "*" | "." "*"Thus a subscription key “file.event.*” means that a client wishes to receiveany messages with MType which begin “file.event.”. This does notinclude “file.event”. A subscription key “*” subscribes to all MTypes.Note that the wildcard “*” character may only appear at the end of a subscriptionkey, and that this indicates subscription to the entire subtree.More discussion of MTypes, includ<strong>ing</strong> their semantics, is given in Section5.3.8 <strong>Messag</strong>e Encod<strong>ing</strong>A message is an abstract container for the information we wish to send toanother application. The message itself is that data which should arrive atthe receiv<strong>ing</strong> application. It may be transmitted along with some externalitems (e.g. sender, recipient and message identifiers) required to ensure properdelivery or handl<strong>ing</strong>.A message is encoded for <strong>SAMP</strong> transmission as a map with the follow<strong>ing</strong>REQUIRED keys:samp.mtype — A str<strong>ing</strong> giv<strong>ing</strong> the MType which defines the mean<strong>ing</strong> ofthe message. The MType also, via external documentation, definesthe names, types and mean<strong>ing</strong>s of any parameters and return values.MTypes are discussed in more detail in Section 5.samp.params — A map contain<strong>ing</strong> the values for the message’s named parameters.These give the data required for the receiver to act on themessage, for instance the URL of a given file. The names, types andsemantics of these parameters are determined by the MType. Each keyin this map is the name of a parameter, and the correspond<strong>ing</strong> value isthat parameter’s value.16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!