iotile-device
A Typescript library for interacting with IOTile Devices
Type aliases
ConnectionHookCallback
ConnectionHookCallback: function
MobilePlatform
MobilePlatform: "ios" | "android"
NotificationCallback
NotificationCallback: function
Type declaration
( ArrayBuffer: ArrayBuffer ) : void
PreconnectionHookCallback
PreconnectionHookCallback: function
PrestreamingHook
PrestreamingHook: function
Type declaration
Parameters
Returns ArrayBuffer []
RPCResponse
RPCResponse: Promise < ( string | number ) [] > | ( string | number ) []
Variables
Const COMBINED_REPORT_STREAMER
COMBINED_REPORT_STREAMER: number = 255
Const HighspeedDataCharacteristic
HighspeedDataCharacteristic: "2006" = "2006"
Let IOTileServiceName
IOTileServiceName: string = "00002000-3FF7-53BA-E611-132C0FF60F63"
Const REPORT_HEADER_SIZE
REPORT_HEADER_SIZE: number = 20
Let RSSI
RSSI: number = -50
Const ReceiveHeaderCharacteristic
ReceiveHeaderCharacteristic: "2001" = "2001"
Const ReceivePayloadCharacteristic
ReceivePayloadCharacteristic: "2002" = "2002"
Const SYSTEM_REPORT_STREAMER
SYSTEM_REPORT_STREAMER: number = 1
Const SendHeaderCharacteristic
SendHeaderCharacteristic: "2003" = "2003"
Const SendPayloadCharacteristic
SendPayloadCharacteristic: "2004" = "2004"
Const StreamingCharacteristic
StreamingCharacteristic: "2005" = "2005"
Const TracingCharacteristic
TracingCharacteristic: "2007" = "2007"
Const USER_REPORT_STREAMER
USER_REPORT_STREAMER: number = 0
Let VOLTAGE
VOLTAGE: number = 3.8
Const catAdapter
catAdapter: Category = new Category("IOTileAdapter", catService)
Const catBLEOptimizer
catBLEOptimizer: Category = new Category("BLEOptimizer", catService)
Const catMockBLE
catMockBLE: Category = new Category("MockBLE", catService)
Const catService
catService: Category = new Category("iotile.device")
Functions
buildIndividualReport
buildIndividualReport( uuid: number , streamID: number , value: number ) : ArrayBuffer
Parameters
uuid: number
streamID: number
value: number
Returns ArrayBuffer
createHashListReport
createHashListReport( uuid: number , reportID: number , streamer: number , sentTime: number , readings: Reading [] ) : ArrayBuffer | SharedArrayBuffer
Parameters
uuid: number
reportID: number
streamer: number
sentTime: number
Returns ArrayBuffer
|
SharedArrayBuffer
createIndividualReport
createIndividualReport( uuid: number , stream: string , value: number , sentTime: any , rawTime: any ) : ArrayBuffer
Parameters
uuid: number
stream: string
value: number
sentTime: any
rawTime: any
Returns ArrayBuffer
createReading
createReading( stream: string , timestamp: any , value: number , id: any ) : object
Parameters
stream: string
timestamp: any
value: number
id: any
Returns object
id: any
stream: number
timestamp: any
value: number
createSequentialReport
createSequentialReport( uuid: number , stream: string , count: number , streamer: number , start?: undefined | number ) : ArrayBuffer | SharedArrayBuffer
Parameters
uuid: number
stream: string
count: number
streamer: number
Optional start: undefined | number
Returns ArrayBuffer
|
SharedArrayBuffer
expectIndividual
expectIndividual( inReport: any , uuid: number , stream: string , value: number , sentTime: any , rawTime: any ) : void
Parameters
inReport: any
uuid: number
stream: string
value: number
sentTime: any
rawTime: any
Returns void
expectSequential
expectSequential( inReport: any , uuid: number , stream: string , count: number , streamer: number ) : void
Parameters
inReport: any
uuid: number
stream: string
count: number
streamer: number
Returns void
feedInPieces
feedInPieces( report: ArrayBuffer , handler: function , size: number ) : void
Parameters
report: ArrayBuffer
handler: function
( ArrayBuffer: ArrayBuffer ) : void
size: number
Returns void
packError
packError( subsystem: number , errorCode: number ) : number
Parameters
subsystem: number
errorCode: number
Returns number
rpc
rpc( address: number , rpcID: number , argFormat: string , respFormat: string ) : (Anonymous function)
Parameters
address: number
rpcID: number
argFormat: string
respFormat: string
Returns (Anonymous function)
setupMockBLE
setupMockBLE( config: any ) : void
tileRPC
tileRPC( rpcID: number , argFormat: string , respFormat: string ) : (Anonymous function)
Parameters
rpcID: number
argFormat: string
respFormat: string
Returns (Anonymous function)
Object literals
Const ANDROID_STRATEGY
ANDROID_STRATEGY: object
steps
steps: object [] = [{preupdateWait: 300,update: {minInterval: 7.5,maxInterval: 10,timeout: 1000}},{preupdateWait: 0,update: {minInterval: 7.5,maxInterval: 15,timeout: 1000}},{preupdateWait: 0,update: {minInterval: 7.5,maxInterval: 30,timeout: 1000}}]
Const IOS_STRATEGY
IOS_STRATEGY: object
steps
steps: object [] = [{preupdateWait: 180,update: {minInterval: 15,maxInterval: 15,timeout: 1000}}]
Const UPDATE_STRATEGIES
UPDATE_STRATEGIES: object
Legend
Module
Object literal
Variable
Function
Function with type parameter
Index signature
Type alias
Enumeration
Enumeration member
Property
Method
Interface
Interface with type parameter
Constructor
Property
Method
Index signature
Class
Class with type parameter
Constructor
Property
Method
Accessor
Index signature
Inherited constructor
Inherited property
Inherited method
Inherited accessor
Protected property
Protected method
Protected accessor
Private property
Private method
Private accessor
Static property
Static method
overview
iotile.device
Introduction
The
iotile.devicemodule contains all services and classes needed for interacting with IOTile Devices, including receiving data from them, sending commands to them, updating their firmware and querying their status. It is designed to be dropped into an otherwise IOTile unaware angular application and provide a small API that encapsulates all necessary interactions with IOTile Devices.The main point of entry in the
iotile.devicemodule is theIOTileAdapterservice, which is the only public service provided byiotile.device. TheIOTileAdapterservice provides a way to scan for, connect to, receive data from, control and update IOTile Devices.