org.mechio.client.basic
Class MechIO

java.lang.Object
  extended by org.mechio.client.basic.MechIO

public final class MechIO
extends java.lang.Object

Framework utility methods for the MechIO Basic API

Author:
Matthew Stevenson

Constructor Summary
MechIO()
           
 
Method Summary
static RemoteAccelerometerServiceClient<HeaderRecord> connectAccelerometer()
          Connects to the accelerometer controller.
static RemoteAnimationPlayerClient connectAnimationPlayer()
          Connects to the animation service.
static RemoteImageServiceClient<CameraServiceConfig> connectCameraService()
          Connects to the robot's cameras.
static RemoteCompassServiceClient<HeaderRecord> connectCompass()
          Connects to the compass controller.
static RemoteGyroscopeServiceClient<HeaderRecord> connectGyroscope()
          Connects to the gyroscope controller.
static RemoteImageRegionServiceClient<FaceDetectServiceConfig> connectImageRegionService()
          Connects to the robot's face-detection service.
static RemoteRobot connectRobot()
          Connects to the RemoteRobot for communicating with an avatar and robot.
static RemoteGpioServiceClient<HeaderRecord> connectSensors()
          Connects to the sensor controller.
static RemoteSpeechServiceClient connectSpeechService()
          Connects to the speech service.
static long currentTime()
          Gets the current time, in Unix format.
static void disconnect()
          Disconnects from the Remote Robot.
static Animation loadAnimation(java.lang.String filepath)
          Loads an animation from file.
static boolean saveAnimation(java.lang.String filepath, Animation anim)
          Saves an animation to disk.
static void sleep(long milliseconds)
          Halts program execution for the given number of milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MechIO

public MechIO()
Method Detail

connectRobot

public static RemoteRobot connectRobot()
Connects to the RemoteRobot for communicating with an avatar and robot.

Returns:
RemoteRobot object for controlling an avatar and robot

connectAnimationPlayer

public static RemoteAnimationPlayerClient connectAnimationPlayer()
Connects to the animation service.

Returns:
the animation client

connectSpeechService

public static RemoteSpeechServiceClient connectSpeechService()
Connects to the speech service.

Returns:
the speech client

connectSensors

public static RemoteGpioServiceClient<HeaderRecord> connectSensors()
Connects to the sensor controller.

Returns:
the sensor client

connectAccelerometer

public static RemoteAccelerometerServiceClient<HeaderRecord> connectAccelerometer()
Connects to the accelerometer controller.

Returns:
the accelerometer client

connectGyroscope

public static RemoteGyroscopeServiceClient<HeaderRecord> connectGyroscope()
Connects to the gyroscope controller.

Returns:
the gyroscope client

connectCompass

public static RemoteCompassServiceClient<HeaderRecord> connectCompass()
Connects to the compass controller.

Returns:
the compass client

connectCameraService

public static RemoteImageServiceClient<CameraServiceConfig> connectCameraService()
Connects to the robot's cameras.

Returns:
RemoteImageServiceClient for controlling the robot's cameras

connectImageRegionService

public static RemoteImageRegionServiceClient<FaceDetectServiceConfig> connectImageRegionService()
Connects to the robot's face-detection service.

Returns:
RemoteImageRegionServiceClient for controlling the robot's face detection

loadAnimation

public static Animation loadAnimation(java.lang.String filepath)
Loads an animation from file.

Parameters:
filepath - path to the animation
Returns:
Animation object loaded from the file

saveAnimation

public static boolean saveAnimation(java.lang.String filepath,
                                    Animation anim)
Saves an animation to disk.

Parameters:
filepath - path to save the animation
anim - the animation to save
Returns:
true if successful, false if failed

currentTime

public static long currentTime()
Gets the current time, in Unix format.

Returns:
the current time

sleep

public static void sleep(long milliseconds)
Halts program execution for the given number of milliseconds.

Parameters:
milliseconds - number of milliseconds to sleep

disconnect

public static void disconnect()
Disconnects from the Remote Robot.



Copyright © 2011-2014. All Rights Reserved.