RobotKit API
Public Member Functions | Static Public Member Functions | Properties
RKRobotProvider Class Reference

Objects of this class maintain a connection to a robot. More...

#import <RKRobotProvider.h>

List of all members.

Public Member Functions

(BOOL) - isRobotAvailable
(BOOL) - isRobotUnderControl
(BOOL) - isRobotConnected
(void) - openRobotConnection
(void) - closeRobotConnection
(BOOL) - controlConnectedRobot
(void) - freeConnectedRobot

Static Public Member Functions

(RKRobotProvider *) + sharedRobotProvider

Properties

NSArray * robots
RKRobotControlrobotControl
RKRobotrobot
BOOL startInBootloader

Detailed Description

A RKRobotProvider object will maintain a list of available robots, and allow connections to them. At this time, only one connection is supported.

Use this class to determine is there is an available robot to connect to and open a connection. A sample is shown below.

if ([[RKRobotProvider sharedRobotProvider] isRobotUnderControl]) { [[RKRobotProvider sharedRobotProvider] openRobotConnection]; }

Use this class to close the connection to a robot when your application exits or enters the background by calling closeRobotConnection.


Member Function Documentation

- (void) closeRobotConnection

Closes communications with the robot.

- (BOOL) controlConnectedRobot

Method to get control of the connected robot.

Returns:
YES if the a robot was connected and is under control, otherwise NO if the robot was not connected or can not be controlled.
Deprecated:
use openRobotConnection instead
- (void) freeConnectedRobot

Frees the connected robot from being under control.

Deprecated:
use closeRobotConnection instead
- (BOOL) isRobotAvailable

Indicates that a user has paired with a robot.

- (BOOL) isRobotConnected

Indicates if the robot is connected and communicating.

Returns:
YES if the robot can be communicated with, otherwise NO.
- (BOOL) isRobotUnderControl

Checks that a robot is being controlled.

Deprecated:
Returns:
YES if a robot is under controlled, otherwise NO.
- (void) openRobotConnection

Opens communications with the robot. A RKDeviceConnectionOnlineNotification is posted when the robot has been initialized.

+ (RKRobotProvider *) sharedRobotProvider

Returns the shared RKRobotProvider object that manages a connected robot.

Returns:
The shared robot provider object.

Property Documentation

- (RKRobot*) robot [read, assign]

The RKRobot object for the controlled robot

- (RKRobotControl *) robotControl [read, assign]

The RKRobotControl object for a controlled robot

- (NSArray*) robots [read, assign]

Available robots.

- (BOOL) startInBootloader [read, write, assign]

Sets the connection to skip jumping to the main application when opening the connection.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties