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 --- src/MTS_IO_EG95Radio.cpp | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/MTS_IO_EG95Radio.cpp (limited to 'src/MTS_IO_EG95Radio.cpp') diff --git a/src/MTS_IO_EG95Radio.cpp b/src/MTS_IO_EG95Radio.cpp new file mode 100644 index 0000000..2fca48f --- /dev/null +++ b/src/MTS_IO_EG95Radio.cpp @@ -0,0 +1 @@ +#include "mts/MTS_IO_EG95Radio.h" -- 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 --- src/MTS_IO_EG95Radio.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/MTS_IO_EG95Radio.cpp') diff --git a/src/MTS_IO_EG95Radio.cpp b/src/MTS_IO_EG95Radio.cpp index 2fca48f..6feee41 100644 --- a/src/MTS_IO_EG95Radio.cpp +++ b/src/MTS_IO_EG95Radio.cpp @@ -1 +1,5 @@ #include "mts/MTS_IO_EG95Radio.h" + +using namespace MTS::IO; + +const std::string EG95Radio::MODEL_NAME("EG95"); -- cgit v1.2.3 From c316cdffa1749a17b7f106ea526ac2288074920b Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Wed, 12 Jun 2019 09:42:22 +0300 Subject: [MTS-MTQ] QuectelRadio implementation Added a proper implementation of the EG95Radio class --- src/MTS_IO_EG95Radio.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'src/MTS_IO_EG95Radio.cpp') diff --git a/src/MTS_IO_EG95Radio.cpp b/src/MTS_IO_EG95Radio.cpp index 6feee41..8469454 100644 --- a/src/MTS_IO_EG95Radio.cpp +++ b/src/MTS_IO_EG95Radio.cpp @@ -1,5 +1,47 @@ -#include "mts/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 . + * + */ + + +#include using namespace MTS::IO; const std::string EG95Radio::MODEL_NAME("EG95"); + +EG95Radio::EG95Radio(const std::string& sPort) +: QuectelRadio(MODEL_NAME, sPort) +{ + +} + +EG95Radio::~EG95Radio() { + +} + +EG95Radio::CODE EG95Radio::setRxDiversity(const Json::Value& jArgs) { + /* Command string for EG95 radios: AT+QCFG="diversity",(0-1) */ + if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0") { + return FAILURE; + } + std::string sCmd = "AT+QCFG=\"diversity\","; + sCmd += jArgs["enabled"].asString(); + + return sendBasicCommand(sCmd); +} -- cgit v1.2.3 From 0330513b8913d1d7bf14bad99d64ab002b770b7c Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Thu, 18 Jul 2019 11:41:24 +0300 Subject: [MTR-MTQ] Namespace-related usage improvements Restored full qualification of the ICellularRadio::CODE object type for all files that used full qualification before (effectively, for all source files and only one header file). This commit partially reverses 53efcef2e2f521135b323e194c45f1d9fa7b5d5d. --- src/MTS_IO_EG95Radio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/MTS_IO_EG95Radio.cpp') diff --git a/src/MTS_IO_EG95Radio.cpp b/src/MTS_IO_EG95Radio.cpp index 8469454..5c9ed69 100644 --- a/src/MTS_IO_EG95Radio.cpp +++ b/src/MTS_IO_EG95Radio.cpp @@ -35,7 +35,7 @@ EG95Radio::~EG95Radio() { } -EG95Radio::CODE EG95Radio::setRxDiversity(const Json::Value& jArgs) { +ICellularRadio::CODE EG95Radio::setRxDiversity(const Json::Value& jArgs) { /* Command string for EG95 radios: AT+QCFG="diversity",(0-1) */ if (jArgs["enabled"].asString() != "1" && jArgs["enabled"].asString() != "0") { return FAILURE; -- cgit v1.2.3