• Upload totalBytes starting at the current MTA, automatically chunking across multiple UPLOAD commands to respect MAX_CTO and the slave's address granularity.

    Parameters

    • handle: string

      Connection handle returned by XcpCreateConnection.

    • totalBytes: number

      Total number of bytes to read (must be a non-negative multiple of address granularity).

    Returns Promise<number[]>

    Concatenated uploaded data bytes.

    If totalBytes is invalid, the slave replies with ERR, or a request times out.