mxpi_parallel2serial

Function

Outputs the input data of multiple ports in sequence through one port.

Constraints

None

Synchronous/Asynchronous (Status)

Both supported

Plugin Base Class (Factory)

mxpi_parallel2serial

Input/Output

Input: buffer (data type: MxpiBuffer) and metadata

Output: buffer (data type: MxpiBuffer) and metadata

Property

For details, see Table 1.

Table 1 mxpi_parallel2serial plugin property

Property Name

Description

Mandatory or Not

Modifiable or Not

dataSource

Index of the input data (generally the name of the upstream element). Multiple indexes can be configured and separated by commas (,).

No

Yes

status

Serialization plugin working mode.
  • 0: asynchronous (default).

    In asynchronous mode, each buffer is directly sent after arrival.

  • 1: synchronous.

    In synchronous mode, the input buffers are sent (in the port sequence) after all of them have arrived.

No

Yes

Example

  • If the dataSource property is set, the serialization plugin mounts the metadata and sends the data to downstream plugins in the receiving sequence.

    Assume that the serialization plugin mxpi_parallel2serial0 receives data in the sequence of demoA0 and demoA1.

    1. The serialization plugin uses demoA0 as the key to obtain the metadata from the buffer transferred by demoA0.
    2. Use mxpi_parallel2serial0 as the key to mount the metadata obtained in the previous step.
    3. Send the buffer to the downstream plugin demoB.
    4. Repeat the preceding steps to process the demoA1 data.
  • If the dataSource property is not set, the serialization plugin only sends data to downstream plugins in the receiving sequence.

    Assume that the serialization plugin mxpi_parallel2serial0 receives data in the sequence of demoA0 and demoA1. The serialization plugin sends the buffers obtained by demoA0 and demoA1 to the downstream plugin demoB in sequence.