Change Type and Name to Upper Case
This is the first round of updating properties. The standard
is camel case so slowly transition that way.
Change-Id: I29824116d621f1b0c394cd5663bbd340d319cc16
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 9f95d0e..a62c36f 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -767,7 +767,7 @@
// loop through newConfiguration, but use values from system
// configuration to be able to modify via dbus later
auto boardValues = systemConfiguration[boardKey];
- auto findBoardType = boardValues.find("type");
+ auto findBoardType = boardValues.find("Type");
std::string boardType;
if (findBoardType != boardValues.end() &&
findBoardType->type() == nlohmann::json::value_t::string)
@@ -827,7 +827,7 @@
jsonPointerPath = jsonPointerPathBoard;
jsonPointerPath += std::to_string(exposesIndex);
- auto findName = item.find("name");
+ auto findName = item.find("Name");
if (findName == item.end())
{
std::cerr << "cannot find name in field " << item << "\n";
@@ -842,7 +842,7 @@
continue;
}
}
- auto findType = item.find("type");
+ auto findType = item.find("Type");
std::string itemType;
if (findType != item.end())
{
@@ -1047,7 +1047,7 @@
for (auto it = _configurations.begin(); it != _configurations.end();)
{
auto findProbe = it->find("probe");
- auto findName = it->find("name");
+ auto findName = it->find("Name");
nlohmann::json probeCommand;
// check for poorly formatted fields, probe must be an array
@@ -1160,7 +1160,7 @@
*configListFind)
{
std::string foundObjectName =
- (exposedObject)["name"];
+ (exposedObject)["Name"];
if (boost::iequals(
foundObjectName,
keyPair.value()
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index 7df8908..f80994f 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -130,9 +130,9 @@
symbolPath =
symbolPath.substr(sizeof("/sys/firmware/devicetree/base") - 1);
nlohmann::json configuration = {{"path", symbolPath},
- {"type", "Symbol"},
+ {"Type", "Symbol"},
{"bus", std::stoul(bus)},
- {"name", "i2c" + bus}};
+ {"Name", "i2c" + bus}};
createOverlay(TEMPLATE_DIR + std::string("/Symbol.template"),
configuration);
}
@@ -152,7 +152,7 @@
buff << templateFile.rdbuf();
std::string templateStr = buff.str();
std::string name = "unknown";
- std::string type = configuration["type"];
+ std::string type = configuration["Type"];
for (auto keyPair = configuration.begin(); keyPair != configuration.end();
keyPair++)
{
@@ -166,7 +166,7 @@
std::stoul(keyPair.value().get<std::string>(), nullptr, 16);
subsituteString = std::to_string(dec);
}
- else if (keyPair.key() == "name" &&
+ else if (keyPair.key() == "Name" &&
keyPair.value().type() == nlohmann::json::value_t::string)
{
subsituteString = std::regex_replace(
@@ -268,7 +268,7 @@
{
continue;
}
- auto findType = configuration.find("type");
+ auto findType = configuration.find("Type");
if (findType == configuration.end() ||
findType->type() != nlohmann::json::value_t::string)
{