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

Class that encapsulates a set data streaming command. More...

#import <RKSetDataStreamingCommand.h>

Inheritance diagram for RKSetDataStreamingCommand:
RKDeviceCommand RKDeviceMessage

List of all members.

Public Member Functions

(id) - initWithSampleRateDivisor:packetFrames:sensorMask:packetCount:

Static Public Member Functions

(RKDataStreamingMask+ currentMask
(void) + sendCommandWithSampleRateDivisor:packetFrames:sensorMask:packetCount:

Properties

uint16_t sampleRateDivisor
uint16_t packetFrames
RKDataStreamingMask requestMask
uint8_t packetCount

Detailed Description

Class that encapsulates a set data streaming command, which allows client code to initiate data streaming of specific sensor data. A mask is used to enable the sensor data values of interest. The rate in which data can be set a divisor for a sample rate of 400Hz, and a sample frame count can be set that limits packets being sent after this count has been sampled.

See also:
RKsetDataStreamingCommand

Member Function Documentation

+ (RKDataStreamingMask) currentMask

Keeps track of the current mask being used for streamed data.

- (id) initWithSampleRateDivisor: (uint16_t)  devisor
packetFrames: (uint16_t)  frames
sensorMask: (uint32_t)  mask
packetCount: (uint8_t)  count 

Initializer to set up the command.

+ (void) sendCommandWithSampleRateDivisor: (uint16_t)  devisor
packetFrames: (uint16_t)  frames
sensorMask: (uint32_t)  mask
packetCount: (uint8_t)  count 

Convenience method to send the message to the robotic device.

Parameters:
devisorA number to divide the maximum sample rate of 400Hz by.
framesThe number of sample frames to send in a single packet.
maskA bitwise OR value of the sensor values to include in data streaming. Set to RKDataStreamingMaskOff or 0 to disable data streaming.
countThen number of packets that Sphero will send. Set to 0 for infinite data streaming.

Property Documentation

- (uint8_t) packetCount [read, assign]

Read only property for the number of packets to send

- (uint16_t) packetFrames [read, assign]

Read only property to the sample frame count.

- (RKDataStreamingMask) requestMask [read, assign]

Read only property to the request mask.

- (uint16_t) sampleRateDivisor [read, assign]

Read only property to the sample rate divisor.


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