diff options
author | John Klug <john.klug@multitech.com> | 2023-11-27 10:30:29 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2023-11-27 10:30:29 -0600 |
commit | aa172072fd91a48cf0c14d20e6dd733d43b7c951 (patch) | |
tree | 91d23f7e99a9059d74f3d4e11e769f96470b35ea /include/Device/Device.h | |
parent | a826d13ae7b3e20648566ddecca23bd6fe8f856b (diff) | |
parent | ee0e497a8fdb840bf63018372d101a0396913b15 (diff) | |
download | mts-io-sysfs-aa172072fd91a48cf0c14d20e6dd733d43b7c951.tar.gz mts-io-sysfs-aa172072fd91a48cf0c14d20e6dd733d43b7c951.tar.bz2 mts-io-sysfs-aa172072fd91a48cf0c14d20e6dd733d43b7c951.zip |
Merge branch 'sv/digital-io' into 'master'
Sv/digital io
See merge request !14
Diffstat (limited to 'include/Device/Device.h')
-rw-r--r-- | include/Device/Device.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/Device/Device.h b/include/Device/Device.h index e02c352..42dad24 100644 --- a/include/Device/Device.h +++ b/include/Device/Device.h @@ -23,12 +23,15 @@ class Device { static std::map<std::string, bool> capabilityList; static std::map<std::string, std::string> ethSwitchList; static std::map<std::string, std::string> deviceInfoList; + static std::vector<std::string> dInputs; + static std::vector<std::string> dOutputs; static const std::regex apFilters; static const std::regex serialModeFilter; static const std::regex storeFilters; static const std::regex showFilters; static const std::regex mtcdt3HwVersionFilters; + static const std::regex iotRtrVersionFilters; static const std::regex mtrFilters; const unsigned int accessoryCardsListSize = 7; @@ -128,7 +131,7 @@ class Device { void AddToDeviceInfo(const std::string Port, const std::string ProductID); }; - + class gpio_request { private: struct gpiod_request_config *request_config; @@ -146,7 +149,7 @@ class Device { }; std::vector<std::unique_ptr<AccessoryCard>> accessoryCardsList; - + public: Device(); void getSystemTreeJson(const char *dir_name); @@ -171,9 +174,11 @@ class Device { void sortAccessoryCards(); void store(std::string name, std::string value); void storeTrigger(std::string name, std::string value); + void storeOutputStateToNonvolatile(const std::string& name, const std::string& value); void Verbose(bool val); bool Verbose(); - void writeJson(); + void writeJson(const rapidjson::Document &json, const std::string &file); + bool readJson(rapidjson::Document &json, const std::string &file); void simpleError(std::string msg, int error, int exitval); }; |