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():
| "connected"
| "connecting"
| "disconnected"
| "failedToConnect"
| "ready"
| "disconnecting" Returns
| "connected"
| "connecting"
| "disconnected"
| "failedToConnect"
| "ready"
| "disconnecting"
pixelName
- get pixelName(): undefined | string
Returns undefined | string
systemId
- get systemId(): string
Returns string
Methods
Protected
_notifyConnectionEvent
- _notifyConnectionEvent(status, reason?): void
Parameters
- status:
| "connected"
| "connecting"
| "disconnected"
| "failedToConnect"
| "ready"
| "disconnecting" Optional
reason:
| "canceled"
| "success"
| "unknown"
| "host"
| "timeout"
| "notSupported"
| "linkLoss"
| "bluetoothOff"
| "peripheral"
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.