Home
last modified time | relevance | path

Searched refs:jsonObj (Results 1 – 25 of 53) sorted by relevance

123

/openbmc/phosphor-fan-presence/control/json/actions/
H A Dcount_state_floor.cpp27 CountStateFloor::CountStateFloor(const json& jsonObj, in CountStateFloor() argument
29 ActionBase(jsonObj, groups) in CountStateFloor()
31 setCount(jsonObj); in CountStateFloor()
32 setState(jsonObj); in CountStateFloor()
33 setFloor(jsonObj); in CountStateFloor()
34 setDelayTime(jsonObj); in CountStateFloor()
117 void CountStateFloor::setCount(const json& jsonObj) in setCount() argument
119 if (!jsonObj.contains("count")) in setCount()
124 _count = jsonObj["count"].get<size_t>(); in setCount()
127 void CountStateFloor::setState(const json& jsonObj) in setState() argument
[all …]
H A Dcount_state_target.cpp32 CountStateTarget::CountStateTarget(const json& jsonObj, in CountStateTarget() argument
34 ActionBase(jsonObj, groups) in CountStateTarget()
36 setCount(jsonObj); in CountStateTarget()
37 setState(jsonObj); in CountStateTarget()
38 setTarget(jsonObj); in CountStateTarget()
75 void CountStateTarget::setCount(const json& jsonObj) in setCount() argument
77 if (!jsonObj.contains("count")) in setCount()
82 _count = jsonObj["count"].get<size_t>(); in setCount()
85 void CountStateTarget::setState(const json& jsonObj) in setState() argument
87 if (!jsonObj.contains("state")) in setState()
[all …]
H A Doverride_fan_target.cpp32 OverrideFanTarget::OverrideFanTarget(const json& jsonObj, in OverrideFanTarget() argument
34 ActionBase(jsonObj, groups) in OverrideFanTarget()
36 setCount(jsonObj); in OverrideFanTarget()
37 setState(jsonObj); in OverrideFanTarget()
38 setTarget(jsonObj); in OverrideFanTarget()
39 setFans(jsonObj); in OverrideFanTarget()
128 void OverrideFanTarget::setCount(const json& jsonObj) in setCount() argument
130 if (!jsonObj.contains("count")) in setCount()
135 _count = jsonObj["count"].get<size_t>(); in setCount()
138 void OverrideFanTarget::setState(const json& jsonObj) in setState() argument
[all …]
H A Dnet_target_decrease.cpp36 NetTargetDecrease::NetTargetDecrease(const json& jsonObj, in NetTargetDecrease() argument
38 ActionBase(jsonObj, groups) in NetTargetDecrease()
40 setState(jsonObj); in NetTargetDecrease()
41 setDelta(jsonObj); in NetTargetDecrease()
145 void NetTargetDecrease::setState(const json& jsonObj) in setState() argument
147 if (jsonObj.contains("state")) in setState()
149 _state = getJsonValue(jsonObj["state"]); in setState()
151 else if (jsonObj.contains("state_parameter_name")) in setState()
153 _stateParameter = jsonObj["state_parameter_name"].get<std::string>(); in setState()
163 void NetTargetDecrease::setDelta(const json& jsonObj) in setDelta() argument
[all …]
H A Dnet_target_increase.cpp36 NetTargetIncrease::NetTargetIncrease(const json& jsonObj, in NetTargetIncrease() argument
38 ActionBase(jsonObj, groups) in NetTargetIncrease()
40 setState(jsonObj); in NetTargetIncrease()
41 setDelta(jsonObj); in NetTargetIncrease()
139 void NetTargetIncrease::setState(const json& jsonObj) in setState() argument
141 if (jsonObj.contains("state")) in setState()
143 _state = getJsonValue(jsonObj["state"]); in setState()
145 else if (jsonObj.contains("state_parameter_name")) in setState()
147 _stateParameter = jsonObj["state_parameter_name"].get<std::string>(); in setState()
157 void NetTargetIncrease::setDelta(const json& jsonObj) in setDelta() argument
[all …]
H A Dmapped_floor.cpp54 MappedFloor::MappedFloor(const json& jsonObj, in MappedFloor() argument
56 ActionBase(jsonObj, groups) in MappedFloor()
58 setKeyGroup(jsonObj); in MappedFloor()
59 setFloorTable(jsonObj); in MappedFloor()
60 setDefaultFloor(jsonObj); in MappedFloor()
61 setCondition(jsonObj); in MappedFloor()
80 void MappedFloor::setKeyGroup(const json& jsonObj) in setKeyGroup() argument
82 if (!jsonObj.contains("key_group")) in setKeyGroup()
87 _keyGroup = getGroup(jsonObj["key_group"].get<std::string>()); in setKeyGroup()
90 void MappedFloor::setDefaultFloor(const json& jsonObj) in setDefaultFloor() argument
[all …]
H A Dset_parameter_from_group_max.cpp29 const json& jsonObj, const std::vector<Group>& groups) : in SetParameterFromGroupMax() argument
30 ActionBase(jsonObj, groups) in SetParameterFromGroupMax()
32 setParameterName(jsonObj); in SetParameterFromGroupMax()
33 setModifier(jsonObj); in SetParameterFromGroupMax()
118 void SetParameterFromGroupMax::setParameterName(const json& jsonObj) in setParameterName() argument
120 if (!jsonObj.contains("parameter_name")) in setParameterName()
126 _name = jsonObj["parameter_name"].get<std::string>(); in setParameterName()
129 void SetParameterFromGroupMax::setModifier(const json& jsonObj) in setModifier() argument
131 if (jsonObj.contains("modifier")) in setModifier()
135 _modifier = std::make_unique<Modifier>(jsonObj.at("modifier")); in setModifier()
H A Dtarget_from_group_max.cpp32 TargetFromGroupMax::TargetFromGroupMax(const json& jsonObj, in TargetFromGroupMax() argument
34 ActionBase(jsonObj, groups) in TargetFromGroupMax()
36 setHysteresis(jsonObj); in TargetFromGroupMax()
37 setMap(jsonObj); in TargetFromGroupMax()
111 void TargetFromGroupMax::setHysteresis(const json& jsonObj) in setHysteresis() argument
113 if (!jsonObj.contains("neg_hysteresis") || in setHysteresis()
114 !jsonObj.contains("pos_hysteresis")) in setHysteresis()
120 _negHysteresis = jsonObj["neg_hysteresis"].get<uint64_t>(); in setHysteresis()
121 _posHysteresis = jsonObj["pos_hysteresis"].get<uint64_t>(); in setHysteresis()
134 void TargetFromGroupMax::setMap(const json& jsonObj) in setMap() argument
[all …]
H A Dmissing_owner_target.cpp34 MissingOwnerTarget::MissingOwnerTarget(const json& jsonObj, in MissingOwnerTarget() argument
36 ActionBase(jsonObj, groups) in MissingOwnerTarget()
38 setTarget(jsonObj); in MissingOwnerTarget()
56 void MissingOwnerTarget::setTarget(const json& jsonObj) in setTarget() argument
58 if (!jsonObj.contains("target")) in setTarget()
63 _target = jsonObj["target"].get<uint64_t>(); in setTarget()
H A Dtimer_based_actions.cpp37 TimerBasedActions::TimerBasedActions(const json& jsonObj, in TimerBasedActions() argument
39 ActionBase(jsonObj, groups), in TimerBasedActions()
50 setTimerConf(jsonObj); in TimerBasedActions()
51 setActions(jsonObj); in TimerBasedActions()
155 void TimerBasedActions::setTimerConf(const json& jsonObj) in setTimerConf() argument
157 if (!jsonObj.contains("timer")) in setTimerConf()
161 auto jsonTimer = jsonObj["timer"]; in setTimerConf()
189 void TimerBasedActions::setActions(const json& jsonObj) in setActions() argument
191 if (!jsonObj.contains("actions")) in setActions()
195 for (const auto& jsonAct : jsonObj["actions"]) in setActions()
H A Dcount_state_floor.hpp68 CountStateFloor(const json& jsonObj, const std::vector<Group>& groups);
90 void setCount(const json& jsonObj);
99 void setState(const json& jsonObj);
108 void setFloor(const json& jsonObj);
115 void setDelayTime(const json& jsonObj);
H A Doverride_fan_target.hpp88 OverrideFanTarget(const json& jsonObj, const std::vector<Group>& groups);
141 void setCount(const json& jsonObj);
150 void setState(const json& jsonObj);
159 void setTarget(const json& jsonObj);
168 void setFans(const json& jsonObj);
H A Dget_managed_objects.cpp26 GetManagedObjects::GetManagedObjects(const json& jsonObj, in GetManagedObjects() argument
28 ActionBase(jsonObj, groups) in GetManagedObjects()
30 setActions(jsonObj); in GetManagedObjects()
107 void GetManagedObjects::setActions(const json& jsonObj) in setActions() argument
109 if (!jsonObj.contains("actions")) in setActions()
114 for (const auto& jsonAct : jsonObj["actions"]) in setActions()
H A Dmapped_floor.hpp146 MappedFloor(const json& jsonObj, const std::vector<Group>& groups);
161 void setKeyGroup(const json& jsonObj);
168 void setDefaultFloor(const json& jsonObj);
175 void setFloorTable(const json& jsonObj);
182 void setCondition(const json& jsonObj);
H A Dcount_state_target.hpp58 CountStateTarget(const json& jsonObj, const std::vector<Group>& groups);
93 void setCount(const json& jsonObj);
102 void setState(const json& jsonObj);
111 void setTarget(const json& jsonObj);
H A Dpcie_card_floors.cpp36 PCIeCardFloors::PCIeCardFloors(const json& jsonObj, in PCIeCardFloors() argument
38 ActionBase(jsonObj, groups) in PCIeCardFloors()
40 loadCardJSON(jsonObj); in PCIeCardFloors()
152 void PCIeCardFloors::loadCardJSON(const json& jsonObj) in loadCardJSON() argument
156 if (jsonObj.contains("settle_time")) in loadCardJSON()
159 std::chrono::seconds(jsonObj.at("settle_time").get<size_t>()); in loadCardJSON()
162 if (jsonObj.contains("use_config_specific_files")) in loadCardJSON()
165 jsonObj.at("use_config_specific_files").get<bool>(); in loadCardJSON()
/openbmc/phosphor-fan-presence/control/json/
H A Dfan.cpp35 Fan::Fan(const json& jsonObj) : in Fan() argument
36 ConfigBase(jsonObj), _bus(util::SDBusPlus::getBus()) in Fan()
38 setInterface(jsonObj); in Fan()
39 setSensors(jsonObj); in Fan()
40 setZone(jsonObj); in Fan()
43 void Fan::setInterface(const json& jsonObj) in setInterface() argument
45 if (!jsonObj.contains("target_interface")) in setInterface()
48 entry("JSON=%s", jsonObj.dump().c_str())); in setInterface()
52 _interface = jsonObj["target_interface"].get<std::string>(); in setInterface()
55 void Fan::setSensors(const json& jsonObj) in setSensors() argument
[all …]
H A Devent.cpp41 Event::Event(const json& jsonObj, Manager* mgr, in Event() argument
43 ConfigBase(jsonObj), _bus(util::SDBusPlus::getBus()), _manager(mgr), in Event()
47 if (jsonObj.contains("groups")) in Event()
49 setGroups(jsonObj, _profiles, _groups); in Event()
52 if (jsonObj.contains("actions")) in Event()
54 setActions(jsonObj); in Event()
56 setTriggers(jsonObj); in Event()
104 void Event::configGroup(Group& group, const json& jsonObj) in configGroup() argument
106 if (!jsonObj.contains("interface") || !jsonObj.contains("property") || in configGroup()
107 !jsonObj["property"].contains("name")) in configGroup()
[all …]
H A Dgroup.cpp29 Group::Group(const json& jsonObj) : ConfigBase(jsonObj), _service("") in Group() argument
31 setMembers(jsonObj); in Group()
33 if (jsonObj.contains("service")) in Group()
35 setService(jsonObj); in Group()
50 void Group::setMembers(const json& jsonObj) in setMembers() argument
52 if (!jsonObj.contains("members")) in setMembers()
55 entry("JSON=%s", jsonObj.dump().c_str())); in setMembers()
58 for (const auto& member : jsonObj["members"]) in setMembers()
65 void Group::setService(const json& jsonObj) in setService() argument
67 _service = jsonObj["service"].get<std::string>(); in setService()
H A Dprofile.cpp37 Profile::Profile(const json& jsonObj) : ConfigBase(jsonObj), _active(false) in Profile() argument
39 setActive(jsonObj); in Profile()
42 void Profile::setActive(const json& jsonObj) in setActive() argument
44 if (!jsonObj.contains("method") || !jsonObj["method"].contains("name")) in setActive()
48 entry("JSON=%s", jsonObj.dump().c_str())); in setActive()
52 auto method = jsonObj["method"]["name"].get<std::string>(); in setActive()
58 _active = handler->second(jsonObj["method"]); in setActive()
69 entry("JSON=%s", jsonObj["method"].dump().c_str()), in setActive()
H A Dzone.cpp51 Zone::Zone(const json& jsonObj, const sdeventplus::Event& event, Manager* mgr) : in Zone() argument
52 ConfigBase(jsonObj), _dbusZone{}, _manager(mgr), _defaultFloor(0), in Zone()
59 if (jsonObj.contains("increase_delay"))
62 std::chrono::seconds(jsonObj["increase_delay"].get<uint64_t>());
66 setPowerOnTarget(jsonObj);
70 if (jsonObj.contains("default_ceiling"))
72 _defaultCeiling = jsonObj["default_ceiling"].get<uint64_t>();
78 if (jsonObj.contains("default_floor"))
80 _defaultFloor = jsonObj["default_floor"].get<uint64_t>();
96 if (jsonObj.contains("decrease_interval"))
[all …]
H A Dconfig_base.hpp56 explicit ConfigBase(const json& jsonObj) in ConfigBase() argument
59 setName(jsonObj); in ConfigBase()
60 if (jsonObj.contains("profiles")) in ConfigBase()
62 for (const auto& profile : jsonObj["profiles"]) in ConfigBase()
163 inline void setName(const json& jsonObj) in setName() argument
165 if (!jsonObj.contains("name")) in setName()
169 entry("JSON=%s", jsonObj.dump().c_str())); in setName()
173 _name = jsonObj["name"].get<std::string>(); in setName()
H A Devent.hpp70 Event(const json& jsonObj, Manager* mgr,
129 static void configGroup(Group& group, const json& jsonObj);
140 static void setGroups(const json& jsonObj,
180 void setActions(const json& jsonObj);
189 void setTriggers(const json& jsonObj);
/openbmc/phosphor-fan-presence/control/json/triggers/
H A Dtimer.cpp34 TimerType getType(const json& jsonObj) in getType() argument
36 if (!jsonObj.contains("type")) in getType()
39 entry("JSON=%s", jsonObj.dump().c_str())); in getType()
42 auto type = jsonObj["type"].get<std::string>(); in getType()
61 std::chrono::microseconds getInterval(const json& jsonObj) in getInterval() argument
63 if (!jsonObj.contains("interval")) in getInterval()
66 entry("JSON=%s", jsonObj.dump().c_str())); in getInterval()
70 jsonObj["interval"].get<uint64_t>()); in getInterval()
73 bool getPreload(const json& jsonObj) in getPreload() argument
75 if (jsonObj.contains("preload_groups") && in getPreload()
[all …]
/openbmc/phosphor-fan-presence/control/json/utils/
H A Dmodifier.cpp96 explicit MinusOperator(const json& jsonObj) : in MinusOperator()
97 arg(ConfigBase::getJsonValue(jsonObj["value"])) in MinusOperator()
165 explicit LessThanOperator(const json& jsonObj) in LessThanOperator()
167 const auto& valueArray = jsonObj["value"]; in LessThanOperator()
218 if (jsonObj.contains("default_value")) in LessThanOperator()
220 defaultValue = ConfigBase::getJsonValue(jsonObj["default_value"]); in LessThanOperator()
285 Modifier::Modifier(const json& jsonObj) in Modifier() argument
287 setOperator(jsonObj); in Modifier()
290 void Modifier::setOperator(const json& jsonObj) in setOperator() argument
292 if (!jsonObj.contains("operator") || !jsonObj.contains("value")) in setOperator()
[all …]

123