static le_result_t SetIndicator() { uint32_t wind; if ( pa_common_GetWindIndicator(&wind) != LE_OK) { return LE_NOT_POSSIBLE; } if ( pa_common_SetWindIndicator(wind|1|8) != LE_OK) { return LE_NOT_POSSIBLE; } atmgr_SubscribeUnsolReq(atports_GetInterface(ATPORT_COMMAND), EventUnsolicitedId, "+WIND: 0", false); atmgr_SubscribeUnsolReq(atports_GetInterface(ATPORT_COMMAND), EventUnsolicitedId, "+WIND: 1", false); return LE_OK; }
//-------------------------------------------------------------------------------------------------- static le_result_t SetIndicationHandler ( uint32_t mode ///< Unsolicited result mode ) { char atcommand[ATCOMMAND_SIZE] ; atcmdsync_PrepareString(atcommand,ATCOMMAND_SIZE,"at+cgerep=%d",mode); le_result_t result = atcmdsync_SendStandard(atports_GetInterface(ATPORT_COMMAND), atcommand, NULL, NULL, 30000); if ( result == LE_OK ) { if (mode) { atmgr_SubscribeUnsolReq(atports_GetInterface(ATPORT_COMMAND), UnsolicitedEvent, "+CGEV:", false); } else { atmgr_UnSubscribeUnsolReq(atports_GetInterface(ATPORT_COMMAND),UnsolicitedEvent,"+CGEV:"); } } return result; }
//-------------------------------------------------------------------------------------------------- static void SubscribeUnsolCREG ( pa_mrc_NetworkRegSetting_t mode ///< [IN] The selected Network registration mode. ) { atmgr_UnSubscribeUnsolReq(atports_GetInterface(ATPORT_COMMAND),EventUnsolicitedId,"+CREG:"); if ((mode==PA_MRC_ENABLE_REG_NOTIFICATION) || (mode==PA_MRC_ENABLE_REG_LOC_NOTIFICATION)) { atmgr_SubscribeUnsolReq(atports_GetInterface(ATPORT_COMMAND), EventUnsolicitedId, "+CREG:", false); } ThisMode=mode; }