DEABaseService Class Reference

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

Overview

Base class for defining a CoreBluetooth service for a TI SensorTag.

Other Methods

  sensorValues

Dictionary containing the values measured by the sensor.

@property (nonatomic, readonly) NSDictionary *sensorValues

Discussion

Dictionary containing the values measured by the sensor.

This is an abstract propery.

Declared In

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

– turnOff

Turn off CoreBluetooth peripheral service.

- (void)turnOff

Discussion

Turn off CoreBluetooth peripheral service.

This method turns off the service by:

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

Declared In

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

– addCharacteristic:withOffset:

Add YMSCBCharacteristic instance given address offset.

- (void)addCharacteristic:(NSString *)cname withOffset:(int)addrOffset

Parameters

cname

Characteristic name

addrOffset

Offset value

Discussion

Add YMSCBCharacteristic instance given address offset.

Declared In

YMSCBService.h