summaryrefslogtreecommitdiff
path: root/src/MTS_IO_CellularRadio.cpp
diff options
context:
space:
mode:
authorAndrii Pientsov <andrii.pientsov@globallogic.com>2020-07-06 12:58:51 -0500
committerAndrii Pientsov <andrii.pientsov@globallogic.com>2020-07-06 12:58:51 -0500
commit9e007df4a7e3fafff27a0c3fa11d4ba53e785985 (patch)
tree48851ebc4c9dbb8c4f7d9885453aa1986ac41148 /src/MTS_IO_CellularRadio.cpp
parent343e662b6224cf03fea5ebfd419c7cf990528b53 (diff)
parent63b1b15a510ff3acdc4f93bbac1ed14548e6620b (diff)
downloadlibmts-io-9e007df4a7e3fafff27a0c3fa11d4ba53e785985.tar.gz
libmts-io-9e007df4a7e3fafff27a0c3fa11d4ba53e785985.tar.bz2
libmts-io-9e007df4a7e3fafff27a0c3fa11d4ba53e785985.zip
Merge branch 'sk/quectel-delta-fwu' into 'delta-radio-fwu'
Quectel Delta Radio Firmware Upgrade support - libmts-io implementation See merge request !26
Diffstat (limited to 'src/MTS_IO_CellularRadio.cpp')
-rw-r--r--src/MTS_IO_CellularRadio.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index b18478e..bb7cd40 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -1051,6 +1051,30 @@ ICellularRadio::CODE CellularRadio::updateFumo(const Json::Value&, UpdateCb&) {
return NOT_APPLICABLE;
}
+ICellularRadio::CODE CellularRadio::updateFumoLocal(int, ICellularRadio::UpdateCb&) {
+ printTrace("%s| Update Local Firmware Update Management Object", m_sName.c_str());
+
+ return NOT_APPLICABLE;
+}
+
+ICellularRadio::CODE CellularRadio::fumoLocalInject(int, ICellularRadio::UpdateCb&) {
+ printTrace("%s| Inject Delta Firmware Image File: not applicable", m_sName.c_str());
+
+ return NOT_APPLICABLE;
+}
+
+ICellularRadio::CODE CellularRadio::fumoLocalApply(ICellularRadio::UpdateCb&) {
+ printTrace("%s| Apply Delta Firmware Image File: not applicable", m_sName.c_str());
+
+ return NOT_APPLICABLE;
+}
+
+ICellularRadio::CODE CellularRadio::fumoLocalCleanup() {
+ printTrace("%s| Cleanup Delta Firmware Image File: not applicable", m_sName.c_str());
+
+ return NOT_APPLICABLE;
+}
+
ICellularRadio::CODE CellularRadio::resetHfa(const Json::Value&, UpdateCb&) {
printTrace("%s| HFA Reset", m_sName.c_str());
@@ -1103,6 +1127,23 @@ std::string CellularRadio::sendCommand(const std::string& sCmd, MTS::IO::Cellula
return ICellularRadio::sendCommand(m_apIo, sCmd, isNeedMoreData, timeoutMillis, ESC);
}
+ICellularRadio::CODE CellularRadio::sendData(const char* pData, size_t nBytes) {
+ if(m_apIo.isNull()) {
+ printError("RADIO| IO is not set in sendData");
+ return ERROR;
+ }
+
+ int32_t iResult;
+ iResult = m_apIo->write(pData, nBytes);
+
+ if(iResult == -1) {
+ printError("RADIO| Failed to send data to radio");
+ return ERROR;
+ }
+
+ return SUCCESS;
+}
+
bool CellularRadio::splitAndAssign(const std::string& sLine, const std::string& sKey, Json::Value& jParent, const std::string& sJsonKey, Json::ValueType eType) {
std::vector<std::string> vParts = MTS::Text::split(sLine, ":", 2);