Class PixelSessionAbstract
Constructors
constructor
- new PixelSession(systemId, name?): PixelSession
Parameters
- systemId: string
Optional
name: string
Properties
Protected
Optional
_connStatusCb
Protected
Readonly
_systemId
_systemId: string
Accessors
lastConnectionStatus
- get lastConnectionStatus():
| "ready"
| "connecting"
| "connected"
| "failedToConnect"
| "disconnecting"
| "disconnected" Returns
| "ready"
| "connecting"
| "connected"
| "failedToConnect"
| "disconnecting"
| "disconnected"
pixelName
- get pixelName(): undefined | string
Returns undefined | string
systemId
- get systemId(): string
Returns string
Methods
Protected
_notifyConnectionEvent
- _notifyConnectionEvent(status, reason?): void
Parameters
- status:
| "ready"
| "connecting"
| "connected"
| "failedToConnect"
| "disconnecting"
| "disconnected" Optional
reason:
| "unknown"
| "peripheral"
| "success"
| "canceled"
| "notSupported"
| "timeout"
| "linkLoss"
| "bluetoothOff"
| "host"
Returns void
Protected
_setName
- _setName(name): void
Returns void
Abstract
connect
- connect(timeoutMs): Promise<void>
Returns Promise<void>
Abstract
disconnect
- disconnect(): Promise<void>
Returns Promise<void>
Abstract
dispose
- dispose(): void
Returns void
setConnectionEventListener
- setConnectionEventListener(connectionStatusListener?): void
Returns void
Abstract
subscribe
- subscribe(listener): Promise<(() => void)>
Parameters
- listener: ((dataView: DataView) => void)
- (dataView): void
Returns void
Returns Promise<(() => void)>
Abstract
writeValue
- writeValue(data, withoutResponse?, timeoutMs?): Promise<void>
Parameters
- data: ArrayBuffer
Optional
withoutResponse: booleanOptional
timeoutMs: number
Returns Promise<void>
Represents a session with a Pixel die. This class is used to abstract the underlying platform used to connect to Pixels.