diff options
Diffstat (limited to 'include/mts')
-rw-r--r-- | include/mts/MTS_IO_CellularRadio.h | 6 | ||||
-rw-r--r-- | include/mts/MTS_IO_CellularRadioFactory.h | 3 | ||||
-rw-r--r-- | include/mts/MTS_IO_ICellularRadio.h | 4 | ||||
-rw-r--r-- | include/mts/MTS_IO_LE910SV1Radio.h (renamed from include/mts/MTS_IO_ME910C1NARadio.h) | 27 | ||||
-rw-r--r-- | include/mts/MTS_IO_ME910C1NVRadio.h | 77 | ||||
-rw-r--r-- | include/mts/MTS_IO_ME910C1WWRadio.h | 23 |
6 files changed, 43 insertions, 97 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index 1e80274..56506af 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -78,6 +78,8 @@ namespace MTS { CODE getRegistration(REGISTRATION& eRegistration) override; CODE convertRegistrationToString(REGISTRATION eRegistration, std::string& sRegistration) override; + CODE convertCellModesToString(CELLULAR_MODES eCellModes, std::string& sCellModes) override; + CODE unlockSimCard(const Json::Value& jArgs) override; CODE getMipProfile(Json::Value& jMipProfile) override; @@ -168,6 +170,10 @@ namespace MTS { virtual std::string queryCGREGstring(); virtual void setCGREG(std::string value); + const std::vector<std::string> getRegistrationCommands(); + REGISTRATION parseRegResponse(std::string sResult); + CODE getRegistration(REGISTRATION& eRegistration, const std::string& sType); + class RadioBandMap : public MTS::NonCopyable { public: RadioBandMap() diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index c9cb56f..e57ca5e 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -43,13 +43,12 @@ namespace MTS { ICellularRadio* createLE910C4NF(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910NA1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910SVG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; + ICellularRadio* createLE910SV1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910EUG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910C4EU(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910EU1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910C1NS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createLE910C1AP(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; - ICellularRadio* createME910C1NA(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; - ICellularRadio* createME910C1NV(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createME910C1WW(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createGE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; ICellularRadio* createDE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index 57d6f53..58d5076 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -126,12 +126,14 @@ namespace MTS { static const char *KEY_CARRIER; //!< Cellular Service Provider (Home Network) static const char *KEY_ICCID; //!< Integrated Circuit Card Identifier static const char *KEY_MSL; //!< Master Subsidy Lock + static const char *KEY_SUPPORTED_CELL_MODES; //!< Comma-separated list of all supported cellular modes (2g,3g,4g) //Network Status Data static const char *KEY_ROAMING; //!< Indicates whether or not using Home Network static const char *KEY_DATETIME; //!< Date and Time from tower static const char *KEY_SERVICE; //!< Service Connection Type [GPRS, EGPRS, WCDMA, HSDPA, 1xRTT, EVDO] + static const char *KEY_CELL_MODE; //!< Specifies the cellular mode that is currently used by the modem [2g, 3g, 4g] static const char *KEY_NETWORK; //!< Cellular Service Provider static const char *KEY_NETWORK_REG; //!< Network Registration static const char *KEY_CID; //!< Cellular ID (Tower) in HEX @@ -266,6 +268,8 @@ namespace MTS { virtual CODE getRegistration(REGISTRATION& eRegistration) = 0; virtual CODE convertRegistrationToString(REGISTRATION eRegistration, std::string& sRegistration) = 0; + virtual CODE convertCellModesToString(CELLULAR_MODES eCellModes, std::string& sCellModes) = 0; + /** * @brief unlockSimCard - unlock the SIM card using PIN code provided * diff --git a/include/mts/MTS_IO_ME910C1NARadio.h b/include/mts/MTS_IO_LE910SV1Radio.h index e8120bd..80536c1 100644 --- a/include/mts/MTS_IO_ME910C1NARadio.h +++ b/include/mts/MTS_IO_LE910SV1Radio.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 by Multi-Tech Systems + * Copyright (C) 2019 by Multi-Tech Systems * * This file is part of libmts-io. * @@ -18,33 +18,24 @@ * */ -/*! - \file MTS_IO_ME910C1NARadio.h - \brief A brief description - \date Jan 19, 2015 - \author sgodinez - A more elaborate description -*/ -#ifndef MTS_IO_ME910C1NARADIO_H_ -#define MTS_IO_ME910C1NARADIO_H_ +#ifndef MTS_IO_LE910SV1RADIO_H_ +#define MTS_IO_LE910SV1RADIO_H_ -#include <mts/MTS_IO_ME910Radio.h> +#include "mts/MTS_IO_LE910Radio.h" namespace MTS { namespace IO { - class ME910C1NARadio : public ME910Radio { + class LE910SV1Radio : public LE910Radio { public: static const std::string MODEL_NAME; - ME910C1NARadio(const std::string& sPort); - virtual ~ME910C1NARadio(){}; + LE910SV1Radio(const std::string& sPort); + virtual ~LE910SV1Radio(){}; - virtual CODE setActiveFirmware(const Json::Value& jArgs); - - virtual CODE getActiveFirmware(std::string& sFwId); + virtual CODE getCarrier(std::string& sCarrier); protected: @@ -54,4 +45,4 @@ namespace MTS { } } -#endif /* MTS_IO_ME910C1NARADIO_H_ */ +#endif /* MTS_IO_LE910SV1RADIO_H_ */ diff --git a/include/mts/MTS_IO_ME910C1NVRadio.h b/include/mts/MTS_IO_ME910C1NVRadio.h deleted file mode 100644 index 3d0b3b0..0000000 --- a/include/mts/MTS_IO_ME910C1NVRadio.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2018 by Multi-Tech Systems - * - * This file is part of libmts-io. - * - * libmts-io is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * libmts-io is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with libmts-io. If not, see <http://www.gnu.org/licenses/>. - * - */ - -/*! - \file MTS_IO_ME910C1NVRadio.h - \brief A brief description - \date May 1, 2018 - \author mykyta.dorokhin - - A more elaborate description -*/ -#ifndef MTS_IO_ME910C1NVRadio_H_ -#define MTS_IO_ME910C1NVRadio_H_ - -#include <mts/MTS_IO_ME910Radio.h> - -namespace MTS { - namespace IO { - - class ME910C1NVRadio : public ME910Radio { - - public: - static const std::string MODEL_NAME; - - ME910C1NVRadio(const std::string& sPort); - virtual ~ME910C1NVRadio(){}; - - virtual CODE updateFumo(const Json::Value& jArgs, UpdateCb& stepCb); - virtual CODE getCarrier(std::string& sCarrier); - - protected: - - CODE doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild); - - private: - static const std::string KEY_FUMO_PDPID; //!< PDP context id (default 3) - static const std::string KEY_FUMO_PDPTYPE; //!< PDP context type (default IPV4V6) - static const std::string KEY_FUMO_APN; //!< APN (default empty) - static const std::string KEY_FUMO_ADDRESS; //!< FTP server address - static const std::string KEY_FUMO_DIR; //!< Directory - static const std::string KEY_FUMO_FILE; //!< Name of the upgrade file - static const std::string KEY_FUMO_USER; //!< Username - static const std::string KEY_FUMO_PASSWORD; //!< Password - static const std::string KEY_FUMO_DRYRUN; //!< If set, do not apply the downloaded firmware - - CODE doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig); - CODE doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb); - CODE doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb); - - std::string m_sFw; - std::string m_sFwBuild; - }; - } -} - -#endif /* MTS_IO_ME910C1NVRadio_H_ */ diff --git a/include/mts/MTS_IO_ME910C1WWRadio.h b/include/mts/MTS_IO_ME910C1WWRadio.h index d45d86a..9605862 100644 --- a/include/mts/MTS_IO_ME910C1WWRadio.h +++ b/include/mts/MTS_IO_ME910C1WWRadio.h @@ -36,10 +36,33 @@ namespace MTS { ICellularRadio::CODE setActiveFirmware(const Json::Value& jArgs); ICellularRadio::CODE getActiveFirmware(std::string& sFwId); + virtual CODE updateFumo(const Json::Value& jArgs, UpdateCb& stepCb); + protected: + CODE doGetFirmwareNumbers(std::string &sFirmware, std::string &sFirmwareBuild); + private: + static const std::string KEY_FUMO_PDPID; //!< PDP context id (default 3) + static const std::string KEY_FUMO_PDPTYPE; //!< PDP context type (default IPV4V6) + static const std::string KEY_FUMO_APN; //!< APN (default empty) + static const std::string KEY_FUMO_ADDRESS; //!< FTP server address + static const std::string KEY_FUMO_DIR; //!< Directory + static const std::string KEY_FUMO_FILE; //!< Name of the upgrade file + static const std::string KEY_FUMO_USER; //!< Username + static const std::string KEY_FUMO_PASSWORD; //!< Password + static const std::string KEY_FUMO_DRYRUN; //!< If set, do not apply the downloaded firmware + + CODE doFumoPerform(const Json::Value &jConfig, UpdateCb& stepCb); + CODE doFumoReadConfig(const Json::Value& jArgs, Json::Value &jConfig); + CODE doFumoSetup(const Json::Value &jConfig, UpdateCb& stepCb); + CODE doFumoFtp(const Json::Value &jConfig, UpdateCb& stepCb); + CODE doFumoCleanup(const Json::Value &jConfig, UpdateCb& stepCb); + CODE doFumoApplyFirmware(const Json::Value &jConfig, UpdateCb& stepCb); + CODE doFumoWaitNewFirmware(const Json::Value &jConfig, UpdateCb& stepCb); + std::string m_sFw; + std::string m_sFwBuild; }; } } |