summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrii Pientsov <andrii.pientsov@globallogic.com>2020-07-15 13:49:59 +0300
committerAndrii Pientsov <andrii.pientsov@globallogic.com>2020-07-15 13:49:59 +0300
commit8186f98913c55191b5a3610d19c8580c6a86c2f4 (patch)
tree34daf8e9219c894ca36dd1f7ddf4560aa395c659 /include
parentccd41677d998134ff501a8d6ac3a154dcaca9321 (diff)
downloadlibmts-io-8186f98913c55191b5a3610d19c8580c6a86c2f4.tar.gz
libmts-io-8186f98913c55191b5a3610d19c8580c6a86c2f4.tar.bz2
libmts-io-8186f98913c55191b5a3610d19c8580c6a86c2f4.zip
MTX-3404 Code Review
Diffstat (limited to 'include')
-rw-r--r--include/mts/MTS_IO_CellularRadio.h4
-rw-r--r--include/mts/MTS_IO_QuectelRadio.h1
-rw-r--r--include/mts/MTS_IO_TelitRadio.h1
3 files changed, 4 insertions, 2 deletions
diff --git a/include/mts/MTS_IO_CellularRadio.h b/include/mts/MTS_IO_CellularRadio.h
index 6b23986..57a4de6 100644
--- a/include/mts/MTS_IO_CellularRadio.h
+++ b/include/mts/MTS_IO_CellularRadio.h
@@ -217,8 +217,8 @@ namespace MTS {
std::string m_sRadioType;
};
- static const size_t FILE_CHUNK_SIZE = 1024;
- static CODE getFileSize(int fd, size_t& nBytes, size_t& nFileChunks);
+ static CODE getFileSize(int fd, size_t& nBytes);
+ static CODE sizeToChunks(const size_t nBytes, const size_t chunkSize, size_t& nChunks);
static CODE readChunk(int fd, char* pChunk, size_t dChunkSize, size_t& nReadBytes);
private:
diff --git a/include/mts/MTS_IO_QuectelRadio.h b/include/mts/MTS_IO_QuectelRadio.h
index 2121f7c..6e7372b 100644
--- a/include/mts/MTS_IO_QuectelRadio.h
+++ b/include/mts/MTS_IO_QuectelRadio.h
@@ -67,6 +67,7 @@ namespace MTS {
// private variable to save old firmware versions during FOTA
std::string m_sQuectelFirmware;
+ static const size_t FILE_CHUNK_SIZE;
static const std::string CMD_ABORT_UPLOAD;
static const std::string VALUE_MTS_DELTA_NAME;
static const std::string VALUE_MTS_DELTA_PATH;
diff --git a/include/mts/MTS_IO_TelitRadio.h b/include/mts/MTS_IO_TelitRadio.h
index fdf8a20..a3425f9 100644
--- a/include/mts/MTS_IO_TelitRadio.h
+++ b/include/mts/MTS_IO_TelitRadio.h
@@ -76,6 +76,7 @@ namespace MTS {
// private variable to save old firmware versions during FOTA
std::string m_sTelitFirmware;
+ static const size_t FILE_CHUNK_SIZE;
static const std::string CMD_ABORT_UPLOAD;
CODE getTelitFirmware(std::string& sFirmware);