diff options
author | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2023-12-20 10:49:58 +0200 |
---|---|---|
committer | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2023-12-20 12:02:49 +0200 |
commit | f81785474b715f3a16e8c53455473b4d2dfbbb72 (patch) | |
tree | e41ef7829f79283df56271d4cafde99ad5b2f19a | |
parent | c854bb5872898fc0e3527094341132e50e456eeb (diff) | |
download | mts-io-sysfs-f81785474b715f3a16e8c53455473b4d2dfbbb72.tar.gz mts-io-sysfs-f81785474b715f3a16e8c53455473b4d2dfbbb72.tar.bz2 mts-io-sysfs-f81785474b715f3a16e8c53455473b4d2dfbbb72.zip |
move digitalIO feature to IOTR
-rw-r--r-- | src/Device/Device.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Device/Device.cpp b/src/Device/Device.cpp index 680cf44..7f92e75 100644 --- a/src/Device/Device.cpp +++ b/src/Device/Device.cpp @@ -25,7 +25,7 @@ const std::regex Device::apFilters("(modalias)|(power)(.*)|(subsystem)|(uevent)"); const std::regex Device::serialModeFilter("(.*)(serial-mode)"); const std::regex Device::mtcdt3HwVersionFilters("(MTCDT3AC)(.*)"); -const std::regex Device::iotRtrVersionFilters("(MTCAP3)(.*)"); // TODO - change it after getting IOTROUTER hardware +const std::regex Device::iotRtrVersionFilters("(IOTR)(.*)"); const std::regex Device::mtrFilters("(MTR-)(.*)"); const std::regex Device::storeFilters( "(.*)(mac-)(.*)|(.*)(-id)|(uuid)|(.*)(/eui)|(.*)(/" @@ -187,14 +187,12 @@ void Device::getSystemTreeJson(const char *dir_name) { capabilityList["serial"] = true; } if (regex_match(fileData, iotRtrVersionFilters)) { - capabilityList["din"] = true; // TODO - remove it when it will be in EEPROM - capabilityList["dout"] = true; // TODO - remove it when it will be in EEPROM /* The order of the elements is important! This array is used to access Digital IOs, in particular in SMS commands! */ - dInputs.push_back("led-power"); //TODO - change it to real names after getting IOTRouter HW - dOutputs.push_back("led-lora"); //TODO - change it to real names after getting IOTRouter HW + dInputs.push_back("USER_DIO_IN"); + dOutputs.push_back("USER_DIO_OUT"); } } else if (strcmp(d_name, "mac-eth") == 0) { deviceInfoList["macAddress"] = fileData; @@ -827,7 +825,7 @@ void Device::writeJson(const rapidjson::Document &json, const std::string &file) bool Device::readJson(rapidjson::Document &json, const std::string &file) { std::ifstream is(file); if (!is.is_open()) { - printWarning("Can't read to %s: %s", file.c_str(), strerror(errno)); + printDebug("Can't read to %s: %s", file.c_str(), strerror(errno)); return false; } rapidjson::IStreamWrapper isw { is }; |