Skip to main content

High-speed Data Channel

The header file related to the high-speed data channel is uav_high_speed_data_channel.h. This document describes key information and usage methods for the structures and function prototypes defined in uav_high_speed_data_channel.h.

Table of Contents

  • Macros, Enums, and Structures
    T_UavDataChannelBandwidthProportionOfHighspeedChannel

  • Function Prototypes
    UavHighSpeedDataChannel_SetBandwidthProportion UavHighSpeedDataChannel_SendDataStreamData UavHighSpeedDataChannel_GetDataStreamState

Macros, Enums, and Structures

typedef struct T_UavDataChannelBandwidthProportionOfHighspeedChannel

Structure representing the state of the high-speed data channel.

typedef struct {
uint8_t dataStream; //The bandwidth ratio of the data stream, ranging from 0 to 100
uint8_t videoStream; //The bandwidth ratio of the video stream, ranging from 0 to 100
uint8_t downloadStream; //下The bandwidth ratio of the download stream, ranging from 0 to 100
} T_UavDataChannelBandwidthProportionOfHighspeedChannel;

Function Prototypes

function UavHighSpeedDataChannel_SetBandwidthProportion

  • Function: Sets the bandwidth proportion of data, video, and download streams in the high-speed channel.
  • Product: All.

The custom bandwidth allocation mechanism allows users to freely control bandwidth limits. The system calculates the real-time bandwidth limit for a specific stream by multiplying the total bandwidth limit of the high-speed channel by the corresponding stream proportion. The real-time bandwidth limits for the data stream and video stream can be obtained through the UavHighSpeedDataChannel_GetDataStreamState() and UAVPayloadCamera_GetVideoStreamState() interfaces. The total bandwidth of the high-speed channel depends on the system environment and load. If the user does not manually set the bandwidth proportions for each stream, the default ratios are 33% for the data stream, 33% for the video stream, and 34% for the download stream.

Note:

  • The bandwidth proportion takes effect after a short delay, with a maximum latency of 1 second. To use this interface, the user must first call the autelPlatform_RegHalNetworkHandler() interface; otherwise, the interface will not function.
T_UAVReturnCode UavHighSpeedDataChannel_SetBandwidthProportion(T_UavDataChannelBandwidthProportionOfHighspeedChannel *pBandwidthProportion);
  • ParameterpBandwidthProportion: The bandwidth proportion for each stream in the high-speed channel. The total of all proportions must equal 100.
  • Return Value Returns a corresponding value based on the execution result. For details, refer to: UAV Error Codes.

function UavHighSpeedDataChannel_SendDataStreamData

  • Function: Sends data to the mobile terminal via the data stream of the high-speed data channel.
  • Product: All.

Note:

  • This function is only supported on the Linux operating system.
  • The actual bandwidth must be lower than the bandwidth limit of the channel or stream. For detailed information about bandwidth limitations, please refer to the developer documentation and the status of the channel/stream. The user can obtain the status of the dataStream channel using the UavHighSpeedDataChannel_GetDataStreamState() function. If the actual bandwidth exceeds the limit or the stream is in a busy state, the user must stop transmitting data or reduce the amount of data being sent. Otherwise, data loss will occur.
T_UAVReturnCode UavHighSpeedDataChannel_SendDataStreamData(int32_t channelAddress, int data_type, const uint8_t *data, uint16_t len);
  • ParameterschannelAddress: The address of the data source channeldata_type: Data type, user-defineddata: Pointer to the data to be transmittedlen: Length of the data to be sent via the data stream; must be less than or equal to 65,000 bytes. Unit: byte
  • Return Value Returns a corresponding value based on the execution result. For details, refer to: UAV Error Codes.

function UavHighSpeedDataChannel_GetDataStreamState

  • Function: Retrieves the transmission status of the dataStream channel. Users can use this status as the basis for controlling data transmission via the data stream. This function is only available and usable on the Linux operating system.
  • Product: All.
T_UAVReturnCode UavHighSpeedDataChannel_GetDataStreamState(int32_t channelAddress, T_UAVDataChannelState *state);
  • ParameterschannelAddress: The address of the data source channelstate: Pointer to the status of the `dataStream` channel
  • Return Value Returns a corresponding value based on the execution result. For details, refer to: UAV Error Codes.