omasuplasnconverterstubimpl/src/cstubsuplstart.cpp
changeset 0 0ce1b5ce9557
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:Supl Start
       
    15  *
       
    16  */
       
    17 
       
    18 #include <e32base.h>
       
    19 #include <e32def.h> 
       
    20 #include <e32cmn.h> 
       
    21 #include "epos_comasuplasnbase.h"
       
    22 #include "epos_comasuplasnmessagebase.h"
       
    23 #include "epos_comasuplstart.h"
       
    24 #include "cstubsuplstart.h"
       
    25 #include "lbs/epos_comasuplsetcapabilities.h"
       
    26 #include "epos_comasupllocationid.h"
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CStubSuplStart::NewL
       
    30 // Other Items were commented in a header
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 EXPORT_C CStubSuplStart* CStubSuplStart::NewL()
       
    34     {
       
    35     CStubSuplStart* self = new (ELeave) CStubSuplStart;
       
    36     CleanupStack::PushL(self);
       
    37     self->ConstructL();
       
    38     CleanupStack::Pop();
       
    39     return self;
       
    40     }
       
    41 // -----------------------------------------------------------------------------
       
    42 // CStubSuplStart::~CStubSuplStart
       
    43 // Other Items were commented in a header
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 EXPORT_C CStubSuplStart::~CStubSuplStart()
       
    47     {
       
    48 
       
    49     }
       
    50 // -----------------------------------------------------------------------------
       
    51 // CStubSuplStart::EncodeL
       
    52 // Other Items were commented in a header
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 HBufC8* CStubSuplStart::EncodeL(TInt& aErrorCode)
       
    56     {
       
    57     aErrorCode = 0;
       
    58     HBufC8* encodedBuffer = NULL;
       
    59     InitializeL();
       
    60     // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode
       
    61     return encodedBuffer;
       
    62     }
       
    63 // -----------------------------------------------------------------------------
       
    64 // CStubSuplStart::CStubSuplStart
       
    65 // Other Items were commented in a header
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 CStubSuplStart::CStubSuplStart()
       
    69     {
       
    70 //delete all member variables here...
       
    71     }
       
    72 // -----------------------------------------------------------------------------
       
    73 // CStubSuplStart::ConstructL
       
    74 // Other Items were commented in a header
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 void CStubSuplStart::ConstructL()
       
    78     {
       
    79     COMASuplStart::ConstructL();
       
    80     //Allocate memmory for internal usage....
       
    81     }
       
    82 // -----------------------------------------------------------------------------
       
    83 // CStubSuplStart::InitializeL
       
    84 // Other Items were commented in a header
       
    85 // -----------------------------------------------------------------------------
       
    86 //   
       
    87 void CStubSuplStart::InitializeL()
       
    88     {
       
    89 	
       
    90     if(iSETCapabilities) //This parameter is mandatory in asn
       
    91         {
       
    92         InitializeSetCapabilities();
       
    93         }
       
    94     if(iLocationId)   //This parameter is mandatory in asn
       
    95         {
       
    96         InitializeLocationId();
       
    97         }
       
    98     if (iQopSet)   //This parameter is optional in asn
       
    99         {
       
   100         InitializeQop();
       
   101         }
       
   102     if(ieCID)   //This parameter is optional in asn
       
   103         {
       
   104         InitializeECellId();
       
   105         }
       
   106     }
       
   107 // -----------------------------------------------------------------------------
       
   108 // CStubSuplStart::InitializeSetCapabilities
       
   109 // Other Items were commented in a header
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 void CStubSuplStart::InitializeSetCapabilities()
       
   113     {
       
   114     TOMASuplPosTechnology lPosTechnology;
       
   115     COMASuplSETCapabilities::TOMASuplPrefMethod    lPrefMethod;
       
   116     TOMASuplPosProtocol   lPosProtocol;
       
   117 
       
   118     iSETCapabilities->GetSETCapabilities(lPosTechnology,lPrefMethod,lPosProtocol);
       
   119 
       
   120     TBool lSETAssist;
       
   121     TBool lGpsSETBased;
       
   122     TBool lAuto;
       
   123     TBool lFLT;
       
   124     TBool leOTD;
       
   125     TBool loTDOA;
       
   126 
       
   127     lPosTechnology.GetPosTechnology(lSETAssist,lGpsSETBased,lAuto,
       
   128             lFLT,leOTD,loTDOA);
       
   129 
       
   130     //Initialize structure accordingly from here...
       
   131     }
       
   132 // -----------------------------------------------------------------------------
       
   133 // CStubSuplStart::InitializeLocationId
       
   134 // Other Items were commented in a header
       
   135 // -----------------------------------------------------------------------------
       
   136 //
       
   137 void CStubSuplStart::InitializeLocationId()
       
   138     {
       
   139     COMASuplLocationId::TOMASuplCellInfoType lChoice = iLocationId->SuplCellInfoType();
       
   140 
       
   141     switch(lChoice)
       
   142         {
       
   143         case COMASuplLocationId::EGSM :
       
   144             {
       
   145             COMASuplGSMCellInfo* lCellInfo = NULL;
       
   146             COMASuplLocationId::TOMASuplStatus lStatus;
       
   147             iLocationId->SuplLocationId(lCellInfo,lStatus);
       
   148             if(lCellInfo)
       
   149                 {
       
   150                 TInt lRefMNC;
       
   151                 TInt lRefMCC;
       
   152                 TInt lRefLAC;
       
   153                 TInt lRefCI;
       
   154                 lCellInfo->SuplGSMCellInfo(lRefMNC,lRefMCC,lRefCI,lRefLAC);
       
   155                 
       
   156                 //Use lRefMNC,lRefMCC,lRefCI,lRefLAC for filling asn structs for encoding.
       
   157                 }
       
   158                 break;
       
   159             }
       
   160         case COMASuplLocationId::EWCDMA:
       
   161             {
       
   162             COMASuplCellInfo* lCellInfo = NULL;
       
   163             COMASuplLocationId::TOMASuplStatus lStatus;
       
   164             iLocationId->SuplLocationId(lCellInfo,lStatus);
       
   165             if(lCellInfo)
       
   166                 {
       
   167                 TInt lRefMNC;
       
   168                 TInt lRefMCC;
       
   169                 TInt lRefUC;
       
   170                 lCellInfo->SuplCellInfo(lRefMNC,lRefMCC,lRefUC);
       
   171                 if((KMncMin<=lRefMNC && lRefMNC<=KMncMax) && (KMccMin<=lRefMCC && lRefMCC<=KMccMax) &&
       
   172                         (KRefUcMin<=lRefUC && lRefUC<=KRefUcMax))
       
   173                     {
       
   174                     //Initialize  
       
   175                      //Use RefMNC,lRefMCC,lRefUC for filling asn structs for encoding.
       
   176                     }
       
   177                 }
       
   178             else
       
   179                 {
       
   180                 //error    
       
   181                 }
       
   182 								break;
       
   183             }
       
   184         }
       
   185     //Initialize structure accordingly from here...
       
   186     }
       
   187 // -----------------------------------------------------------------------------
       
   188 // CStubSuplStart::InitializeQop
       
   189 // Other Items were commented in a header
       
   190 // -----------------------------------------------------------------------------
       
   191 //
       
   192 void CStubSuplStart::InitializeQop()
       
   193     {
       
   194     TInt horizAccuracy = iSuplQop.SuplQop();
       
   195     if(KHorizAccuracyMin <= horizAccuracy && horizAccuracy <= KHorizAccuracyMax)
       
   196         {
       
   197         //initialize here
       
   198         }
       
   199     else
       
   200         {
       
   201         //error...return with error 
       
   202         }
       
   203 
       
   204     TInt vertAccuracy;  
       
   205     TInt error = iSuplQop.VerticalAccuracy(vertAccuracy);
       
   206     if(!error)
       
   207         {
       
   208         if(KVertAccuracyMin <= vertAccuracy && vertAccuracy <= KVertAccuracyMax)
       
   209             {
       
   210             //initialize
       
   211             }
       
   212         else
       
   213             {
       
   214             //return error
       
   215             
       
   216             }
       
   217         }
       
   218     else
       
   219         {
       
   220         //initialize
       
   221         }
       
   222 
       
   223     TInt maxLocAge; 
       
   224     error = iSuplQop.MaxLocationAge(maxLocAge);
       
   225     if(!error)
       
   226         {
       
   227         //initialize
       
   228         if(KMaxLocationAgeMin <= maxLocAge && maxLocAge <= KMaxLocationAgeMax)
       
   229             {
       
   230             //initialize
       
   231             }
       
   232         else
       
   233             {
       
   234             //error
       
   235             return; 
       
   236             }
       
   237         }
       
   238     else
       
   239         {
       
   240         //initialize
       
   241         }
       
   242 
       
   243     TInt delay; 
       
   244     error = iSuplQop.Delay(delay);
       
   245     if(!error)
       
   246         {
       
   247         if(KDelayMin <= delay && delay <= KDelayMax)
       
   248             {
       
   249             //initialize
       
   250             }
       
   251         else
       
   252             {
       
   253             //error
       
   254             return; 
       
   255             }
       
   256         }
       
   257     else
       
   258         {
       
   259         //initialize
       
   260         }
       
   261     //Initialize structure accordingly...
       
   262     }
       
   263 // -----------------------------------------------------------------------------
       
   264 // CStubSuplStart::InitializeECellId
       
   265 // Other Items were commented in a header
       
   266 // -----------------------------------------------------------------------------
       
   267 //
       
   268 void CStubSuplStart::InitializeECellId()
       
   269     {
       
   270     TOMASuplNwMode nwMode = iMmCellInfo.NetworkMode();
       
   271 
       
   272     if (nwMode == EOMASuplGSM)
       
   273         {
       
   274         InitializeGSMECellId();
       
   275         }
       
   276     else
       
   277         {
       
   278         InitializeWCDMAECellId();
       
   279         }
       
   280     //Initialize structure accordingly...
       
   281     }
       
   282 // -----------------------------------------------------------------------------
       
   283 // CStubSuplStart::InitializeGSMECellId
       
   284 // Other Items were commented in a header
       
   285 // -----------------------------------------------------------------------------
       
   286 //
       
   287 void CStubSuplStart::InitializeGSMECellId()
       
   288     {
       
   289     	// In E-Cell id structs, if any of the data field contains -1 as a value, it means that no data is available for that field.
       
   290     TOMASuplGSMCellinfo  omaSuplGSMCellinfo;
       
   291     iMmCellInfo.GSMCellInfo(omaSuplGSMCellinfo);
       
   292     if(KOMASuplOptionalParamNotSet != omaSuplGSMCellinfo.iTA)
       
   293         {
       
   294         if(KTAMin <= omaSuplGSMCellinfo.iTA && omaSuplGSMCellinfo.iTA <= KTAMax)
       
   295             {
       
   296             //Initialize
       
   297             }
       
   298         else
       
   299             {
       
   300             //error
       
   301             }
       
   302         }       
       
   303     else
       
   304         {
       
   305         }
       
   306 
       
   307     TOMASuplNmr Nmr;
       
   308     TInt ARFCN;
       
   309     TInt BSIC;
       
   310     TInt RxLEV;
       
   311     
       
   312     for(TInt i = 0; i < KOMASUPLMaxNmrAmount; i++)
       
   313         {
       
   314         Nmr = omaSuplGSMCellinfo.iNmr[i];
       
   315         ARFCN = Nmr.iARFCN; // 0 to 1023  
       
   316         BSIC = Nmr.iBSIC;   // 0 to 63    
       
   317         RxLEV = Nmr.iRxLEV; // 0 to 63   
       
   318          
       
   319         if(ARFCN == KOMASuplOptionalParamNotSet && BSIC == KOMASuplOptionalParamNotSet &&  RxLEV ==  KOMASuplOptionalParamNotSet ) 
       
   320             {
       
   321             //initialize
       
   322             }
       
   323 
       
   324         if(KARFCNMin <= ARFCN && ARFCN <= KARFCNMax && 
       
   325                 KBSICMin  <= BSIC  && BSIC  <= KBSICMax  &&
       
   326                 KRxLEVMin <= RxLEV && RxLEV <= KRxLEVMax)
       
   327             {
       
   328             //initialize
       
   329             }
       
   330         else
       
   331             {
       
   332             //error
       
   333             }   
       
   334 
       
   335         }
       
   336     }
       
   337 // -----------------------------------------------------------------------------
       
   338 // CStubSuplStart::InitializeWCDMAECellId
       
   339 // Other Items were commented in a header
       
   340 // -----------------------------------------------------------------------------
       
   341 //
       
   342 void CStubSuplStart::InitializeWCDMAECellId()
       
   343     {
       
   344     	// In E-Cell id structs, if any of the data field contains -1 as a value, it means that no data is available for that field.
       
   345     TOMASuplWCDMACellinfo  omaSuplWCDMACellinfo;
       
   346     iMmCellInfo.WCDMACellInfo(omaSuplWCDMACellinfo);
       
   347     if(KOMASuplOptionalParamNotSet != omaSuplWCDMACellinfo.iPrimaryScrambilingCode) // means PrimaryScrambilingCode is filled
       
   348         {
       
   349         if(KPrimaryScrambilingCodeMin <= omaSuplWCDMACellinfo.iPrimaryScrambilingCode && omaSuplWCDMACellinfo.iPrimaryScrambilingCode <= KPrimaryScrambilingCodeMax)
       
   350             {
       
   351             //Initialize
       
   352             }
       
   353         else
       
   354             {
       
   355             //error
       
   356             }
       
   357         }       
       
   358     else
       
   359         {
       
   360         //error
       
   361         }
       
   362     
       
   363     FillFrequencyInfo(omaSuplWCDMACellinfo.iFrequencyInfo);
       
   364             
       
   365     FillMeasuredResultsList(omaSuplWCDMACellinfo.iNwkMeasureReport);   
       
   366     }
       
   367 
       
   368 TInt CStubSuplStart::FillFrequencyInfo(TOMASuplFrequencyInfo& aOMASuplFrequencyInfo)
       
   369     {
       
   370     TInt    FddUL = aOMASuplFrequencyInfo.iFddUL;       // 0..16383     In case of fdd( iFddUL, iFddDL),
       
   371     TInt    FddDL = aOMASuplFrequencyInfo.iFddDL;       // 0..16383     iFddUL is optional while iFddDL is mandatory. 
       
   372     TInt    TddDt = aOMASuplFrequencyInfo.iTddNt;       // 0..16383     
       
   373 
       
   374     TInt retError = KErrNone;   
       
   375 
       
   376     if(FddDL != KOMASuplOptionalParamNotSet ) //means FddDL is provided...
       
   377     {
       
   378     if(KFddDLMin <= FddDL && FddDL <= KFddDLMax)
       
   379         {
       
   380         //Initialize here..
       
   381         }
       
   382     else
       
   383         {
       
   384         //error
       
   385         }
       
   386     }
       
   387     else
       
   388         {
       
   389             //error
       
   390         }
       
   391 
       
   392     FillFrequencyInfoULInfo(FddUL,retError);
       
   393 
       
   394     FillFrequencyInfoDT(TddDt,retError);
       
   395 
       
   396     return retError;
       
   397     }
       
   398 
       
   399 void CStubSuplStart::FillFrequencyInfoULInfo(TInt aFddUL,TInt& aRetErrorCode)
       
   400     {
       
   401     if(aFddUL != KOMASuplOptionalParamNotSet && aRetErrorCode == KErrNone )
       
   402         {
       
   403         if(KFddULMin <= aFddUL && aFddUL <= KFddULMax)
       
   404             {
       
   405             //set to message
       
   406               aRetErrorCode = KErrNone;
       
   407             }
       
   408         else
       
   409             {     
       
   410             //error   
       
   411             }
       
   412         }                                                                       
       
   413     }
       
   414 
       
   415 void CStubSuplStart::FillFrequencyInfoDT(TInt aTddDt,TInt& aRetErrorCode)
       
   416     {
       
   417     if(aTddDt != KOMASuplOptionalParamNotSet ) //means TddDt is provided...
       
   418         {
       
   419         if(KTddDtMin <= aTddDt && aTddDt <= KTddDtMax)
       
   420             {
       
   421             //Initialize
       
   422             }
       
   423         else
       
   424             {
       
   425             //error
       
   426             }
       
   427         }
       
   428     else
       
   429         {
       
   430          //error
       
   431         }
       
   432     aRetErrorCode = KErrNone;
       
   433     }
       
   434 
       
   435 TInt CStubSuplStart::FillMeasuredResultsList(TOMASuplNetworkMeasureReport aNwkMeasureReport[])
       
   436     {
       
   437     
       
   438     
       
   439     for(TInt i = 0; i < KOMASUPLMaxNetworkMeasureReports; i++ )
       
   440         {
       
   441         TOMASuplNetworkMeasureReport NwkMeasureReport = aNwkMeasureReport[i];
       
   442         TInt err = FillFrequencyInfo(NwkMeasureReport.iFrequencyInfo);                
       
   443 
       
   444         if(KOMASuplOptionalParamNotSet != NwkMeasureReport.iCarrierRSSI) // means iCarrierRSSI is filled
       
   445             {
       
   446             if(KCarrierRSSIMin <= NwkMeasureReport.iCarrierRSSI && NwkMeasureReport.iCarrierRSSI <= KCarrierRSSIMax)
       
   447                 {  
       
   448                 //initialize
       
   449                 }
       
   450             else
       
   451                 {
       
   452                 //error
       
   453                 }
       
   454             }       
       
   455 
       
   456         err = FillCellMeasuredResult(NwkMeasureReport.iCellMeasuredResult);               
       
   457         }
       
   458     return 0;
       
   459     //Own error code can be set...
       
   460     }
       
   461 
       
   462 TInt CStubSuplStart::FillCellMeasuredResult(TOMASuplCellMeasuredResult aCellMeasuredResult[])
       
   463     {
       
   464 
       
   465     TInt eleCount = 0;
       
   466     for(TInt i = 0; i < KOMASUPLMaxCellMeasuredResults; i++ )
       
   467         {
       
   468         TOMASuplCellMeasuredResult  CellMeasuredResult = aCellMeasuredResult[i];
       
   469         TInt err = FillModeSpecificInfo(CellMeasuredResult);
       
   470         if( err == KErrNone)
       
   471             {
       
   472             //Initialize
       
   473 
       
   474             if(CellMeasuredResult.iCID != KOMASuplOptionalParamNotSet) // CID is present
       
   475                 {
       
   476                 if(KCIDMin <= CellMeasuredResult.iCID && CellMeasuredResult.iCID <= KCIDMax)
       
   477                     {
       
   478                     //Set to message                                
       
   479                     }
       
   480                 else
       
   481                     {
       
   482                        //error
       
   483                     }
       
   484                 }
       
   485             else
       
   486                 {
       
   487                     //error
       
   488                 }
       
   489             eleCount++;
       
   490             }           
       
   491         }
       
   492 
       
   493 
       
   494     if(eleCount != 0 )
       
   495         return KErrNone;
       
   496     else
       
   497         return KErrArgument; 
       
   498     }
       
   499 
       
   500 TInt CStubSuplStart::FillModeSpecificInfo(TOMASuplCellMeasuredResult&  aCellMeasuredResult)
       
   501     {
       
   502 
       
   503     TOMASuplFddInfo     FddInfo = aCellMeasuredResult.iFddInfo;
       
   504     TOMASuplTddInfo     TddInfo = aCellMeasuredResult.iTddInfo;
       
   505 
       
   506     if(FddInfo.iPrimaryCPICH != KOMASuplOptionalParamNotSet) // iPrimaryCPICH is present
       
   507         {
       
   508 
       
   509         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////              
       
   510         if(KPrimaryCPICHMin <= FddInfo.iPrimaryCPICH && FddInfo.iPrimaryCPICH <= KPrimaryCPICHMax)
       
   511             {
       
   512             //Set to message    
       
   513             //initialize
       
   514             }
       
   515         else
       
   516             {
       
   517                //error
       
   518             }
       
   519         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                  
       
   520 
       
   521         if(FddInfo.iCpichEcN0 != KOMASuplOptionalParamNotSet) // iCpichEcN0 is present
       
   522             {
       
   523             if(KCpichEcN0Min <= FddInfo.iCpichEcN0 && FddInfo.iCpichEcN0 <= KCpichEcN0Max)
       
   524                 {
       
   525                 //Set to message                                
       
   526                 }
       
   527             else
       
   528                 {
       
   529                     //error
       
   530                 }
       
   531             }       
       
   532         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                              
       
   533 
       
   534         if(FddInfo.iCichRscp != KOMASuplOptionalParamNotSet) // iCichRscp is present
       
   535             {
       
   536             if(KCichRscpMin <= FddInfo.iCichRscp && FddInfo.iCichRscp <= KCichRscpMax)
       
   537                 {
       
   538                 //Set to message                                
       
   539                 }
       
   540             else
       
   541                 {
       
   542                     //error
       
   543                 }
       
   544             }       
       
   545         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                  
       
   546 
       
   547         if(FddInfo.iPathloss != KOMASuplOptionalParamNotSet) // iPathloss is present
       
   548             {
       
   549             if(KPathlossMin <= FddInfo.iPathloss && FddInfo.iPathloss <= KPathlossMax)
       
   550                 {
       
   551                 //Set to message                                
       
   552                 }
       
   553             else
       
   554                 {
       
   555                     //error
       
   556                 }
       
   557             }       
       
   558         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                  
       
   559         return KErrNone;            
       
   560         }
       
   561     else
       
   562         {
       
   563             //error
       
   564         }
       
   565 
       
   566     if(TddInfo.iCellParamID != KOMASuplOptionalParamNotSet) // iCellParamID is present
       
   567         {
       
   568         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                 
       
   569         if(KCellParamIDMin <= TddInfo.iCellParamID && TddInfo.iCellParamID <= KCellParamIDMax)
       
   570             {
       
   571             //Set to message
       
   572             }
       
   573         else
       
   574             {
       
   575                 //error
       
   576             }
       
   577            
       
   578         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                                         
       
   579 
       
   580         if(TddInfo.iProposedTGSN != KOMASuplOptionalParamNotSet) // iProposedTGSN is present
       
   581             {
       
   582             if(KProposedTGSNMin <= TddInfo.iProposedTGSN && TddInfo.iProposedTGSN <= KProposedTGSNMax)
       
   583                 {
       
   584                 //Set to message    
       
   585                 }
       
   586             else
       
   587                 {
       
   588                     //error
       
   589                 }
       
   590             }       
       
   591 
       
   592         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                                         
       
   593 
       
   594         if(TddInfo.iPrimaryCcpchRscp != KOMASuplOptionalParamNotSet) // iPrimaryCcpchRscp is present
       
   595             {
       
   596             if(KPrimaryCcpchRscpMin <= TddInfo.iPrimaryCcpchRscp && TddInfo.iPrimaryCcpchRscp <= KPrimaryCcpchRscpMax)
       
   597                 {
       
   598                 //Set to message           
       
   599                 }
       
   600             else
       
   601                 {
       
   602                     //error
       
   603                 }
       
   604             }       
       
   605 
       
   606         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                                         
       
   607 
       
   608         if(TddInfo.iPathloss != KOMASuplOptionalParamNotSet) // iPathloss is present
       
   609             {
       
   610             if(KPathlossMin <= TddInfo.iPathloss && TddInfo.iPathloss <= KPathlossMax)
       
   611                 {
       
   612                 //Set to message                                
       
   613                 }
       
   614             else
       
   615                 {
       
   616                    //error
       
   617                 }
       
   618             }       
       
   619         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                  
       
   620         TInt eleCount = 0; 
       
   621         for(TInt i = 0; i < KOMASUPLMaxTimeSlotIscpAmount; i++)
       
   622             {
       
   623             if(TddInfo.iTimeslotISCP[i] != KOMASuplOptionalParamNotSet && KTimeslotISCPMin <= TddInfo.iTimeslotISCP[i] && TddInfo.iTimeslotISCP[i] <= KTimeslotISCPMax)
       
   624                 {
       
   625                 //Set to message                                
       
   626                 //Set to message that its not optional
       
   627                 eleCount++;
       
   628                 }
       
   629             else
       
   630                 {
       
   631                     //error
       
   632                 }
       
   633 
       
   634             }
       
   635         //////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                  
       
   636         //          
       
   637         return KErrNone;
       
   638         }
       
   639     else
       
   640         {
       
   641             //error
       
   642         }
       
   643     return 0;
       
   644     //Own error code can be set...
       
   645     }