RobotKit API
|
A RKDeviceConnection object manages a robot's connection. More...
#import <RKDeviceConnection.h>
Public Member Functions | |
(id) | - initWithRobot: |
(void) | - open |
(void) | - close |
Properties | |
RKRobot * | robot |
NSNumber * | responseTime |
NSUInteger | packetsSent |
NSUInteger | packetsReceived |
RKConnectionState | connectionState |
BOOL | startInBootloader |
A RKDeviceConnection object manages the connection and passing of commands to a robotic device.
The sending and receiving of return information is done asynchronously, by posting commands to the RKDeviceMessenger shared instance and registering to observe response
- (void) close |
Closes the communication channels to the robot.
- (id) initWithRobot: | (RKRobot *) | aRobot |
Initializes the connection to the given robot
aRobot | The robot to connect to. |
- (void) open |
Opens communication channels to the robot. Plus, the robot is told to jump into it's main application, and that it is communicating with the robot. The jump to main application can be changed to start in the bootloader using the startInBootloader property. A notification is sent to indicate the final state of the connection.
- (RKConnectionState) connectionState [read, assign] |
The state of the connection.
- (NSUInteger) packetsReceived [read, assign] |
The count of packets received with correct checksums
- (NSUInteger) packetsSent [read, assign] |
The count of packets actually sent.
- (NSNumber *) responseTime [read, write, assign] |
The time to receive a response for the last command sent
- (RKRobot *) robot [read, assign] |
The delegate for the instance
The robot for the connection.
- (BOOL) startInBootloader [read, write, assign] |
The property overides the default open behavior to start in the main applicaiton to open starting in the bootloader.