at_cmd_nw_cus.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef __AT_CMD_NW_CUS_H__
  13. #define __AT_CMD_NW_CUS_H__
  14. #include "quec_proj_config.h"
  15. typedef struct
  16. {
  17. bool try_auto_at_fail;
  18. #ifdef CONFIG_QUEC_PROJECT_FEATURE_NW
  19. osiEventCallback_t setcomm_cb;
  20. #endif
  21. uint8_t mode;
  22. uint8_t format;
  23. uint32_t index;
  24. uint8_t AcT;
  25. const char *oper;
  26. uint8_t operator_id[6];
  27. } copsAsyncCtx_t;
  28. /**
  29. * @brief obtain the sign of PSM
  30. *
  31. * @param void
  32. * @return the sign of PSM
  33. */
  34. uint8_t AT_GetPSMNotifyFlag(void);
  35. /**
  36. * @brief set the sign of flight mode
  37. *
  38. * @param flag the sign of flight mode
  39. * @param nSimID the id of sim card
  40. * @return void
  41. */
  42. void atSetFlightModeFlag(uint8_t flag, CFW_SIM_ID nSimID);
  43. /**
  44. * @brief mapping the value of network type from CFW to AT
  45. *
  46. * @param pstype value of network type CFW
  47. * @return value of network type AT
  48. */
  49. uint8_t Mapping_Creg_From_PsType(uint8_t pstype);
  50. /**
  51. * @brief the callback of set communication timeout response
  52. *
  53. * @param cmd current AT command in handling
  54. * @param event the event is send out by CFW
  55. * @return void
  56. */
  57. void nbiot_atGetUeRssiAndBer(uint8_t *rssi, uint8_t *ber);
  58. /**
  59. * @brief AT modular obtain the RSSI and BER values
  60. *
  61. * @param rssi signal intensity
  62. * @param ber
  63. * @return void
  64. */
  65. uint8_t CFW_nvGetPsmEnable(void);
  66. /**
  67. * @brief AT modular notify PSM
  68. *
  69. * @param uFlag the sign of notify of PSM
  70. * @return void
  71. */
  72. void AT_SetPSMNotifyFlag(uint8_t uFlag);
  73. /**
  74. * @brief the callback of set communication timeout response
  75. *
  76. * @param cmd current AT command in handling
  77. * @param event the event is send out by CFW
  78. * @return void
  79. */
  80. void atCmdCfunSetCommRspTimeOutCallBack(atCommand_t *cmd);
  81. /**
  82. * @brief the callback of communication
  83. *
  84. * @param cmd current AT command in handling
  85. * @param event the event is send out by CFW
  86. * @return NULL
  87. */
  88. void atCmdCfunSetCommCallBack(atCommand_t *cmd, const osiEvent_t *event);
  89. /**
  90. * @brief the callback of set register timeout response
  91. *
  92. * @param cmd current AT command in handling
  93. * @param event the event is send out by CFW
  94. * @return NULL
  95. */
  96. void atCmdCopsSetRegRspTimeOutCallBack(atCommand_t *cmd);
  97. /**
  98. * @brief the callback of obtain avaliable Operators timeout response
  99. *
  100. * @param cmd current AT command in handling
  101. * @param event the event is send out by CFW
  102. * @return NULL
  103. */
  104. void atCmdCopsGetAvailRspTimeOutCallBack(atCommand_t *cmd);
  105. /**
  106. * @brief the callback of set register
  107. *
  108. * @param cmd current AT command in handling
  109. * @param event event is send out by CFW
  110. * @return NULL
  111. */
  112. void atCmdCopsSetRegCallBack(atCommand_t *cmd, const osiEvent_t *event);
  113. /**
  114. * @brief the callback of cancell net
  115. *
  116. * @param cmd current AT command in handling
  117. * @param event the event is send out by CFW
  118. * @return NULL
  119. */
  120. void atCmdCopsDeregCallBack(atCommand_t *cmd, const osiEvent_t *event);
  121. /**
  122. * @brief the callback of obtain avaliable Operators
  123. *
  124. * @param cmd current AT command in handling
  125. * @param event the event is send out by CFW
  126. * @return NULL
  127. */
  128. void atCmdCopsGetAvailCallBack(atCommand_t *cmd, const osiEvent_t *event);
  129. /**
  130. * @brief printf OperID to the buff
  131. *
  132. * @param s it is an buff
  133. * @param oper_id Operators
  134. * @return NULL
  135. */
  136. int PrintOperID(char *s, uint8_t *oper_id);
  137. typedef struct
  138. {
  139. uint8_t uMode;
  140. } atNwBCCHContext_t;
  141. #endif