diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mts/MTS_IO_CellularRadio.h | 17 | ||||
-rw-r--r-- | include/mts/MTS_IO_EG95Radio.h | 44 | ||||
-rw-r--r-- | include/mts/MTS_IO_QuectelRadio.h | 55 | ||||
-rw-r--r-- | include/mts/MTS_IO_TelitRadio.h | 11 |
4 files changed, 102 insertions, 25 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h index acb235b..899ceeb 100644 --- a/include/mts/MTS_IO_CellularRadio.h +++ b/include/mts/MTS_IO_CellularRadio.h @@ -66,15 +66,12 @@ namespace MTS { CODE getMsid(std::string& sMsid) override; CODE getType(std::string& sType) override; CODE getCarrier(std::string& sCarrier) override; - CODE getNetwork(std::string& sNetwork) override; CODE getTower(std::string& sTower) override; CODE getTime(std::string& sDate, std::string& sTime, std::string& sTimeZone) override; CODE getRoaming(bool& bRoaming) override; CODE getSignalStrength(int32_t& iRssi) override; CODE getModemLocation(std::string& sLocation) override; - CODE convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& dBm) override; - CODE convertdBmToSignalStrength(const int32_t& dBm, int32_t& iRssi) override; CODE getRegistration(REGISTRATION& eRegistration) override; CODE convertRegistrationToString(REGISTRATION eRegistration, std::string& sRegistration) override; @@ -120,12 +117,18 @@ namespace MTS { CellularRadio(const std::string& sName, const std::string& sRadioPort); - virtual bool getCarrierFromFirmware(const std::string& sFirmware, std::string& sCarrier); - virtual bool getHardwareVersionFromFirmware(const std::string& sFirmware, std::string& sHardware); + virtual bool getCarrierFromFirmware(const std::string& sFirmware, std::string& sCarrier) = 0; + virtual bool getHardwareVersionFromFirmware(const std::string& sFirmware, std::string& sHardware) = 0; + virtual void getCommonNetworkStats(Json::Value& jData); + void initMipProfile(Json::Value& jData); bool splitAndAssign(const std::string& sLine, const std::string& sKey, Json::Value& jParent, const std::string& sJsonKey, Json::ValueType eType = Json::ValueType::stringValue); + virtual std::string queryLteLac(); + virtual std::string queryCGREGstring(); + virtual void setCGREG(std::string value); + class RadioBandMap : public MTS::NonCopyable { public: RadioBandMap() @@ -167,10 +170,6 @@ namespace MTS { bool m_bEchoEnabled; bool m_bEnableEchoOnClose; - - std::string queryLteLac(); - std::string queryCGREGstring(); - void setCGREG(std::string value); }; } } diff --git a/include/mts/MTS_IO_EG95Radio.h b/include/mts/MTS_IO_EG95Radio.h index 206d15d..f3021cc 100644 --- a/include/mts/MTS_IO_EG95Radio.h +++ b/include/mts/MTS_IO_EG95Radio.h @@ -1,17 +1,47 @@ -#ifndef MTS_IO_EG95RADIO_H -#define MTS_IO_EG95RADIO_H +/* + * Copyright (C) 2019 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/>. + * + */ + + +#ifndef MTS_IO_EG95RADIO_H_ +#define MTS_IO_EG95RADIO_H_ #include "mts/MTS_IO_QuectelRadio.h" namespace MTS { namespace IO { - class EG95Radio : public QuectelRadio - { - public: - static const std::string MODEL_NAME; + + class EG95Radio : public QuectelRadio { + + public: + static const std::string MODEL_NAME; + + EG95Radio(const std::string& sPort); + virtual ~EG95Radio(); + CODE setRxDiversity(const Json::Value& jArgs); + + protected: + + private: }; } } -#endif +#endif /* MTS_IO_EG95RADIO_H_ */ diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h index 55eac60..b486323 100644 --- a/include/mts/MTS_IO_QuectelRadio.h +++ b/include/mts/MTS_IO_QuectelRadio.h @@ -1,15 +1,60 @@ -#ifndef MTS_IO_QUECTELRADIO_H -#define MTS_IO_QUECTELRADIO_H +/* + * Copyright (C) 2019 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/>. + * + */ + +#ifndef MTS_IO_QUECTELRADIO_H_ +#define MTS_IO_QUECTELRADIO_H_ #include <mts/MTS_IO_CellularRadio.h> namespace MTS { namespace IO { - class QuectelRadio : public CellularRadio - { + + class QuectelRadio : public CellularRadio { + + public: + bool resetRadio(uint32_t iTimeoutMillis = 5000) override; + + CODE getModel(std::string& sModel) override; + CODE getIccid(std::string& sIccid) override; + CODE getService(std::string& sService) override; + CODE getNetwork(std::string& sNetwork) override; + CODE getNetworkStatus(Json::Value& jData) override; + + CODE convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& dBm) override; + CODE convertdBmToSignalStrength(const int32_t& dBm, int32_t& iRssi) override; + + CODE setMdn(const Json::Value& jArgs) override; + + protected: + QuectelRadio(const std::string& sName, const std::string& sRadioPort); + + bool getCarrierFromFirmware(const std::string& sFirmware, std::string& sCarrier) override; + bool getHardwareVersionFromFirmware(const std::string& sFirmware, std::string& sHardware) override; + + virtual CODE getServiceDomain(SERVICEDOMAIN& sd); + virtual CODE convertToActiveBand(const std::string& sQuectelBand, ACTIVEBAND& band); + + private: }; } } -#endif +#endif /* MTS_IO_QUECTELRADIO_H_ */ diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h index 0c95f98..70ff8a9 100644 --- a/include/mts/MTS_IO_TelitRadio.h +++ b/include/mts/MTS_IO_TelitRadio.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. * @@ -32,7 +32,12 @@ namespace MTS { CODE getModel(std::string& sModel) override; CODE getIccid(std::string& sIccid) override; CODE getService(std::string& sService) override; + CODE getNetwork(std::string& sNetwork) override; CODE getNetworkStatus(Json::Value& jData) override; + + CODE convertSignalStrengthTodBm(const int32_t& iRssi, int32_t& dBm) override; + CODE convertdBmToSignalStrength(const int32_t& dBm, int32_t& iRssi) override; + CODE setMdn(const Json::Value& jArgs) override; protected: @@ -42,9 +47,7 @@ namespace MTS { bool getHardwareVersionFromFirmware(const std::string& sFirmware, std::string& sHardware) override; private: - std::string queryLteLac(); - std::string queryCGREGstring(); - void setCGREG(std::string value); + }; } } |