Qualcomm Enhanced SDK (QESDK) API Reference (6)

Qualcomm Enhanced SDK (QESDK) API Reference (6)

      • 3.1.3 LCE enumeration
      • 3.1.4 Sample code
    • 3.2 Link latency manager
      • 3.2.1 LLM function

3.1.3 LCE enumeration

accessNetworkType

Used when setting reporting criteria.

Value Description
NONE Period-based reporting
WCDMA WCDMA Threshold-based reporting
LTE LTE threshold-based reporting
NR5G NR5G threshold-based reporting

linkDirection

Specify the link direction.

Value Description
UP_LINK
DOWN_LINK

confidenceLevel

The accuracy (confidence) of the throughput information generated by the modem, ranging from 0 to 7. A value of 0 is the lowest confidence level, and a value of 7 is the highest confidence level.

Value Description
LEVEL_0
LEVEL_1
LEVEL_2
LEVEL_3
LEVEL_4
LEVEL_5
LEVEL_6
LEVEL_7

reportingAction

Actions performed based on set standards.

Value Description
STOP Stop all reporting events
START Restart reporting criteria that were set and applied before the STOP operation
RESET Clear all reporting criteria. > Note: The RESET operation allows the client to switch between threshold-based reporting and period-based reporting

3.1.4 Sample code

Java

Need to import

import com.qualcomm.qti.qesdk.Modem.ILinkCapacityEstimateCBs;
      import com.qualcomm.qti.qesdk.Modem.LinkCapacityEstimateEnums;
      import com.qualcomm.qti.qesdk.Modem.LinkCapacityEstimateManager;
      import com.qualcomm.qti.qesdkIntf.IQesdk;

initialization

IQesdk qesdkManager = Iqesdk.createInstance(getApplicationContext());
      int statusId = qesdkManager.init(eventCallbackHandler);
      LinkCapacityEstimateManager lceManager = new LinkCapacityEstimateManager(qesdkManager);
      LinkCapacityEstimateEnums.reportingAction action = LinkCapacityEstimateEnums.reportingAction.START;
      //action = LinkCapacityEstimateEnums.reportingAction.STOP;
      //action = LinkCapacityEstimateEnums.reportingAction.RESET;

Declare callback

IQesdkEventCallBack eventCallbackHandler = new IQesdkEventCallBack() {<!-- -->
      @Override
      public void onEvent(int opcode, int[] subsys) {<!-- -->
      // Handle QESDK event
      }
      };
      
      IlinkCapacityEstimateCBs.IestimationReport estimationReportCallback = new IlinkCapacityEstimateCBs.IestimationReport() {<!-- -->
      @Override
      public void onValues(long rate,LinkCapacityEstimateEnums.confidenceLevel confidenceLevel, LinkCapacityEstimateEnums.linkDirection linkDirection, long queueSizeUL, String error) {<!-- -->
      // Handle LCE estimation report callback
      }
      }

Register for Estimate Report

int ret = lceManager.registerForEstimationReports(estimationReportCallback);

Set reporting standards

ret = lceManager.setReportingCriteria(hyst, thresholdDown, thresholdUp, techType, period, resultCallback);

Get the last estimate report

int m = lceManager.getLastEstimationReport(lastEstimationReportCallback);

Perform start/stop/reset operations according to set criteria

int m = lceManager.performReportingAction(action);

Native

What to include

#include "qesdk_ndk.h"
      #include "qesdk_Modem_LinkCapacityEstimate.h"

initialization

qesdk_handle_t qesdk_handle = qesdk_init(nativeLicense, len, event_callback_handler);
      LinkCapacityEstimateManager *lceManager = new LinkCapacityEstimateManager();
      lce_reportingAction action = lce_reportingAction.START;
      //action = lce_reportingAction.STOP;
      //action = lce_reportingAction.RESET;

Declare callback

void event_callback_handler(uint32_t opcode, uint32_t subsys[]) {<!-- -->
      // Callback to handle QESDK events
      }
      
      void estimationReportCallback(uint32_t rate, lce_confidenceLevel confidenceLevel, lce_linkDirection linkDirection, uint32_t queueSizeUL, std::string error){<!-- -->
      // Handle LCE estimation report
      }
      
      void lastEstimationReportCallback(uint32_t rate, lce_confidenceLevel confidenceLevel, lce_linkDirection linkDirection, uint32_t queueSizeUL, std::string error){<!-- -->
      // Handle last LCE estimation report
      }
      
      void setCriteriaStatusCallback(bool success, std::string error){<!-- -->
      // Handle set criteria status
      }

Register for Estimate Report

int ret = lceManager->registerForEstimationReports(estimationReportCallback);

Set reporting standards

lceManager->setReportingCriteria(hyst, thresholds_down_vector, thresholds_up_vector, tech_type, period, setCriteriaStatusCallback);

Get the last estimate report

ret = lceManager->getLastEstimationReport(lastEstimationReportCallback);

Perform start/stop/reset operations according to set criteria

ret = lceManager->performReportingAction(action);

3.2 Link latency manager

The Link Latency Manager (LLM) subsystem provides an API to clients to optimize latency levels. Application vendors can set LLM levels for uplink and downlink, with the given levels ranging from L1 to L6. See level for details. In latency-sensitive network use cases, setting a low latency level can be helpful.

  • LLM function
    Describes the LinkLatencyManager method and details of its definition, parameters, and return results.

  • LLM callback interface
    The following subsections introduce the LinkLatencyCBs interface, its description and callback parameters.

  • LLM enumeration
    Introducing the LinkLatency enumeration definition.

  • Sample code
    Sample code on LLM API usage.

3.2.1 LLM function

Describes the LinkLatencyManager method and details of its definition, parameters, and return results.

  • Creator
    The main link enters the constructor of LinkLatency.
LinkLatencyManager

Parameters

Parameters API type Data type Description
qesdkhandle Java Iqesdk Proven Iqesdk interface
Native Proven qesdk_handle_t interface qesdk_handle_t

Return results

Return results API type Data type Description
llmManager Java LinkLatencyManager Subsystem Manager Object
Native
  • setLevel
    Set the latency level for the device’s uplink and downlink. setLevel also provides an option to enable connection expansion.
  • prioritizeDefaultDataSubscription
    Make DDS a priority.
  • registerFilterStatusUpdates
    Register a callback to receive filter status updates.
  • addFilter
    Adds a new filter to the system and applies the provided uplink/downlink levels, PDCP timers and OOD values.
  • getFilters
    Retrieve all filters added by the client and the current status of each filter.
  • updateLatencyLevel
    Update the corresponding filters based on the ID with the new uplink and downlink levels.
  • updateOod
    Update the corresponding filter based on the ID with the new out-of-order (OOD) value.
  • updatePdcpTimer
    Update the corresponding filter based on the ID with the new PDCP timer value.
  • deleteFilter
    Delete the corresponding filter based on ID.
  • deleteAllFilters
    Removes all filters added by the client.
  • updateOodForDds
    Updates the out-of-order delivery (OOD) value for DDS.
  • updatePdcpTimerForDds
    Update the PDCP timer value for DDS.
  • enableHighPerfGaming
    Enable or disable high-performance gaming.