Function selectMotionMasterMessageStatusByMessageId

  • Creates an operator that filters Motion Master messages by message ID and extracts a specific status field from the message payload.

    If a message with the matching ID contains a systemEvent status instead of the expected status, an error is thrown. This typically happens when a request refers to an invalid device address.

    Returns

    An operator that emits the resolved status when a matching message arrives.

    Throws

    Error Thrown when a SystemEvent status is received while a different status type was expected.

    Example

    source$.pipe(
    selectMotionMasterMessageStatusByMessageId<'deviceInfo'>('deviceInfo', 'req-123')
    ).subscribe(info => console.log(info));

    Type Parameters

    • T

      The type corresponding to the selected status field.

    Parameters

    • key: keyof IStatus

      The status field name to extract from the message.

    • Optional id: string

      The message ID that identifies the corresponding request/response pair.

    Returns UnaryFunction<Observable<IMotionMasterMessage>, Observable<T>>

Generated using TypeDoc