summaryrefslogtreecommitdiff
path: root/include/Device/Device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/Device/Device.h')
-rw-r--r--include/Device/Device.h11
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);
};