davidjsherman / aseba

Aseba is a set of tools that allow beginners to program robots easily and efficiently.
http://aseba.wikidot.com
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Multiple choice when robots have the same symbolic name #28

Open davidjsherman opened 8 years ago

davidjsherman commented 8 years ago

An Aseba node has a unique id and a text name. The HTTP routes defined by Asebahttp include a node specification, which can be a name or (since eb4509583e8b81159714657a2970f9d554dc76f1) the numeric id. If more than one connected node has the same name, then HttpInterface::getIdsFromURI arbitrarily returns the first one found in the nodesDescriptions map.

This is wrong, a request for such a name is ambiguous. Asebahttp should return 300 Multiple Choice with a JSON array of the specific queries it could accept. Each of these queries is the original query, with a node id substituted for the name.