当前位置:   article > 正文

KaiOS Data PDN 数据建立流程

KaiOS Data PDN 数据建立流程

代码逻辑

APN创建

在 DataCallManager.jsm中,会对所有apnsetting创建一个datacall,其中会包含dataprofile的成员(通过apn参数来创建),在之后的流程用于直接发送到modem建立PDN。

PDN建立

1、DataCallManager.jsm -dcInterface.setupDataCall

  1. //RILNetworkInterface.connect()->DataCall.connect->DataCall.setup()
  2. setup(){
  3. dcInterface.setupDataCall(
  4. radioTechnology,
  5. this.dataProfile,
  6. //...
  7. //此处是把建立的datacall(this)中dataprofile属性值发送到RIL,在log中可以通过:“> RIL_REQUEST_SETUP_DATA_CALL”来查看需要建立datacall的dataprofile值。
  8. dataInfo.roaming,
  9. this.dataCallHandler.dataCallSettings.roamingEnabled,
  10. {
  11. QueryInterface: ChromeUtils.generateQI([Ci.nsIDataCallCallback]),
  12. notifySetupDataCallSuccess: aDataCall => {
  13. //回调函数,返回datacall建立结果
  14. this.onSetupDataCallResult(aDataCall);
  15. },
  16. notifyError: aErrorMsg => {
  17. this.onSetupDataCallResult({ errorMsg: aErrorMsg });
  18. },
  19. }
  20. );
  21. this.state = NETWORK_STATE_CONNECTING;
  22. },


2、/gecko/dom/system/gonk/radio/DataCallInterfaceService.jsm
DataCallInterfaceService的setupDataCall

  1. // nsIDataCallInterface
  2. setupDataCall: function(aRadioTechnology, aProfile, aIsRoaming, aAllowRoaming,
  3. aCallback) {
  4. //发送setupdatacall消息给到RIL
  5. this._radioInterface.sendWorkerMessage("setupDataCall", {
  6. radioTechnology: aRadioTechnology,
  7. profile: aProfile,
  8. isRoaming: aIsRoaming,
  9. allowRoaming: aAllowRoaming
  10. }, (aResponse) => {
  11. if (aResponse.errorMsg) {
  12. aCallback.notifyError(aResponse.errorMsg);
  13. } else {
  14. //如果没有error,返回datacall建立成功
  15. let dataCall = new DataCall(aResponse.dcResponse);
  16. aCallback.notifySetupDataCallSuccess(dataCall);
  17. }
  18. });
  19. },


3、/gecko/dom/system/gonk/radio/RadioInterfaceLayer.jsm
RadioInterfaceLayer.jsm - sendWorkerMessage

完成以下接口操作后,setup datacall的请求已经通过RIL消息发给了mode

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/586708
推荐阅读
相关标签
  

闽ICP备14008679号