RobotKit API
RobotKit/RKRobotProvider.h
Go to the documentation of this file.
00001 //
00002 //  RKRobotProvider.h
00003 //  RobotKit
00004 //
00005 //  Copyright 2010 Orbotix Inc. All rights reserved.
00006 //
00007 
00008 #import <Foundation/Foundation.h>
00009 #import <ExternalAccessory/ExternalAccessory.h>
00010 
00011 
00014 @class RKRobotControl;
00015 @class RKRobot;
00016 
00035 @interface RKRobotProvider : NSObject <EAAccessoryDelegate> {
00036     @private
00037     NSMutableArray  *robots;
00038     Class           robotClass;
00039     RKRobotControl  *robotControl;
00040 }
00041 
00043 @property (nonatomic, readonly) NSArray *robots;
00045 @property (nonatomic, readonly) RKRobotControl  *robotControl;
00047 @property (nonatomic, readonly) RKRobot         *robot;
00052 @property (nonatomic, assign) BOOL              startInBootloader;
00057 + (RKRobotProvider *)sharedRobotProvider;
00058 
00062 - (BOOL)isRobotAvailable;
00063 
00069 - (BOOL)isRobotUnderControl;
00070 
00075 - (BOOL)isRobotConnected;
00076 
00081 - (void)openRobotConnection;
00082 
00086 - (void)closeRobotConnection;
00087 
00094 - (BOOL)controlConnectedRobot;
00095 
00096 
00101 - (void)freeConnectedRobot;
00102 
00103 @end
00104 
00105 #pragma mark -
00106 #pragma mark String Constants
00107 
00108 extern NSString * const RKRobotKey;
00110 extern NSString * const RKRobotControlKey;
00111 
00112 #pragma mark -
00113 #pragma mark Notification String Constants
00114 
00119 extern NSString * const RKRobotIsAvailableNotification; // userinfo: robot
00125 extern NSString * const RKRobotIsNoLongerAvailableNotification; // userinfo: robot
00131 extern NSString * const RKRobotDidGainControlNotification; // userinfo: robotControl
00135 extern NSString * const RKRobotDidLossControlNotification; // userinfo: nil
00140 extern NSString * const RKRobotWillGoToSleepNotification;
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties