RobotKit API
Public Member Functions | Properties
RKDeviceConnection Class Reference

A RKDeviceConnection object manages a robot's connection. More...

#import <RKDeviceConnection.h>

List of all members.

Public Member Functions

(id) - initWithRobot:
(void) - open
(void) - close

Properties

RKRobotrobot
NSNumber * responseTime
NSUInteger packetsSent
NSUInteger packetsReceived
RKConnectionState connectionState
BOOL startInBootloader

Detailed Description

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


Member Function Documentation

- (void) close

Closes the communication channels to the robot.

- (id) initWithRobot: (RKRobot *)  aRobot

Initializes the connection to the given robot

Parameters:
aRobotThe robot to connect to.
Returns:
The initialized RKDeviceConnection instance.
- (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.


Property Documentation

- (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.


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