UNPKG

rxpoweredup

Version:

A Typescript RxJS-based library for controlling LEGO Powered UP hubs & peripherals.

23 lines (22 loc) 1.26 kB
import { LogLevel, PortOperationStartupInformation } from '../constants'; import { OutboundMessengerConfig } from './outbound-messenger-config'; import { CharacteristicDataStreamConfig } from './characteristic-data-stream-config'; import { ILogger } from '../types'; /** * Configuration for the hub. * @public * @typedef {Object} HubConfig * @property {number} maxGattConnectRetries - The maximum number of times to retry connecting to the GATT server before giving up * @property {LogLevel} logLevel - The log level to use * @property {number} hubConnectionTimeoutMs - The amount of time to wait for a connection to the hub before timing out * @property {PortOperationStartupInformation} defaultBufferMode - The default buffer mode to use when sending port output commands * @property {boolean} [useLinuxWorkaround] - Whether to use the workaround for breaking connections on Linux Chrome */ export type HubConfig = { readonly maxGattConnectRetries: number; readonly logLevel: LogLevel; readonly logger?: ILogger; readonly hubConnectionTimeoutMs: number; readonly defaultBufferMode: PortOperationStartupInformation; } & OutboundMessengerConfig & CharacteristicDataStreamConfig; export declare const HUB_CONFIG_DEFAULTS: HubConfig;