FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-aci/aci/cmh_mms.c @ 795:b93cee08a2e1
aci: cmh_mm?.c done
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 16 Mar 2015 03:51:37 +0000 |
parents | eedbf248bac0 |
children |
comparison
equal
deleted
inserted
replaced
794:b380a85d77d5 | 795:b93cee08a2e1 |
---|---|
21 | 21 |
22 #ifndef CMH_MMS_C | 22 #ifndef CMH_MMS_C |
23 #define CMH_MMS_C | 23 #define CMH_MMS_C |
24 #endif | 24 #endif |
25 | 25 |
26 #include "config.h" | |
27 #include "fixedconf.h" | |
28 #include "condat-features.h" | |
29 #include "aci_conf.h" | |
30 | |
26 #include "aci_all.h" | 31 #include "aci_all.h" |
27 | 32 |
28 /*==== INCLUDES ===================================================*/ | 33 /*==== INCLUDES ===================================================*/ |
29 #include "aci_cmh.h" | 34 #include "aci_cmh.h" |
30 | 35 |
64 /* just to get FFs !!!! */ | 69 /* just to get FFs !!!! */ |
65 #ifndef GPRS | 70 #ifndef GPRS |
66 #define DONT_LET_FFSH_DEF_GPRS | 71 #define DONT_LET_FFSH_DEF_GPRS |
67 #endif | 72 #endif |
68 | 73 |
69 #include "ffs/ffs.h" | 74 #include "../../services/ffs/ffs.h" |
70 | 75 |
71 #include "rx.h" | 76 #include "rx.h" |
72 | 77 |
73 #include "rtc.h" | 78 #include "rtc.h" |
74 | 79 |
1179 CHAR * oper, | 1184 CHAR * oper, |
1180 T_ACI_AT_CMD cmd) | 1185 T_ACI_AT_CMD cmd) |
1181 { | 1186 { |
1182 T_MM_CMD_PRM * pMMCmdPrm; /* points to MM command parameters */ | 1187 T_MM_CMD_PRM * pMMCmdPrm; /* points to MM command parameters */ |
1183 | 1188 |
1184 | |
1185 T_ACI_NRG_RGMD regMode; /*NRG Registration mode */ | 1189 T_ACI_NRG_RGMD regMode; /*NRG Registration mode */ |
1186 T_ACI_NRG_FRMT regFormat; | 1190 T_ACI_NRG_FRMT regFormat; |
1187 T_ACI_NRG_SVMD svrMode; | 1191 T_ACI_NRG_SVMD svrMode; |
1188 | 1192 |
1189 | |
1190 TRACE_FUNCTION ("sat_Plus_Percent_COPS()"); | 1193 TRACE_FUNCTION ("sat_Plus_Percent_COPS()"); |
1191 | |
1192 | 1194 |
1193 pMMCmdPrm = &cmhPrm[srcId].mmCmdPrm; | 1195 pMMCmdPrm = &cmhPrm[srcId].mmCmdPrm; |
1194 mmShrdPrm.COPSmodeBeforeAbort = mmShrdPrm.COPSmode; | 1196 mmShrdPrm.COPSmodeBeforeAbort = mmShrdPrm.COPSmode; |
1195 | 1197 |
1196 /* | 1198 /* |
1197 * check MM entity status | 1199 * check MM entity status |
1198 */ | 1200 */ |
1199 if( mmEntStat.curCmd NEQ AT_CMD_NONE ) | 1201 if( mmEntStat.curCmd NEQ AT_CMD_NONE ) |
1200 | |
1201 return( AT_BUSY ); | 1202 return( AT_BUSY ); |
1202 | 1203 |
1203 | 1204 /* |
1204 /* | |
1205 *convert format to NRG type and set the COPS format value. | 1205 *convert format to NRG type and set the COPS format value. |
1206 */ | 1206 */ |
1207 | 1207 |
1208 | 1208 if( format EQ COPS_FRMT_NotPresent ) |
1209 if( format EQ COPS_FRMT_NotPresent ) format = pMMCmdPrm -> COPSfrmt; | 1209 format = pMMCmdPrm -> COPSfrmt; |
1210 | 1210 |
1211 | |
1212 switch( format ) | 1211 switch( format ) |
1213 { | 1212 { |
1214 case( COPS_FRMT_NotPresent): | 1213 case( COPS_FRMT_NotPresent): |
1215 regFormat = NRG_FRMT_NotPresent; | 1214 regFormat = NRG_FRMT_NotPresent; |
1216 break; | 1215 break; |
1217 case( COPS_FRMT_Numeric ): | 1216 case( COPS_FRMT_Numeric ): |
1218 regFormat =NRG_FRMT_Numeric ; | 1217 regFormat =NRG_FRMT_Numeric ; |
1219 break; | 1218 break; |
1220 case( COPS_FRMT_Short): | 1219 case( COPS_FRMT_Short): |
1221 regFormat = NRG_FRMT_Short; | 1220 regFormat = NRG_FRMT_Short; |
1222 break; | 1221 break; |
1223 case( COPS_FRMT_Long): | 1222 case( COPS_FRMT_Long): |
1224 regFormat = NRG_FRMT_Long; | 1223 regFormat = NRG_FRMT_Long; |
1225 break; | 1224 break; |
1226 default: | 1225 default: |
1227 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | 1226 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); |
1228 return( AT_FAIL ); | 1227 return( AT_FAIL ); |
1229 } | 1228 } |
1230 | 1229 |
1231 pMMCmdPrm -> COPSfrmt = format; | 1230 pMMCmdPrm -> COPSfrmt = format; |
1232 | 1231 |
1233 | 1232 /* |
1234 | |
1235 /* | |
1236 * The function cmhMM_OperatorSelect() is using the NRG types. Therefore the following conversion is required. | 1233 * The function cmhMM_OperatorSelect() is using the NRG types. Therefore the following conversion is required. |
1237 * Also the appropiate value for Service Mode, required by cmhMM_OperatorSelect(), is set. | 1234 * Also the appropiate value for Service Mode, required by cmhMM_OperatorSelect(), is set. |
1238 */ | 1235 */ |
1239 | 1236 |
1240 | 1237 if( mode EQ COPS_MOD_NotPresent ) |
1241 if( mode EQ COPS_MOD_NotPresent ) mode = mmShrdPrm.COPSmode; | 1238 mode = mmShrdPrm.COPSmode; |
1242 | 1239 |
1243 switch( mode ) | 1240 switch( mode ) |
1244 { | 1241 { |
1245 case( COPS_MOD_NotPresent ): | 1242 case( COPS_MOD_NotPresent ): |
1246 regMode = NRG_RGMD_NotPresent; | 1243 regMode = NRG_RGMD_NotPresent; |
1247 svrMode = NRG_SVMD_NotPresent; | 1244 svrMode = NRG_SVMD_NotPresent; |
1248 break; | 1245 break; |
1249 case( COPS_MOD_Auto ): | 1246 case( COPS_MOD_Auto ): |
1250 regMode =NRG_RGMD_Auto ; | 1247 regMode =NRG_RGMD_Auto ; |
1251 svrMode = NRG_SVMD_Full; /* Only Full Service makes sense for Automatic Mode */ | 1248 svrMode = NRG_SVMD_Full; /* Only Full Service makes sense for Automatic Mode */ |
1252 break; | 1249 break; |
1253 case( COPS_MOD_Man): | 1250 case( COPS_MOD_Man): |
1254 regMode = NRG_RGMD_Manual; | 1251 regMode = NRG_RGMD_Manual; |
1255 svrMode = NRG_SVMD_Full; /* Only Full Service makes sense for Manual Mode */ | 1252 svrMode = NRG_SVMD_Full; /* Only Full Service makes sense for Manual Mode */ |
1256 break; | 1253 break; |
1257 case( COPS_MOD_Dereg): | 1254 case( COPS_MOD_Dereg): |
1258 regMode = NRG_RGMD_Dereg; | 1255 regMode = NRG_RGMD_Dereg; |
1259 svrMode = NRG_SVMD_Limited; | 1256 svrMode = NRG_SVMD_Limited; |
1260 break; | 1257 break; |
1261 case( COPS_MOD_Both ): | 1258 case( COPS_MOD_Both ): |
1262 regMode = NRG_RGMD_Both; | 1259 regMode = NRG_RGMD_Both; |
1263 svrMode = NRG_SVMD_Full; /* Only Full Service makes sense for the Both Mode */ | 1260 svrMode = NRG_SVMD_Full; /* Only Full Service makes sense for the Both Mode */ |
1264 break; | 1261 break; |
1265 case(COPS_MOD_SetOnly): /*This mode can be fully handled in this function */ | 1262 case(COPS_MOD_SetOnly): /*This mode can be fully handled in this function */ |
1266 /* DO NOT SET mmShrdPrm.COPSmode !!! */ | 1263 /* DO NOT SET mmShrdPrm.COPSmode !!! */ |
1267 pMMCmdPrm -> COPSfrmt = format; | 1264 pMMCmdPrm -> COPSfrmt = format; |
1268 return AT_CMPL; | 1265 return AT_CMPL; |
1269 default: | 1266 default: |
1270 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); | 1267 ACI_ERR_DESC( ACI_ERR_CLASS_Ext, EXT_ERR_Parameter ); |
1271 return( AT_FAIL ); | 1268 return( AT_FAIL ); |
1272 } | 1269 } |
1273 | 1270 |
1274 mmShrdPrm.COPSmode = mode; | 1271 mmShrdPrm.COPSmode = mode; |
1275 | 1272 |
1276 | 1273 /*Set the value of the current command executed */ |
1277 | 1274 mmEntStat.curCmd = cmd; |
1278 /*Set the value of the current command executed */ | 1275 |
1279 mmEntStat.curCmd = cmd; | 1276 return cmhMM_OperatorSelect(srcId,regMode,svrMode,regFormat,oper); |
1280 | 1277 } |
1281 return cmhMM_OperatorSelect(srcId,regMode,svrMode,regFormat,oper); | 1278 |
1282 | |
1283 } | |
1284 #ifdef TI_PS_FF_AT_P_CMD_CTREG | 1279 #ifdef TI_PS_FF_AT_P_CMD_CTREG |
1285 /* | 1280 /* |
1286 +--------------------------------------------------------------------+ | 1281 +--------------------------------------------------------------------+ |
1287 | PROJECT : GSM-PS (6147) MODULE : CMH_MMS | | 1282 | PROJECT : GSM-PS (6147) MODULE : CMH_MMS | |
1288 | STATE : code ROUTINE : sAT_PercentCTREG | | 1283 | STATE : code ROUTINE : sAT_PercentCTREG | |