Device Class Reference

Inherits from NSObject
Declared in Device.h

– init

- (id)init

+ createDeviceWithDeviceName:andDeviceId:andGatewayId:

Creates custom instance of the class Device

+ (id)createDeviceWithDeviceName:(NSString *)deviceName andDeviceId:(NSString *)deviceId andGatewayId:(NSString *)gatewayId

Parameters

deviceName

the device name

deviceId

the device identifier

gatewayId

the gateway identifier

Return Value

an instance of the class Device

Declared In

Device.h

– addLocationInfo:AndLongitude:ANdHeight:

Adds location info of device using lat,long&height

- (void)addLocationInfo:(double)latitude AndLongitude:(double)longitude ANdHeight:(double)height

Parameters

latitude

the current latitude where the device is located

longitude

the current longitude where the device is located

height

the current height of the device

Declared In

Device.h

– addTagName:

Adds tag name to list of tags

- (void)addTagName:(NSString *)tagName

Parameters

tagName

the tag name to be associated with the device

Declared In

Device.h

– addAttributeName:andValue:

Adds attribute name-value pair to attribute list

- (void)addAttributeName:(NSString *)attributeName andValue:(NSString *)attributeValue

Parameters

attributeName

the name of the attribute to be associated with the device

attributeValue

the value of the attribute to be associated with the device

Declared In

Device.h