DJI Mobile SDK Documentation

      class Pipeline

      interface Pipeline
      Package:dji.mop.common
      Description:

      Establishes a pipeline connected with Onboard device or Payload device to transmit data. Uses connect to create a pipeline. disconnect can be invoked to destroy the data transmission channel and disconnect from the Onboard device or Payload device.

      Class Members:
      ID
      method
      method getId
      int getId()
      Package:dji.mop.common
      Description:

      The identification number of the pipeline connected with the Payload or the Onboard device.

      Return:
      intAn int value of pipeline id.
      Transmission Type
      method
      method getType
      TransmissionControlType getType()
      Package:dji.mop.common
      Description:

      Transmission processing type.

      Return:
      TransmissionControlTypeAn enum value of TransmissionControlType.
      Device Type
      method
      method getDeviceType
      PipelineDeviceType getDeviceType()
      Package:dji.mop.common
      Description:

      Device type connected.

      Return:
      PipelineDeviceTypeAn enum value of PipelineDeviceType.
      Write Data
      method
      method writeData
      int writeData(byte[] data, int offset, int length)
      Package:dji.mop.common
      Description:

      Data to be sent. 1 KB data size is recommended.

      Input Parameters:
      byte[] dataThe data needs to be sent.
      int offsetThe start offset in the data.
      int lengthThe number of bytes to write.
      Return:
      intIf the return code greater than 0 it is the length of data written otherwise it is the error code.
      Read Data
      method
      method readData
      int readData(byte[] buff, int offset, int length)
      Package:dji.mop.common
      Description:

      Read data from the pipeline.

      Input Parameters:
      byte[] buffThe buffer into which the data is read.
      int offsetThe start offset in the array buff at which the data is written.
      int lengthThe maximum number of bytes to read.
      Return:
      intIf the return code greater than 0 it is the length of data read otherwise it is the error code.
      enum TransmissionControlType
      enum TransmissionControlType
      Package:dji.mop.common
      Description:

      Defines pipeline transmission control type.

      Enum Members:
      STABLEGuarantees delivery of data and that packets will be delivered in the order they were sent.
      PUSHThis transmission control type does not provide guaranteed delivery and a datagram packet may become corrupt or lost in transit. Suitable for time-sensitive transmission.
      Class Members:
      enum PipelineDeviceType
      enum PipelineDeviceType
      Package:dji.mop.common
      Description:

      The enum is used to represent the pipeline device type.

      Enum Members:
      ON_BOARDOnboard device. Please check the developer website: https://developer.dji.com/onboard-sdk/.
      PAYLOADPayload device. Please check the developer website: https://developer.dji.com/payload-sdk/.
      UNKNOWNUnknown.
      Class Members: