diff options
| author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-06-11 15:59:49 +0300 | 
|---|---|---|
| committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-06-11 16:26:17 +0300 | 
| commit | 16c34c61203dee01c8091b92df1bdf0a399af32f (patch) | |
| tree | 0c1df7ca8dbe4229e67c87ab77717846016b81ea /src | |
| parent | f335cec14c262b22f8d9f84e528917d7b1a53fa5 (diff) | |
| download | libmts-io-16c34c61203dee01c8091b92df1bdf0a399af32f.tar.gz libmts-io-16c34c61203dee01c8091b92df1bdf0a399af32f.tar.bz2 libmts-io-16c34c61203dee01c8091b92df1bdf0a399af32f.zip | |
[MTS-MTQ] QuectelRadio implementation
Removed Telit-specific implementation of the getCarrierFromFirmware and
getHardwareVersionFromFirmware out of the QuectelRadio class.
BTW, it's still present in the TelitRadio class.
Diffstat (limited to 'src')
| -rw-r--r-- | src/MTS_IO_CellularRadio.cpp | 81 | 
1 files changed, 0 insertions, 81 deletions
| diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp index e3927ea..092da35 100644 --- a/src/MTS_IO_CellularRadio.cpp +++ b/src/MTS_IO_CellularRadio.cpp @@ -991,87 +991,6 @@ bool CellularRadio::splitAndAssign(const std::string& sLine, const std::string&      return true;  } -bool CellularRadio::getCarrierFromFirmware(const std::string& sFirmware, std::string& sCarrier) { -    // Telit Radios -    //    H.ab.zyx => 3 Main Components -    //    "H" = Hardware -> 15 = DE910 family, 18 = CE910 family, 12 = HE910 family -    //    "a" = Hardware version -    //    "b" = Software Major Version -    //    "z" = is the product type, i.e. DUAL or SC -    //    "y" = is the carrier variant -    //    "x" = is the firmware version -    //    Telit will do their best to keep the carrier variant as "0" for Sprint, "1" for Aeris, "2" for Verizon, and "3" for U.S. Cellular. - -    const uint32_t CARRIER_INDEX = 1;   //y in [zyx] - -    bool bResult = false; -    std::vector<std::string> vParts = MTS::Text::split(sFirmware, '.'); - -    if(vParts.size() == 3) { -        //CDMA firmware version notation -        if(vParts[0] == "15" || vParts[0] == "18") { -            //DE910 or CE910 -> Good good -            std::string sID = vParts[2]; -            if(sID.size() == 3) { -                char cId = sID[CARRIER_INDEX]; - -                //Good good -                if(cId == '0') { -                    sCarrier = VALUE_CARRIER_SPRINT; -                    bResult = true; -                } else -                if(cId == '1') { -                    sCarrier = VALUE_CARRIER_AERIS; -                    bResult = true; -                } else -                if(cId == '2') { -                    sCarrier = VALUE_CARRIER_VERIZON; -                    bResult = true; -                } else -                if(cId == '3') { -                    sCarrier = VALUE_CARRIER_USCELLULAR; -                    bResult = true; -                } -            } -        } -    } - -    return bResult; -} - -bool CellularRadio::getHardwareVersionFromFirmware(const std::string& sFirmware, std::string& sHardware) { -    // Telit Radios -    //    H.ab.zyx => 3 Main Components -    //    "H" = Hardware -> 15 = DE910 family, 18 = CE910 family, 12 = HE910 family -    //    "a" = Hardware version -    //    "b" = Software Major Version -    //    "z" = is the product type, i.e. DUAL or SC -    //    "y" = is the carrier variant -    //    "x" = is the firmware version -    //    Telit will do their best to keep the carrier variant as "0" for Sprint, "1" for Aeris, and "2" for Verizon. - -    const uint32_t HARDWARE_INDEX = 0;   //a in [ab] - -    bool bResult = false; -    std::vector<std::string> vParts = MTS::Text::split(sFirmware, '.'); - -    if(vParts.size() == 3) { -        //GSM Hardware Version -        if(!(vParts[0] == "15" || vParts[0] == "18")) { -            //Not DE910 or CE910 -> Good good -            std::string sVersion = vParts[1]; -            if(sVersion.size() == 2) { -                sHardware = "1."; -                sHardware += sVersion[HARDWARE_INDEX]; -                bResult = true; -            } -        } -    } - -    return bResult; - -} -  const char *CellularRadio::RadioBandMap::getLTEBand(const int32_t channel)  {      for (unsigned int ii = 0; ii < NUM_LTE_BANDS; ii++) | 
