DEAGyroscopeService Class Reference

Inherits from DEABaseService : YMSCBService : NSObject
Declared in DEAGyroscopeService.h
DEAGyroscopeService.m

Overview

TI SensorTag CoreBluetooth service definition for gyroscope.

Other Methods

  sensorValues

Inherited property of DEABaseService. Keys: @“roll”, @“pitch” and @“yaw”.

@property (nonatomic, strong, readonly) NSDictionary *sensorValues

Discussion

Inherited property of DEABaseService. Keys: @“roll”, @“pitch” and @“yaw”.

Declared In

DEAGyroscopeService.h

Other Methods

– initWithName:parent:baseHi:baseLo:serviceOffset:

Initialize class instance.

- (instancetype)initWithName:(NSString *)oName parent:(YMSCBPeripheral *)pObj baseHi:(int64_t)hi baseLo:(int64_t)lo serviceOffset:(int)serviceOffset

Parameters

oName

name of service

pObj

parent object which owns this service

hi

top 64 bits of 128-bit base address value

lo

bottom 64 bits of 128-bit base address value

serviceOffset

offset address of service

Return Value

YMSCBCharacteristic

Discussion

Initialize class instance.

Declared In

YMSCBService.h

– notifyCharacteristicHandler:error:

Method to handle response update for a prior read or write request to a characteristic.

- (void)notifyCharacteristicHandler:(YMSCBCharacteristic *)yc error:(NSError *)error

Parameters

yc

Characteristic receiving update.

error

Error object.

Discussion

Method to handle response update for a prior read or write request to a characteristic.

This method is invoked by the CBPeripheralDelegate method peripheral:didUpdateValueForCharacteristic:error: conformed to by YMSCBPeripheral.

This method is typically overridden to handle characteristics whose notification has been turned on.

Declared In

YMSCBService.h

– turnOn

Turn on CoreBluetooth peripheral service.

- (void)turnOn

Discussion

Turn on CoreBluetooth peripheral service.

This method turns on the service by:

  • writing to config characteristic to enable service.
  • writing to data characteristic to enable notification.

Declared In

DEABaseService.h