
== SDK Functions ==

All post requests will have the following mandatory parameters:

 * '''function''': The function will be one of the funtions that is
   listed below.

Additionally, appropriate arguments for the called function will be
required.  The HTTP arguments will have exactly the same name as the
function arguments as defined in this document.

=== turn ===

The ''turn'' function takes the following arguments:

 * ''degrees'': A string which is parsable into an int or a float.

The turn function will turn the robot a certain number of degrees
(relative to its current position, which is always treated as 0
degrees).  Thus negative numbers represent counterclockwise motion,
while positive numbers represent clockwise motion.  -180 degrees = 180
degrees.

=== drive ===

The ''drive'' function takes the following arguments:

 * ''distance'': A string parsable into an int or float.  This
   represents the distance to be traveled in '''feet'''.  Positive
   numbers represent forward travel, while negative distances
   represent backward travel.

=== getimage ===

The ''getimage'' function takes no arguments.

The function will return an image taken from the onboard camera as the
entire contents of the return message if the function was successful.

=== aibocommand ===

The ''aibocommand'' function takes the following arguments:

 * ''command'': A string which represents code that is executable
   directly on the Aibo remote control interface.  See
   source:trunk/docs/aibo_protocol/penn_doc.pdf for a description of
   the types of commands which can be sent.  The command sent should
   be simply the string portion.  The SDK will automatically place the
   preamble on the message.

This function is designed to pass along Aibo specific functionality to
the robot.  If the robot is not an Aibo, it can simply disregard these
messages.

=== is_done ===

Returns 1 if the last movement function to be issued has finished (a
movement function is a drive or a turn), and 0 otherwise (including in
the case where a movement command has not been issued).

=== speak ===

The ''speak'' function takes the following arguments:

 * ''phrase'': The phrase to actually be spoken in a string.

The ''speak'' function is Penn-Bot specific, and will use the
Microsoft Speech API (SAPI) to do Text to Speech (TTS) conversion of
the phrase that is entered.  It will then speak the actual phrase over
the sound-card of the E-Box.

=== setspeed ===

The ''setspeed'' function takes the following arguments:

 * ''speed'': A number between 0 and 1000.

Currently this command is Pennbot-specific.
