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.

Section 4 describes a Profile along the lines of (1) above, based on XML-RPC. This can be used directly by client and hub developers, in conjunctionwith the abstract interface description in Section 3, to write interoperableapplications. This is at present the only <strong>SAMP</strong> Profile which has been defined.Splitt<strong>ing</strong> the abstract interface and Profile descriptions in this way separatesthe basic design principles from the details of how to apply them, andit opens the door for other Profiles serv<strong>ing</strong> other use cases in the future.3 Abstract APIs and Data Types3.1 Hub Discovery MechanismIn order to keep track of which hub is runn<strong>ing</strong>, a hub discovery mechanism,capable of stor<strong>ing</strong> information about how to determine the existence of andcommunicate with a runn<strong>ing</strong> hub, is needed. This is a Profile-specific matterand a specific prescription is described in Section 4.3.3.2 Communicat<strong>ing</strong> with the HubThe details of how a client communicates with the hub are Profile-specific.A specific prescription is described in Section 4.3.3 <strong>SAMP</strong> Data TypesFor all hub/client communication, includ<strong>ing</strong> the actual content of messages,<strong>SAMP</strong> uses three conceptual data types:1. str<strong>ing</strong> — a scalar value consist<strong>ing</strong> of a sequence of characters; eachcharacter is an ASCII character with hex code 09, 0a, 0d or 20–7f2. list — an ordered array of data items3. map — an unordered associative array of key-value pairs, in which eachkey is a ¡code¿str<strong>ing</strong>¡/code¿ and each value is a data itemThese types can in principle be nested to any level, so that the elements ofa list or the values of a map may themselves be str<strong>ing</strong>s, lists or maps.There is no reserved representation for a null value, and it is illegal tosend a null value in a <strong>SAMP</strong> context even if the underly<strong>ing</strong> transport protocolpermits this. However a zero-length str<strong>ing</strong> or an empty list or map may,where appropriate, be used to indicate an empty value.12

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

Saved successfully!

Ooh no, something went wrong!