Data Channel

2022-08-23
No Rating

This is the header file for "psdk_data_channel.c", defining the structure and (exported) function prototypes.

Structure

typedef struct T_PsdkDataChannelState

Data channel state.

typedef struct {
     int32_t realtimeBandwidthLimit;       Realtime bandwidth limitation, varying with link status of aircraft system 
                                           for some channels, such as data stream, video stream and download stream. Must ensure actual bandwidth of data transmission is less than realtime bandwidth limitation, unit: byte/s.

    int32_t realtimeBandwidthBeforeFlowController;       Realtime actual transmission bandwidth of data 
                                                         transmission channel calculated before flow controller, unit: byte/s. 
    
    int32_t realtimeBandwidthAfterFlowController;        Realtime actual transmission bandwidth of data transmission 
                                                         channel calculated after flow controller, unit:byte/s. If specified channel without flow controller. the value is equal 
                                                         to ::realtimeBandwidthBeforeFlowController. 
    bool busyState;                                      State specified whether the channel is busy or not. When data 
                                                         can not be sent to the endpoint directly, instead be sent to buffer of flow controller or discarded, the busy state will be set. At this time, the user should stop transmitting data or decrease the amount of data to be transmitted via this channel. When data bandwidth restore to normal, this state will be clear again. 
} T_PsdkDataChannelState;

typedef struct T_PsdkDataChannelBandwidthProportionOfHighspeedChannel

Percentage of bandwidth proportion of high-speed channel.

typedef struct {
    uint8_t dataStream;           Bandwidth proportion of data stream, range from 0 to 100. 
    uint8_t videoStream;          Bandwidth proportion of video stream, range from 0 to 100. 
    uint8_t downloadStream;       Bandwidth proportion of download stream, range from 0 to 100. 
} T_PsdkDataChannelBandwidthProportionOfHighspeedChannel;

Function

function PsdkDataChannel_SetBandwidthProportionForHighspeedChannel

Function:Set bandwidth proportion product:all

Set bandwidth proportion for the data stream, video stream and download stream of high-speed channel.

  1. Self-defined bandwidth distribution mechanism allows that user can control bandwidth limitation freely.
  2. System multiplies total bandwidth limitation of the high-speed channel by a proportion of the corresponding stream to get realtime bandwidth limitation of the specified stream. Realtime bandwidth limitation of data and video stream can be gotten by PsdkDataTransmission_GetDataStreamState() and PsdkPayloadCamera_GetVideoStreamState() interfaces.
  3. Total bandwidth of the high-speed channel is determined by the environment in which the system located and loading of system. If user does not set bandwidth proportion for each stream, the default proportion is 33% (data stream), 33% (video stream) and 34% (download stream).

NOTE

  • The bandwidth proportion will be effective after a while, the max value is 1s.
  • If you want use this interface, should calling PsdkPlatform_RegHalNetworkHandler interface firstly, otherwise this interface will not work.
T_PsdkReturnCode PsdkDataChannel_SetBandwidthProportionForHighspeedChannel(
    T_PsdkDataChannelBandwidthProportionOfHighspeedChannel bandwidthProportion);
Parameter
bandwidthProportion:bandwidth proportion of each stream of high-speed channel. The Sum of bandwidth proportion must equal 100.
Return
The details for the return code please refer to:PsdkErrorCode
Last Updated: 8/23/2022, 8:30:21 AM
If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.