From da563a985ccb0b5f316b44e35aabd511687ff4bf Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Thu, 6 Jun 2019 16:03:44 +0300 Subject: [MTS-MTQ] refactoring: added quectel empty classes, CellularRadio moved to TelitRadio --- include/mts/MTS_IO_CellularRadioFactory.h | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'include/mts/MTS_IO_CellularRadioFactory.h') diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index 49f63bd..501f314 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -21,7 +21,7 @@ #ifndef MTS_IO_CELLULARRADIOFACTORY_H_ #define MTS_IO_CELLULARRADIOFACTORY_H_ -#include +#include #include #include @@ -39,26 +39,26 @@ namespace MTS { CellularRadioFactory(); virtual ~CellularRadioFactory() {}; - virtual CellularRadio* create(const std::string& sModel, const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - - virtual CellularRadio* createHE910D(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createHE910EUD(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910NAG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C4NF(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910NA1(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910SVG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910EUG(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C4EU(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910EU1(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C1NS(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C1AP(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createME910C1NA(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createME910C1NV(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createME910C1WW(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createGE910(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createDE910(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createCE910(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE866A1JS(const std::string& sPort = CellularRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* create(const std::string& sModel, const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + + virtual CellularRadio* createHE910D(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createHE910EUD(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910NAG(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910C4NF(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910NA1(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910SVG(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910EUG(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910C4EU(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910EU1(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910C1NS(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE910C1AP(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createME910C1NA(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createME910C1NV(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createME910C1WW(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createGE910(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createDE910(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createCE910(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual CellularRadio* createLE866A1JS(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); protected: typedef MTS::IO::CellularRadio* (CellularRadioFactory::*CREATEFUNCPTR)(const std::string& sPort); -- cgit v1.2.3 From 55c18e47596b6be9f19b33deb6c5cd0e798decd8 Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Fri, 7 Jun 2019 12:38:11 +0300 Subject: [MTS-MTQ] refactoring: public symbols visibility Make exported ICellularRadio and CellularRadioFactory only --- include/mts/MTS_IO_CellularRadioFactory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/mts/MTS_IO_CellularRadioFactory.h') diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index 501f314..540ed29 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -21,6 +21,7 @@ #ifndef MTS_IO_CELLULARRADIOFACTORY_H_ #define MTS_IO_CELLULARRADIOFACTORY_H_ +#include #include #include #include @@ -32,7 +33,7 @@ namespace MTS { class GE910Radio; class DE910Radio; class CE910Radio; - class CellularRadioFactory { + class EXPORT CellularRadioFactory { public: -- cgit v1.2.3 From 402354f2410917888a7d4b04a2cbc3a76a321549 Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Fri, 7 Jun 2019 13:56:26 +0300 Subject: [MTS-MTQ] refactoring: factory interface --- include/mts/MTS_IO_CellularRadioFactory.h | 51 ++++++++++++++----------------- 1 file changed, 23 insertions(+), 28 deletions(-) (limited to 'include/mts/MTS_IO_CellularRadioFactory.h') diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index 540ed29..c26e642 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -21,18 +21,13 @@ #ifndef MTS_IO_CELLULARRADIOFACTORY_H_ #define MTS_IO_CELLULARRADIOFACTORY_H_ -#include -#include #include #include +#include + namespace MTS { namespace IO { - - class HE910Radio; - class GE910Radio; - class DE910Radio; - class CE910Radio; class EXPORT CellularRadioFactory { public: @@ -40,29 +35,29 @@ namespace MTS { CellularRadioFactory(); virtual ~CellularRadioFactory() {}; - virtual CellularRadio* create(const std::string& sModel, const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - - virtual CellularRadio* createHE910D(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createHE910EUD(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910NAG(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C4NF(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910NA1(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910SVG(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910EUG(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C4EU(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910EU1(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C1NS(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE910C1AP(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createME910C1NA(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createME910C1NV(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createME910C1WW(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createGE910(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createDE910(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createCE910(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); - virtual CellularRadio* createLE866A1JS(const std::string& sPort = TelitRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* create(const std::string& sModel, const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + + virtual ICellularRadio* createHE910D(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createHE910EUD(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910NAG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910C4NF(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910NA1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910SVG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910EUG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910C4EU(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910EU1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910C1NS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE910C1AP(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createME910C1NA(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createME910C1NV(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createME910C1WW(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createGE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createDE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createCE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + virtual ICellularRadio* createLE866A1JS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); protected: - typedef MTS::IO::CellularRadio* (CellularRadioFactory::*CREATEFUNCPTR)(const std::string& sPort); + typedef MTS::IO::ICellularRadio* (CellularRadioFactory::*CREATEFUNCPTR)(const std::string& sPort); std::map< std::string, CREATEFUNCPTR > m_mCreationMap; virtual std::string identifyRadio(const std::string& sPort); -- cgit v1.2.3 From 2fe0784ab57aa5571e5cd70c1776eecda635b3c0 Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Tue, 11 Jun 2019 16:49:09 +0300 Subject: [MTS-MTQ] cellular factory: quectel eg95 instance creation --- include/mts/MTS_IO_CellularRadioFactory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/mts/MTS_IO_CellularRadioFactory.h') diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index c26e642..bd5db43 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -55,6 +55,7 @@ namespace MTS { virtual ICellularRadio* createDE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); virtual ICellularRadio* createCE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); virtual ICellularRadio* createLE866A1JS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + ICellularRadio* createEG95Radio(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); protected: typedef MTS::IO::ICellularRadio* (CellularRadioFactory::*CREATEFUNCPTR)(const std::string& sPort); -- cgit v1.2.3 From 5c8318bea803966f5b883c986919787e77e514a5 Mon Sep 17 00:00:00 2001 From: Maksym Telychko Date: Tue, 11 Jun 2019 16:55:28 +0300 Subject: [MTS-MTQ] refactoring cellular factory: non interface class shouldn't have such virtual methods --- include/mts/MTS_IO_CellularRadioFactory.h | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'include/mts/MTS_IO_CellularRadioFactory.h') diff --git a/include/mts/MTS_IO_CellularRadioFactory.h b/include/mts/MTS_IO_CellularRadioFactory.h index bd5db43..c9cb56f 100644 --- a/include/mts/MTS_IO_CellularRadioFactory.h +++ b/include/mts/MTS_IO_CellularRadioFactory.h @@ -35,30 +35,30 @@ namespace MTS { CellularRadioFactory(); virtual ~CellularRadioFactory() {}; - virtual ICellularRadio* create(const std::string& sModel, const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - - virtual ICellularRadio* createHE910D(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createHE910EUD(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910NAG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910C4NF(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910NA1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910SVG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910EUG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910C4EU(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910EU1(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910C1NS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE910C1AP(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createME910C1NA(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createME910C1NV(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createME910C1WW(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createGE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createDE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createCE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - virtual ICellularRadio* createLE866A1JS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); - ICellularRadio* createEG95Radio(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + ICellularRadio* create(const std::string& sModel, const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT); + + ICellularRadio* createHE910D(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; + ICellularRadio* createHE910EUD(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; + ICellularRadio* createLE910NAG(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; + 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* 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; + ICellularRadio* createCE910(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; + ICellularRadio* createLE866A1JS(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; + ICellularRadio* createEG95Radio(const std::string& sPort = ICellularRadio::DEFAULT_RADIO_PORT) const; protected: - typedef MTS::IO::ICellularRadio* (CellularRadioFactory::*CREATEFUNCPTR)(const std::string& sPort); + typedef MTS::IO::ICellularRadio* (CellularRadioFactory::*CREATEFUNCPTR)(const std::string& sPort) const; std::map< std::string, CREATEFUNCPTR > m_mCreationMap; virtual std::string identifyRadio(const std::string& sPort); -- cgit v1.2.3