UNPKG

rxpoweredup

Version:

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

22 lines (21 loc) 929 B
import { Observable } from 'rxjs'; import { ITaskVisitor } from '../queue'; import { TaskPortOutputCommand } from '../queue-tasks'; import type { ILogger, PortOutputCommandFeedbackInboundMessage } from '../../../types'; import { FeedbackHandler } from './feedback-handler'; /** * A visitor that handles port output command tasks. * It subscribes to the feedback stream and handles the feedback messages. */ export declare class TaskVisitor implements ITaskVisitor { private readonly feedbackStream; private readonly logger; private commands; private readonly subscription; constructor(feedbackStream: Observable<PortOutputCommandFeedbackInboundMessage>, logger: ILogger, feedbackHandler: FeedbackHandler); visitTaskPortOutputCommand(task: TaskPortOutputCommand): void; visitTaskWithResponse(): void; visitTaskWithoutResponse(): void; dispose(): void; private removePortOutputCommand; }