RobotKit API
|
Objects of this class maintain a connection to a robot. More...
#import <RKRobotProvider.h>
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 |
RKRobotControl * | robotControl |
RKRobot * | robot |
BOOL | startInBootloader |
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.
- (void) closeRobotConnection |
Closes communications with the robot.
- (BOOL) controlConnectedRobot |
Method to get control of the connected robot.
- (void) freeConnectedRobot |
Frees the connected robot from being under control.
- (BOOL) isRobotAvailable |
Indicates that a user has paired with a robot.
- (BOOL) isRobotConnected |
Indicates if the robot is connected and communicating.
- (BOOL) isRobotUnderControl |
Checks that a robot is being controlled.
- (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.
- (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.